QtDBus error only on some raspberries

  • Hi all,
    I hope to explain this error well.
    I develop a mqtt application that simply converts messages from/to dbus and send/receive to the mqtt broker.
    I'm using mosquitto as mqtt library that starts a thread to listen for incoming messages from the broker; so I simply emit a signal in the mosquitto callback called when a mqtt message arrive. This signal is relayed to dbus using a QtDbuAbstractAdaptor.

    This application runs on Raspbian Jessie with Qt 5.7 crosscompiled.

    The problem is that on the raspberry that I use for development the application runs well, but on others, with exactly same image of development one, it gave me this error:

    QtDBus: cannot relay signals from parent QObject(0x1547228 "") unless they are emitted in the object's thread QThread(0x153dff8 ""). Current thread is QThread(0x74c02ba8 "").
    *** Error in `./mqtt': munmap_chunk(): invalid pointer: 0x7efec618 ***

    I think the problem is caused by the receiver thread that emit a signal, but I'm not sure. But the real question is: why this problem comes only on some raspberries. Any ideas of what can I do?
    Thanks in advanced

  • Lifetime Qt Champion


    Are you sure that these RaspberryPis are using the same software stack as yours ?

  • I think yes, the images are exactly the same.
    I checked only libraries linked to the application: mosquitto and qt are same version.

  • Lifetime Qt Champion

    Then check also the DBus installation.

  • @SGaist you're right: I forgot to update dbus installation on the release image.
    Now all works well!
    Thank you so much.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.