crash using dbus 0.62 glib binding
Xavier Claessens
xclaesse at gmail.com
Thu Jul 27 05:33:56 PDT 2006
Hello,
In my program I get the session bus then release it. In some cases the
program may get the session bus again and that lead to a crash.
I just tried with this simple code:
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
dbus_g_connection_unref (connection);
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
and the program segfault. This message is written on the terminal:
14375: arguments to dbus_connection_ref() were incorrect, assertion
"connection->generation == _dbus_current_generation" failed in file
dbus-connection.c line 1749.
This is normally a bug in some application using the D-BUS library.
Erreur de segmentation
Here is the interesting part of the call stack:
#0 0xb784fafb in dbus_watch_handle () from /usr/lib/libdbus-1.so.2
#1 0xb7836ac5 in dbus_connection_get_data ()
from /usr/lib/libdbus-1.so.2
#2 0xb7835b31 in dbus_bus_get_unix_user () from /usr/lib/libdbus-1.so.2
#3 0xb7835e10 in dbus_bus_register () from /usr/lib/libdbus-1.so.2
#4 0xb7836234 in dbus_bus_register () from /usr/lib/libdbus-1.so.2
#5 0xb786ad9f in dbus_g_bus_get () from /usr/lib/libdbus-glib-1.so.2
Is it normal that I can't get the bus two times in the same program ?
Xavier Claessens.
More information about the dbus
mailing list