dbus_shutdown call
Ge@@ru
geaaru at gmail.com
Tue Jan 8 05:54:49 PST 2008
On Tue, 2008-01-08 at 14:51 +0100, Thiago Macieira wrote:
> On Tuesday 08 January 2008 13:51:35 Ge@@ru wrote:
> > Hi at all,
> > i want use dbus_shutdown function for deallocate internal dbus variable
> > before exit from my application and avoid valgrind warning.
> > On bus session this works fine but on system bus i have this abort:
> > process 26586: dbus_shutdown() called but connections were still live.
> > This probably means the application did not drop all its references to
> > bus connections
> >
> > Why? Have you an idea how can i resolve this problem?
>
> That means there were still live connections. Put a breakpoint in all calls to
> dbus_bus_get and dbus_connection_unref. Check if the number of unrefs is
> equal to the one of refs.
>
thanks for reply...
before call dbus_shutdown ref_count is to 1 that is correct because dbus
connection reference count one internally, so i think there isn't a
problem on my application on call dbus_connection_unref incorrectly.
(gdb) p *core->conn
$4 = {
refcount = {
value = 1
},
mutex = 0x804a8a8,
dispatch_mutex = 0x804aa98,
dispatch_cond = 0x804a5c8,
io_path_mutex = 0x804aa70,
io_path_cond = 0x804aac0,
outgoing_messages = 0x0,
incoming_messages = 0x804a434,
message_borrowed = 0x0,
n_outgoing = 0,
n_incoming = 2,
outgoing_counter = 0x804ac78,
transport = 0x804a600,
watches = 0x804a940,
timeouts = 0x804a960,
filter_list = 0x0,
slot_list = {
slots = 0x804acb8,
n_slots = 1
},
pending_replies = 0x804a980,
client_serial = 4,
disconnect_message_link = 0x804a3e0,
wakeup_main_function = 0,
wakeup_main_data = 0x0,
free_wakeup_main_data = 0,
dispatch_status_function = 0,
dispatch_status_data = 0x0,
free_dispatch_status_data = 0,
last_dispatch_status = DBUS_DISPATCH_DATA_REMAINS,
link_cache = 0x804a428,
objects = 0x804a840,
server_guid = 0x0,
shareable = 1,
dispatch_acquired = 0,
io_path_acquired = 0,
exit_on_disconnect = 0,
route_peer_messages = 0,
disconnected_message_arrived = 0,
disconnected_message_processed = 0,
have_connection_lock = 0,
generation = 1
}
More information about the dbus
mailing list