[Interest] "Dynamic session lookup supported but failed"

René J.V. Bertin rjvbertin at gmail.com
Fri May 15 22:09:48 CEST 2015


On Friday May 15 2015 12:22:05 Thiago Macieira wrote:

> Nothing in cross-platform Qt should be using it directly. The only thing that 
> uses QtDBus directly is the XCB platform plugin (for the D-Bus menu and app 
> indicators).

But that is the platform plugin used on Linux, and yet it doesn't complain when I start, say, Assistant without a session DBus?

> Put a breakpoint in dbus_bus_get and dbus_bus_get_private and see where they 
> got called from.

dbus_bus_get doesn't get called, but:

* thread #1: tid = 0x39cdb1, 0x000000010849df19 libdbus-1.3.dylib`dbus_bus_get_private, queue = 'com.apple.main-thread', stop reason = breakpoint 2.1
  * frame #0: 0x000000010849df19 libdbus-1.3.dylib`dbus_bus_get_private
    frame #1: 0x0000000104e719e5 QtDBus`QDBusConnection::connectToBus(QDBusConnection::BusType, QString const&) [inlined] q_dbus_bus_get_private(type=<unavailable>, error=0x0000000000000000) + 8 at qdbus_symbols_p.h:98
    frame #2: 0x0000000104e719dd QtDBus`QDBusConnection::connectToBus(type=<unavailable>, name=<unavailable>) + 365 at qdbusconnection.cpp:334
    frame #3: 0x0000000104e73b66 QtDBus`QDBusConnection::sessionBus() [inlined] QDBusDefaultConnection::QDBusDefaultConnection(type=<unavailable>) + 39 at qdbusconnection.cpp:1054
    frame #4: 0x0000000104e73b3f QtDBus`QDBusConnection::sessionBus() [inlined] QDBusDefaultConnection::QDBusDefaultConnection(type=<unavailable>, newValue=<unavailable>) at qdbusconnection.cpp:1064
    frame #5: 0x0000000104e73b3f QtDBus`QDBusConnection::sessionBus() [inlined] (anonymous namespace)::Q_QGS__q_sessionBus::innerFunction() + 41 at qdbusconnection.cpp:1070
    frame #6: 0x0000000104e73b16 QtDBus`QDBusConnection::sessionBus() [inlined] QGlobalStatic<QDBusDefaultConnection, (anonymous namespace)::Q_QGS__q_sessionBus::innerFunction(), (anonymous namespace)::Q_QGS__q_sessionBus::guard>::operator()() at qglobalstatic.h:129
    frame #7: 0x0000000104e73b16 QtDBus`QDBusConnection::sessionBus() + 70 at qdbusconnection.cpp:1084
    frame #8: 0x0000000104cfb003 libqxcb.dylib`DBusConnection::DBusConnection(this=0x0000000104b0d330, parent=<unavailable>) + 131 at dbusconnection.cpp:61
    frame #9: 0x0000000104cf0d2d libqxcb.dylib`QSpiAccessibleBridge::QSpiAccessibleBridge() [inlined] QSpiAccessibleBridge::QSpiAccessibleBridge(this=0x0000000104b0d360) + 78 at bridge.cpp:59
    frame #10: 0x0000000104cf0cdf libqxcb.dylib`QSpiAccessibleBridge::QSpiAccessibleBridge(this=0x0000000104b0d360) + 15 at bridge.cpp:61
    frame #11: 0x0000000104c98ac8 libqxcb.dylib`QXcbIntegration::accessibility(this=0x0000000104a0ae50) const + 40 at qxcbintegration.cpp:385
    frame #12: 0x00000001008e6586 QtGui`QAccessible::updateAccessibility(QAccessibleEvent*) [inlined] platformAccessibility() + 38 at qaccessible.cpp:482
    frame #13: 0x00000001008e656d QtGui`QAccessible::updateAccessibility(QAccessibleEvent*) [inlined] QAccessible::isActive() at qaccessible.cpp:793
    frame #14: 0x00000001008e656d QtGui`QAccessible::updateAccessibility(event=0x00007fff5fbfeb70) + 13 at qaccessible.cpp:863
    frame #15: 0x000000010019c016 QtWidgets`QLabel::setText(this=<unavailable>, text=<unavailable>) + 486 at qlabel.cpp:314
    frame #16: 0x0000000100004839 fontweightissue`Dialog::Dialog(QWidget*) + 2025
    frame #17: 0x000000010000c534 fontweightissue`main + 484
    frame #18: 0x0000000100003bf4 fontweightissue`start + 52

The error message gets printed while stepping out of dbus_bus_get_private.

> 
> How did you start the daemon for that session?

It gets started automatically through launchd.

> Correct, it will complain that it can't autostart because you've got no X 

What is "it" here?

> connection. If you did (ssh -X), then it would autostart without complaining.

Hmm, I usually do ssh -X or I set DISPLAY manually to avoid ssh tunnelling, and never get an automatic DBus launch when logged in remotely. Are you sure that autostart is done on all Linux distributions, regardless of the shell you use?
(I don't think ssh -X actually sets up an X connection other than for the auth handshake?)
Or is it a feature introduced in Qt 5.4?

Either way, DBus on OS X doesn't look at X connections, to my knowledge.

> This is expected behaviour.

Yes, and appreciated when the absence of a DBus session impairs application functionality ... otherwise it's a bit like complaining about the fly being open on a pair of trousers I'm not wearing ;)

R.



More information about the Interest mailing list