After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580854 - waiter methods are not working as expected
waiter methods are not working as expected
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp2
unspecified
Other Linux
: Normal normal
: ---
Assigned To: LDTP Development Mailing List
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2009-04-30 09:07 UTC by Markus Korn
Modified: 2009-05-05 07:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Markus Korn 2009-04-30 09:07:16 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
Comment 1 Markus Korn 2009-04-30 09:20:20 UTC
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 
Comment 2 Eitan Isaacson 2009-04-30 21:44:43 UTC
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?
Comment 3 Markus Korn 2009-05-01 06:46:01 UTC
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 % 
Comment 4 Markus Korn 2009-05-01 06:59:28 UTC
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__
Comment 5 Eitan Isaacson 2009-05-05 07:19:10 UTC
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.
Comment 6 Eitan Isaacson 2009-05-05 07:33:51 UTC
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.