From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#9581: 24.0.50; dbus-unregister-object fails if service is nil Date: Sun, 25 Sep 2011 13:59:45 +0200 Message-ID: <87mxdsvnm6.fsf@gmx.de> References: <87pqisi3lu.fsf@keller.adm.naquadah.org> <87ehz7e0ck.fsf@gmx.de> <871uv7i6gb.fsf@keller.adm.naquadah.org> <87bouab1mi.fsf@gmx.de> <87wrcydnuq.fsf@keller.adm.naquadah.org> <877h4yc8gm.fsf@gmx.de> <87aa9setsi.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1316952042 20171 80.91.229.12 (25 Sep 2011 12:00:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 25 Sep 2011 12:00:42 +0000 (UTC) Cc: 9581@debbugs.gnu.org To: Julien Danjou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 25 14:00:38 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1R7nNp-0005OX-Lh for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Sep 2011 14:00:33 +0200 Original-Received: from localhost ([::1]:50429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7nNp-000111-52 for geb-bug-gnu-emacs@m.gmane.org; Sun, 25 Sep 2011 08:00:33 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:40020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7nNj-0000zo-C0 for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2011 08:00:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R7nNh-0007Gs-Ns for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2011 08:00:27 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R7nNh-0007Gc-HR for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2011 08:00:25 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1R7nOH-0007CW-TB for bug-gnu-emacs@gnu.org; Sun, 25 Sep 2011 08:01:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Sep 2011 12:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9581 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9581-submit@debbugs.gnu.org id=B9581.131695202927636 (code B ref 9581); Sun, 25 Sep 2011 12:01:01 +0000 Original-Received: (at 9581) by debbugs.gnu.org; 25 Sep 2011 12:00:29 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R7nNk-0007Bg-N5 for submit@debbugs.gnu.org; Sun, 25 Sep 2011 08:00:28 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1R7nNi-0007BZ-QD for 9581@debbugs.gnu.org; Sun, 25 Sep 2011 08:00:27 -0400 Original-Received: (qmail invoked by alias); 25 Sep 2011 11:59:47 -0000 Original-Received: from p57BB8C92.dip0.t-ipconnect.de (EHLO detlef.gmx.de) [87.187.140.146] by mail.gmx.net (mp069) with SMTP; 25 Sep 2011 13:59:47 +0200 X-Authenticated: #3708877 X-Provags-ID: V01U2FsdGVkX1+uEn5Mbl2ujmtug7KEmVCu6AkeF6KkppjRVmQX9G xBtF9/s2V6wcl6 In-Reply-To: <87aa9setsi.fsf@keller.adm.naquadah.org> (Julien Danjou's message of "Sun, 25 Sep 2011 13:38:21 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 25 Sep 2011 08:01:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:51813 Archived-At: Julien Danjou writes: >> I've played exactly this example (replacing "some.service" by >> "org.gtk.Private.GduVolumeMonitor" in order to have an existing >> service). No problem. > > Indeed. It works fine with org.gtk.Private.GduVolumeMonitor as service, > but with "some.service" it fails. Why? `dbus-register-signal' checks for the a valid service name, if it isn't nil. Usually, "some.service" is not known; in my test `dbus-register-signal' raises an error then. How did you manage to register your signal with that service? >> Could you apply (dbus-list-hash-table) before calling >> `dbus-unregister-object', and show the result? > > Yeah. I start emacs-snapshot, then register then call > `dbus-list-hash-table', it messages: > > (((:session "org.freedesktop.Notifications" "ActionInvoked") > (":1.129" > "org.freedesktop.Notifications" "/org/freedesktop/Notifications" > notifications-on-action-signal > "type=3D'signal',interface=3D'org.freedesktop.Notifications',member=3D= 'ActionInvoked',sender=3D':1.129',path=3D'/org/freedesktop/Notifications'")) > ((:session "org.freedesktop.Notifications" "NotificationClosed") > (":1.129" "org.freedesktop.Notifications" > "/org/freedesktop/Notifications" notifications-on-closed-signal > "type=3D'signal',interface=3D'org.freedesktop.Notifications',member=3D= 'NotificationClosed',sender=3D':1.129',path=3D'/org/freedesktop/Notificatio= ns'")) These two entries show the correct match rule (the respective last element). > ((:session "org.gtk.Private.RemoteVolumeMonitor" "VolumeAdded") > ("" > "some.service" "/org/gtk/Private/RemoteVolumeMonitor" identity > "=C2=82=01"))) This entry has a corrupted match rule. Again, which trick brings `dbus-register-signal' to accept it? I must implement a counter-check for this! > Then I call unregister it yells: > Debugger entered--Lisp error: (dbus-error "Unable to append argument" "\2= 02=01") > dbus-call-method(:session "org.freedesktop.DBus" "/org/freedesktop/DBus= " "org.freedesktop.DBus" "RemoveMatch" "\202=01") > > Where the last string is obviously the same as I talked about above. :) Which is the correct answer, because there isn't a valid match rule. I could add a check for a valid match rule before sending the "RemoveMatch" message, but I believe this is superfluous, because there is exactly one place that match rule is appended. At this place, we must prevent wrong values. Best regards, Michael.