GNU bug report logs - #10744
24.0.93; dbus notification callback error

Previous Next

Package: emacs;

Reported by: Ken Raeburn <raeburn <at> permabit.com>

Date: Tue, 7 Feb 2012 02:11:02 UTC

Severity: normal

Found in version 24.0.93

Fixed in version 24.0.94

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10744 in the body.
You can then email your comments to 10744 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10744; Package emacs. (Tue, 07 Feb 2012 02:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ken Raeburn <raeburn <at> permabit.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 07 Feb 2012 02:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ken Raeburn <raeburn <at> permabit.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.93; dbus notification callback error
Date: Mon, 06 Feb 2012 20:29:03 -0500
Using a gnome desktop environment, start emacs -Q.

M-x set-variable RET debug-on-error RET t RET
M-x load-library RET notifications RET

Have some other application send a notification (specifically, using
service org.freedesktop.Notifications), which pops up on the desktop.
(In my test case, it's another emacs process where I call
dbus-call-method in some code I wrote before finding
notifications.el. :-)

Wait for the notification to time out and go away.

An error pops up indicating that notifications-on-closed-signal is
passed one argument instead of the expected two:

Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
  notifications-on-closed-signal(673)
  apply(notifications-on-closed-signal 673)
  byte-code(... [result event dbus-message-type-error dbus-message-type-method-call nil dbus-check-event 2 signal dbus-error 9 apply 8 err ...
  dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))
  call-interactively(dbus-handle-event nil [(dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673)])

It's not necessary to run any extra code relating to notifications;
simply loading the library code causes registration of the handler for
desktop notifications.


In GNU Emacs 24.0.93.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-02-03 on just-testing.permabit.com
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
Configured using:
 `configure '--prefix=/permabit/user/raeburn/I64/install/emacs-24.0.93'
 '--with-x-toolkit=lucid''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: C
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <help-echo> <help-echo> C-f C-f C-a C-e 
C-p C-n C-n C-f C-f M-x i e l m <return> M-x C-g ( 
s e t C-g M-x v <backspace> s a t <backspace> <backspace> 
e t - v a r <tab> <return> d e b u g - o n - e r r 
o r <return> t <return> <backspace> <backspace> <backspace> 
l o a d - l i b r a r y SPC " n o t i f i c a t i o 
n s " ) <return> C-x 5 2 <switch-frame> C-h f n o t 
i f i c a t i o n s - n o t <tab> <return> C-x o C-n 
C-u C-f <return> C-x 1 <help-echo> <help-echo> <down-mouse-1> 
<mouse-movement> <mouse-1> C-x k <return> C-x 5 0 <down-mouse-1> 
<mouse-1> C-x m M-> <return> C-x o M-< M-> M-w C-x 
o C-y M-< C-u C-n C-n C-n C-u C-u C-b C-u C-f C-u C-f 
C-b C-SPC C-M-f C-M-f C-n C-n C-n C-p C-u C-f C-f C-f 
C-f C-f C-w . . . C-u C-u C-b C-u C-b C-u C-f C-M-SPC 
C-g C-b C-b C-f C-f C-M-f C-b C-SPC C-p C-p C-u C-u 
C-f C-u C-u C-b C-u C-u C-b C-u C-u C-b C-u C-b C-u 
C-f C-u C-f C-b C-w C-a C-n C-n C-n C-u C-u C-k C-x 
o C-x C-g q C-p C-p C-x k <return> M-x s e n d b u 
<tab> <backspace> <backspace> - b <tab> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
C-g M-x r e p o r t - <tab> <return>

Recent messages:
call-interactively: End of buffer [2 times]
Quit [2 times]
Loading notifications...done
Type C-x 1 to delete the help window, C-M-v to scroll help.
uncompressing notifications.el.gz...done
Entering debugger...
Mark set [7 times]
Quit
Mark set
Back to top level.
Quit

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug gnus-util message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
debug jka-compr find-func help-mode view notifications dbus xml cus-edit
easymenu wid-edit cus-start cus-load help-fns ielm pp comint regexp-opt
ring time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win
x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting font-render-setting
x-toolkit x multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10744; Package emacs. (Tue, 07 Feb 2012 09:11:01 GMT) Full text and rfc822 format available.

Message #8 received at 10744 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Ken Raeburn <raeburn <at> permabit.com>
Cc: 10744 <at> debbugs.gnu.org
Subject: Re: bug#10744: 24.0.93; dbus notification callback error
Date: Tue, 07 Feb 2012 10:09:22 +0100
Ken Raeburn <raeburn <at> permabit.com> writes:

> An error pops up indicating that notifications-on-closed-signal is
> passed one argument instead of the expected two:
>
> Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
>   notifications-on-closed-signal(673)

According to the spec, the NotificationClosed signal shall send 2
arguments, the id and the reason. See
<http://www.galago-project.org/specs/notification/0.9/x408.html#signal-notification-closed>.

That's what `notifications-on-closed-signal' expects. And doesn't get.

>   dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))

The daemon sends only one argument, the id (673). I could reproduce the
problem on an old RHEL system with:

notification-daemon.x86_64               0.3.5-9.el5 installed

Reading the NEWS entry of the notification-daemon sources, I've found

version 0.4.0 (20-November-2008):
        * Send the reason code along with the NotificationClosed signal in order
          to indicate why the notification was closed. (Bug #137)

So it is clearly a daemon error, which is corrected meanwhile. I've
submitted a fix to the trunk, making the reason argument in
`notifications-on-closed-signal' optional (assuming `undefined' as
default). Could you, please, check?

Best regards, Michael.




bug marked as fixed in version 24.0.94, send any further explanations to 10744 <at> debbugs.gnu.org and Ken Raeburn <raeburn <at> permabit.com> Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 10 Feb 2012 19:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10744; Package emacs. (Sat, 11 Feb 2012 00:05:02 GMT) Full text and rfc822 format available.

Message #13 received at 10744 <at> debbugs.gnu.org (full text, mbox):

From: Ken Raeburn <raeburn <at> permabit.com>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: "10744 <at> debbugs.gnu.org" <10744 <at> debbugs.gnu.org>
Subject: Re: bug#10744: 24.0.93; dbus notification callback error
Date: Fri, 10 Feb 2012 19:02:51 -0500
Sorry for the delay.  I can confirm the patch works for me.  (And my desktop is Debian Lenny w/notification-daemon 0.3.7.)

Ken

Sent from my iPhone

On Feb 7, 2012, at 4:09, Michael Albinus <michael.albinus <at> gmx.de> wrote:

> Ken Raeburn <raeburn <at> permabit.com> writes:
> 
>> An error pops up indicating that notifications-on-closed-signal is
>> passed one argument instead of the expected two:
>> 
>> Debugger entered--Lisp error: (wrong-number-of-arguments #[(id reason) ...] 1)
>>  notifications-on-closed-signal(673)
> 
> According to the spec, the NotificationClosed signal shall send 2
> arguments, the id and the reason. See
> <http://www.galago-project.org/specs/notification/0.9/x408.html#signal-notification-closed>.
> 
> That's what `notifications-on-closed-signal' expects. And doesn't get.
> 
>>  dbus-handle-event((dbus-event :session 4 1352 ":1.12" "/org/freedesktop/Notifications" "org.freedesktop.Notifications" "NotificationClosed" notifications-on-closed-signal 673))
> 
> The daemon sends only one argument, the id (673). I could reproduce the
> problem on an old RHEL system with:
> 
> notification-daemon.x86_64               0.3.5-9.el5 installed
> 
> Reading the NEWS entry of the notification-daemon sources, I've found
> 
> version 0.4.0 (20-November-2008):
>        * Send the reason code along with the NotificationClosed signal in order
>          to indicate why the notification was closed. (Bug #137)
> 
> So it is clearly a daemon error, which is corrected meanwhile. I've
> submitted a fix to the trunk, making the reason argument in
> `notifications-on-closed-signal' optional (assuming `undefined' as
> default). Could you, please, check?
> 
> Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Mar 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.