GNOME Bugzilla – Bug 580854
waiter methods are not working as expected
Last modified: 2009-05-05 07:33:51 UTC
In the attached screencast I'm running the gedit example of ldtp2 on my eeepc, a relatively slow device. As you can see the gedit.py script finishes before the UI of gedit is closed. So for me it looks like the waittillguinotexist() method is not working correctly. I'm using an up-to-date checkout of the ldtp2 git branch. Let me know if you need further information to debug this. Markus
Unfortunately there seems to be a size limit for attachments here, so I uploaded this file to http://dl.getdropbox.com/u/174479/ldtp2_waiter_eeepc.ogv Markus
I think something is wrong with gedit, or the test. I get a defunct gedit process after running the test, and ldtpd is still around, it is supposed to go away. Do you see the same thing with the gcalctool test?
Yes, I can confirm this: markus@thekorn ~/devel/ldtp/ldtp2/trunk % LANG=C PYTHONPATH="." python examples/gedit.py markus@thekorn ~/devel/ldtp/ldtp2/trunk % (gedit:5289): Gtk-CRITICAL **: gtk_button_leave: assertion `GTK_IS_BUTTON (button)' failed markus@thekorn ~/devel/ldtp/ldtp2/trunk % ps aux|grep gedit 149:markus 5289 13.6 0.0 0 0 pts/2 Z 08:42 0:01 [gedit] <defunct> 151:markus 5293 0.0 0.0 7532 912 pts/2 S+ 08:42 0:00 grep -n --color=auto gedit markus@thekorn ~/devel/ldtp/ldtp2/trunk % ps aux|grep ldtp 148:markus 5286 6.5 1.4 241004 28752 pts/2 S 08:42 0:01 python -c import ldtpd; ldtpd.main() 151:markus 5296 0.0 0.0 7532 912 pts/2 S+ 08:42 0:00 grep -n --color=auto ldtp markus@thekorn ~/devel/ldtp/ldtp2/trunk %
Hmm, you are killing the ldtpd deamon on the client side in Transport.__del__ As you can see on [0] there are some circumstances where __del__ is not invoked. A safer way would be to use `atexit.register(self.kill_deamon)` here. I changed your code like this, and the ldtpd process is gone after running the gedit test, but there is still a defunct gedit process [0] http://docs.python.org/reference/datamodel.html#object.__del__
Thanks for that! I had no idea atexit.register existed. I was looking for a way to run code when the interpreter exits, that is it. Please try HEAD, and tell me if this issue is resolved. As for the defunct process, it is natural since we never do a wait(), but I am OK with that.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.