From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1511876867.11411.41.camel@hadess.net> Subject: Re: [PATCH BlueZ] gdbus: Force service to start if proxy is created while not connected From: Bastien Nocera To: Luiz Augusto von Dentz , linux-bluetooth@vger.kernel.org Date: Tue, 28 Nov 2017 14:47:47 +0100 In-Reply-To: <20171128105746.13000-1-luiz.dentz@gmail.com> References: <20171128105746.13000-1-luiz.dentz@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: On Tue, 2017-11-28 at 12:57 +0200, Luiz Augusto von Dentz wrote: > From: Luiz Augusto von Dentz > > Because GetAll is no longer send right away the service may never be > started. Causes an assertion on startup on my machine. dbus[12994]: arguments to dbus_message_unref() were incorrect, assertion "!message->in_cache" failed in file ../../dbus/dbus-message.c line 1718. #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff6b752a7 in __GI_abort () at abort.c:90 #2 0x00007ffff76618c4 in _dbus_abort () from /lib64/libdbus-1.so.3 #3 0x00007ffff7658150 in _dbus_warn_check_failed () from /lib64/libdbus-1.so.3 #4 0x000000000048b281 in start_service (proxy=0x70a4f0) at gdbus/client.c:505 #5 g_dbus_proxy_new (client=, path=path@entry=0x49bcad "/org/freedesktop/hostname1", interface=interface@entry=0x49bcc8 "org.freedesktop.hostname1") at gdbus/client.c:527 #6 0x000000000040cb9d in hostname_init () at plugins/hostname.c:287 #7 0x000000000045617a in plugin_init (enable=, disable=) at src/plugin.c:200 #8 0x000000000040bc9e in main (argc=, argv=) at src/main.c:744 Looks like g_dbus_send_message() takes ownership of the reference to the message. Removing that call in your patch makes it work. Might want to double-check though.