As the subject says. In the testcase (basically copy and pasted from the
current X server D-BUS code), you'll see 'about to init' printed, then 'about to
finish', then a segfault. gdb shows the segfault appears to be in
Being able to restart the connection is a hard requirement for us. I have no
idea if it otherwise works (apparently _close is not what I want, and instead I
need to unref the connection), because we can't register the same path again.
Thanks for the test case, looks like it is supposed to work, so this should be
pretty simple to debug.
(unrelated, you do want to unref() not close() the result of dbus_bus_get() -
the docs in latest cvs sources go into some detail on this, but the html docs
on the web site probably haven't been updated. if you want a connection that
can be closed, you should use dbus_bus_get_private instead, but that will be
decidedly more wasteful if other code in the same process also wants to use
the bus since the connection won't be shared.)
yeah, i'm unreffing it in most spots, just not all. thanks for the catch.
I am happy to report that the issue is not in D-Bus but in how C nulls out
structs (namely it doesn't):
Adding a memset(&vtable, 0, sizeof(vtable)); removes the crash.
i suck at life. thanks.