I get 10118: arguments to dbus_connection_ref() were incorrect, assertion "connection->generation == _dbus_current_generation" failed in file dbus-connection.c line 1749. when calling dbus_bus_get( DBUS_BUS_SESSION, &pDBusError ); then dbus_connection_unref( m_pDBusConnection ); and some time later when I need the connection again I call dbus_bus_get( DBUS_BUS_SESSION, &pDBusError ); again and get that assertion and crash later. it is dbus-1 0.60 If I understand the documentation right, I own the reference to the connection which I get from dbus_bus_get, or do I not? http://dbus.freedesktop.org/doc/dbus/api/html/group__DBusBus.html#g1d29aa7e5337a792a40d91aba81f2f0c
Yes, you own a reference. dbus 0.60 has a quite a few bugs though, including some in managing the memory of bus objects, iirc. The code in this area was fixed up quite a bit prior to 1.0. Assuming it's not a libdbus bug (big assumption for 0.60), this error could either mean the connection was unref'd too many times somehow and thus connection->generation is garbage, or it could mean dbus_shutdown() was called so _dbus_current_generation does not match (this is what that assertion is supposed to catch, primarily). It's not allowed to dbus_shutdown() unless you've dropped all references to all dbus objects. If you can reproduce with 1.0.x please try to boil it down to a little test program and we'll get it fixed...
Closing. Assuming this is fixed in later versions of D-Bus since there was no reply to this bug. If this is not the case then please reopen with a test case attached.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.