GNOME Bugzilla – Bug 654856
GtkFileChooserDialog breaks LDTP
Last modified: 2018-09-11 19:53:26 UTC
When a window shows a GtkFileChooserDialog, LDTP can't seem to correctly list the set of windows anymore. I'm testing with GTK+ 3.1.8-0ubuntu4 and LDTP 2.1.1-2ubuntu1. I've attached test scripts to demonstrate the problem. Run them like: python test.py & python testldtp.py and Ctrl+C when done. You should be able to see the progression. We first start with a normal window, then a child window as a control group, then we switch to a file chooser dialog. ldtp.getwindowlist() returns contents for all those states except when the file chooser dialog is present. When that happens, this message is printed and ldtp seems to stop working: /usr/lib/pymodules/python2.7/ldtpd/waiters.py:65: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed gtk.main()
Created attachment 192200 [details] test script
Created attachment 192201 [details] LDTP test script
This works fine with Ubuntu 11.04, let me check with 11.10 [] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] []
Did you ever get a chance to try it on Ubuntu 11.10?
(In reply to comment #4) > Did you ever get a chance to try it on Ubuntu 11.10? Michael, I forgot to update the bug, I tried on 11.10, but starting ldtp instance separately and the script separately and it worked, let me now try without ldtp instance running on different terminal and update the bug. Thanks
I got this when I ran just the test.py and testldtp.py: [] [] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent', 'frmTestChild'] ** (-c:2017): WARNING **: AT-SPI: Error in GetItems, sender=(null), error=Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent', 'frmTestChild'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent', 'dlgTestChooser'] /usr/local/lib/python2.7/dist-packages/ldtpd/waiters.py:65: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed gtk.main() ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent', 'dlgTestChooser'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] ['frmTestParent'] [] [] [] I tried running from VMware Workstation VM, does that matter ? For the current release it doesn't support opengl, so we can't run the test in Unity, its metacity. Thanks
Sorry, I should have mentioned what I am getting from the scripts, I just said it "stopped working". I get the same as you up to when the chooser dialog appears: ... ['frmTestParent'] ['frmTestParent', 'dlgTestChooser'] /usr/local/lib/python2.7/dist-packages/ldtpd/waiters.py:65: Warning: g_object_unref: assertion `G_IS_OBJECT (object)' failed gtk.main() # === long break here until chooser dialog goes away === ['frmTestParent'] # === long break here until chooser dialog goes away === [] [] [] ... It looks like your warning doesn't screw your ldtp up as much as mine (though it does a little bit -- you only get about 6 printouts when the chooser is up instead of the expected ~10). I am running in Unity, but I (perhaps naively) wouldn't imagine that would affect this.
Ahem. My second in-line comment about breaks should have been: # === long break here until parent dialog goes away ===
Michael, till today's update on Ubuntu 11.10: nags@nags-laptop:~/Downloads$ python test.py Traceback (most recent call last):
+ Trace 228927
GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 10, show_child, None)
nags@nags-laptop:~/Downloads$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 11.10 Release: 11.10 Codename: oneiric do I miss something ? Thanks
Created attachment 200183 [details] test script2 Whoops, syntax seems to have changed. Here's a fixed script. I still get the odd behavior.
Still fails for me on precise (not every single time, but most of the time).
Unfortunately, I could not reproduce the issue on Ubuntu 11.10 / 12.04 (with today's update). For me, the script exits gracefully. Additional note: Ubuntu 11.10 is host system, Ubuntu 12.04 is VM. Thanks
LDTP has moved to Github. If the problem reported in this GNOME Bugzilla ticket still exists in a recent LDTP version, please feel free to report the issue at https://github.com/ldtp/ldtp2/issues Thanks for your understanding and we apologize for the inconvenience!