On 4/25/07, <b class="gmail_sendername">Phil Thompson</b> <<a href="mailto:phil@riverbankcomputing.co.uk">phil@riverbankcomputing.co.uk</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wednesday 25 April 2007 3:44 pm, Ingmar Steen wrote:<br>> Hi,<br>><br>> I'm trying to use the new PyQt4 dbus mainloop, but it crashes with an<br>> assertion error when I try to get an object from the bus. I'm using Sip
<br>> 4.6, PyQt4.2, Qt 4.2.3, Python 2.5.1, DBus 1.0.2 and dbus-python 0.80.1. Am<br>> I doing something fundamentally insane or wrong?<br>><br>> If I remove the QDBusQtMainLoop(set_as_default=True) line, it works just
<br>> fine. The assertion also happens if app.exec_() and get the bus object from<br>> a QTimer event.<br>><br>> Anybody got any ideas?<br><br>You could try a later version of dbus-python.<br><br>Can you produce a glib version? It that does the same then at least it's not a
<br>PyQt problem.<br><br>Phil</blockquote><div><br>I upgraded dbus-python to 0.80.2 (even rebuilt python, sip and pyqt4 from scratch) with the same result.<br>
<br>
A glib version of the same test application works as expected (as do more complex glib-python-dbus apps).<br></div><br>I've also reviewed the package sources of my distribution's Qt4 and DBus packages... No fancy patches or other magic there. The only thing I can personally think of is that Qt4 is compiled with glib mainloop support (which sort of works, I can use the dbus glib mainloop in PyQt4 apps, but
QCoreApplication.exec_() never quits).<br><br></div>Ingmar<br><br><br>test_glib.py:<br>from dbus.mainloop.glib import DBusGMainLoop<br>import dbus, sys, gobject<br>loop = gobject.MainLoop()<br>DBusGMainLoop(set_as_default = True)
<br>print 'getting bus'; bus = dbus.SystemBus()<br>print 'getting obj'; obj = bus.get_object('org.bluez', '/org/bluez')<br>print 'done'<br><br>output:<br>getting bus<br>getting obj<br>
done<br>