crash in dbus
Simon McVittie
simon.mcvittie at collabora.co.uk
Wed Dec 3 03:59:51 PST 2014
On 03/12/14 02:50, Thomas Green wrote:
> Is there something with my logic in running the main loop in its own thread?
Yes. dbus-glib operates in the default GLib main-context[1] and makes no
attempt to be thread-safe. If you are using dbus-glib, you should
iterate the default GLib main-context in the main thread (the one that
called main()), like you would for a Gtk application.
Additionally, you haven't said which version of libdbus this is. If it
is version 1.6.x then it has no thread-safety by default: you have to
call dbus_threads_init_default() as early as possible. Version 1.8.x
makes that function call unnecessary, but still harmless.
I recommend using GDBus instead of libdbus for multi-threaded D-Bus,
particularly if you are already depending on GLib.
> #0 0xb7d71114 in ?? () from /lib/i386-linux-gnu/libdbus-1.so.3
This is not a useful backtrace: for a useful backtrace, you need debug
symbols. From that path you seem to be using either Debian or a Debian
derivative like Ubuntu, in which case installing dbus-1-dbg,
libdbus-glib-1-2-dbg and libglib2.0-0-dbg would be appropriate.
Regards,
S
[1] https://tecnocode.co.uk/2014/03/27/what-is-gmaincontext/
More information about the dbus
mailing list