Windows DBus shared memory name depends on _DEBUG?

Thomas Sondergaard ts at
Wed Sep 22 02:06:52 PDT 2010


I'm using D-Bus (master) with Qt on Windows and I'm experiencing that my 
debug builds, which link the debug version of QtDBus, which again link 
the debug version of libdbus, ie dbus-1d.dll, always starts a new 
session bus.

I've discovered that the reason is that dbus-daemon.exe is built with 
release settings. This causes the name of the shared memory segment used 
to find the running server to be different, due to these lines in 

#ifdef _DEBUG
static const char *cDBusDaemonAddressInfo = "DBusDaemonAddressInfoDebug";
static const char *cDBusDaemonAddressInfo = "DBusDaemonAddressInfo";

What is the wisdom behind using a different shared memory address for 
dbus build with debugging enabled? If the different address is meant to 
allow the developer to experiment with a debugging build while at the 
same time running other software that uses a release version of dbus, I 
think it would make sense to make the address a configuration option.

I got myself into this situation by first building and installing dbus 
with release settings and then building and installing with debug 
settings to the same prefix. I did that because I wanted both a debug 
and a release version of dbus-1.dll (dbus-1d.dll).



More information about the dbus mailing list