Created attachment 28790 [details] StackTraceDebug.txt Forwarding this bug reported for Firefox-3.5 in Ubuntu for Ubuntu reporter Matt Zimmerman: https://bugs.edge.launchpad.net/ubuntu/+source/firefox-3.5/+bug/401055 [Problem] The 'BadWindow' error is not documented as a possible return value for XQueryTree, yet it is being seen in Firefox-3.5 when the browser is launched. [Original Report] I have my default browser set to firefox-3.5, so when apport tries to launch a browser to display the Launchpad bug filing form, it opens firefox-3.5. The problem is that (about 80% of the time), it crashes with a BadWindow error, e.g.: perseus:[~] ubuntu-bug firefox-3.5 perseus:[~] Gdk-ERROR **: The program 'firefox-3.5' received an X Window System error. This probably reflects a bug in the program. The error was 'BadWindow (invalid Window parameter)'. (Details: serial 19 error_code 3 request_code 20 minor_code 0) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.) aborting... If I keep trying, it eventually succeeds. I'm not able to reproduce the problem using "firefox-3.5 about:mozilla" so it may have something to do with the way that apport is invoking it. In analyzing the problem, it appears to be that XQueryTree gives a BadWindow error, although it's unclear why it would do this (no mention of BadWindow in XQueryTree's man page, and grepping through the source code didn't reveal the code path that results in this being issued.) The following patch was applied to firefox to bandaid over the issue: http://bazaar.launchpad.net/~mozillateam/xulrunner/xulrunner-1.9.2.head/annotate/head%3A/debian/patches/lp401055_bz499498_debug_bandaid.patch Asac noticed that he can trigger this more easily by using killall firefox-3.5 rather than shutting it down properly; from that it feels a bit like there is a window not properly removed from X. Others have reported that running 'firefox-3.5 -no-remote' hides the issue. ProblemType: Bug Architecture: amd64 Date: Sat Jul 18 12:19:56 2009 DistroRelease: Ubuntu 9.10 Package: firefox-3.5 3.5.1+build1+nobinonly-0ubuntu1 ProcEnviron: LC_COLLATE=C PATH=(custom, user) LANG=en_US.UTF-8 SHELL=/bin/zsh ProcVersionSignature: Ubuntu 2.6.31-3.19-generic SourcePackage: firefox-3.5 Uname: Linux 2.6.31-3-generic x86_64 Note that the attached stack trace is captured with --sync
On Wed, Aug 19, 2009 at 12:22:24 -0700, bugzilla-daemon@freedesktop.org wrote: > In analyzing the problem, it appears to be that XQueryTree gives a BadWindow > error, although it's unclear why it would do this (no mention of BadWindow in > XQueryTree's man page, and grepping through the source code didn't reveal the > code path that results in this being issued.) > BadWindow is the expected error if QueryTree is called on a nonexistent window, afaict. It's returned from dixLookupWindow(), called from ProcQueryTree() in the server.
(In reply to comment #1) > On Wed, Aug 19, 2009 at 12:22:24 -0700, bugzilla-daemon@freedesktop.org wrote: > BadWindow is the expected error if QueryTree is called on a nonexistent > window, afaict. Okay, then this should be mentioned in the XQueryTree man page. We can consider this bug report solved by an update to the man page. > It's returned from dixLookupWindow(), called from ProcQueryTree() in the > server. Thanks Bryce
Man page fix pushed as c2814a614dc4d9409bfa0f44c18bfd69ad7f7b85
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.