thunderbird-bin crashed with Badwindow Error

Bug #257483 reported by none@none.com on 2008-08-13
112
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Medium
thunderbird (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: thunderbird

I simply pressed the launch button from the panel. I got the error almost immediately. Thunderbird started fine the second time.

ProblemType: Crash
Architecture: i386
DistroRelease: Ubuntu 8.10
ExecutablePath: /usr/lib/thunderbird/thunderbird-bin
NonfreeKernelModules: nvidia
Package: thunderbird 2.0.0.16+nobinonly-0ubuntu2
ProcAttrCurrent: unconfined
ProcCmdline: /usr/lib/thunderbird/thunderbird-bin
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 5
SourcePackage: thunderbird
StacktraceTop:
 ?? () from /usr/lib/libgdk-x11-2.0.so.0
 _XError () from /usr/lib/libX11.so.6
 _XReply () from /usr/lib/libX11.so.6
 XQueryTree () from /usr/lib/libX11.so.6
 ?? ()
Title: thunderbird-bin crashed with signal 5 in _XError()
Uname: Linux 2.6.24-19-generic i686
UserGroups: adm admin audio cdrom dialout dip floppy fuse lpadmin plugdev video

StacktraceTop:gdk_x_error (display=0x8088f78, error=0xbf9b1b98)
_XError (dpy=0x8088f78, rep=0x8091278) at ../../src/XlibInt.c:2912
_XReply (dpy=0x8088f78, rep=0xbf9b1c60, extra=0, discard=0) at ../../src/xcb_io.c:419
XQueryTree (dpy=0x8088f78, w=12608381, root=0xbf9b1cf8, parent=0xbf9b1cf4, children=0xbf9b1cf0,
XRemoteClient::CheckChildren (this=0xbf9b1f0c, aWindow=12608381) at XRemoteClient.cpp:300

Changed in thunderbird:
importance: Undecided → Medium

I got this error when sending a file through nautilus.
AMD64

Elliot Hughes (elliot-hughes) wrote :

Traces are all available and relevant information present.

Changed in thunderbird:
status: New → Confirmed

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5

The first time I ran FF3.5 RC, it crashed and I got the following console output:

The program 'firefox-bin' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 681 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.)

Reproducible: Always

Steps to Reproduce:
1. Start FF3.5 after using latest 3.0.x release
2. Observe crash
Actual Results:
Crash.

Expected Results:
No crash.

This started happening with the last beta release.

Dupe of 46057? I am experiencing this as well.

I got this error while opening thunderbird via terminal. I tried it again and it worked...I'm wondering if it had something to do with it's memory of where the default window location was before I upgraded from 9.04 and had a Virtual display set to ~3000 1024.

Not sure though.

Daniel Holbach (dholbach) wrote :

I never had this problem again... hm.

Martin Erik Werner (arand) wrote :

Crash occured when TB tried to check for/update extensions, update window was visible when crash occured, restart worked fine.

I got at least two of these reports on bugzilla.novell.com.
Searching bmo "BadWindow" seems to happen quite often in different trees and products.

Oops, I meat to say possible dupe of bug #460572, and was fixed for me by disabling Compiz. I am no longer seeng this issue with 3.5.1~hg20090629r26036+nobinonly-0ubuntu2~umd1~jaunty.

(In reply to comment #3)
> Oops, I meat to say possible dupe of bug #460572, and was fixed for me by
> disabling Compiz. I am no longer seeng this issue with
> 3.5.1~hg20090629r26036+nobinonly-0ubuntu2~umd1~jaunty.

Did that daily really fix this for you even with compiz enabled? We seem to still get this with 3.5.1 final in karmic (and most likely jaunty?).

Download full text (7.3 KiB)

ubuntu bug: https://bugs.edge.launchpad.net/bugs/401055

Stacktrace with --sync on ffox 3.5.1: http://launchpadlibrarian.net/29324303/StackTraceDebug.txt
...
#2 0x00007fda15006256 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#3 0x00007fda16f503d4 in _XError (dpy=0x7fda1a6ac000, rep=0x7fda1a6b8100) at ../../src/XlibInt.c:2924
        rtn_val = <value optimized out>
        event = {type = 0, xany = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819}, xkey = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, keycode = 32730, same_screen = 1}, xbutton = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, button = 32730, same_screen = 1}, xmotion = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, is_hint = -38 '\332', same_screen = 1}, xcrossing = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, mode = 443252992, detail = 32730, same_screen = 1, focus = 0, state = 550}, xfocus = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, mode = 4256530, detail = 0}, xexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, x = 4256530, y = 0, width = 550, height = 0, count = 443110528}, xgraphicsexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, drawable = 140574715810819, x = 4256530, y = 0, width = 550, height = 0, count = 443110528, major_code = 32730, minor_code = 549}, xnoexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, drawable = 140574715810819, major_code = 4256530, minor_code = 0}, xvisibility = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, state = 4256530}, xcreatewindow = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, parent = 140574715810819, window = 4256530, x = 550, y = 0, width = 443110528, height = 32730, border_width = 549, override_redirect = 0}, xdestroywindow = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530}, xunmap = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, from_configure = 550}, xmap = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, override_redirect = 550}, xmaprequest = {type = 0...

Read more...

Alex, I am not seeing it anymore, and I switched to 3.5.1 final in jaunty instead of the daily build.

my comment from Ubuntu Bug - https://bugs.launchpad.net/ubuntu/+source/firefox-3.5/+bug/401055/comments/4:

band-aid with some debugging output should be available on trunk dailies (firefox-3.6 and xulrunner-1.9.2) in https://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa

  - http://bazaar.launchpad.net/~mozillateam/xulrunner/xulrunner-1.9.2.head/annotate/head%3A/debian/patches/lp401055_bz499498_debug_bandaid.patch

Problem appears to be that XQueryTree somehow gives us a bad window; I haven't looked yet how that can happen or if that indicates a bug in X.

I noticed that i 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.

Created an attachment (id=390216)
1st band-aid patch with some debug output

attaching the patch referred to in comment 7

There's a race condition between getting window XIDs and accessing them.
BadWindow would result if an window being checked has been destroyed.

Created an attachment (id=397329)
patch

*** Bug 460572 has been marked as a duplicate of this bug. ***

Found a nice way to workaround this problem: use the attached script to launch thunderbird instead of the default one.

(From update of attachment 397329)
I see this frequently enough. Requesting approval1.9.2.

Usually I just try again and then it succeeds, but sometimes when opening some
links from KDE applications the failure is repeated; I give up, open a new
window and try again. What's happening is that KDE is putting up a progress
window while determining the mime type, and the remoting process takes long
enough (bug 222051) that there's are reasonable period of time in which the
process can get caught by KDE's window getting destroyed.

Automated testing is difficult, possibly involving X server emulators or
proxies. I tested the patch by adding sleep()s to the code and manually
destroying windows.

I've submitted bug 517133 for a way on getting stats on how often these errors
are happening.

Tbird is suppose to start when my OS starts but this morning it didn't so I pressed its icon in the panel and I got error popup

This is a top crash for us in ubuntu still. Karl, do you see any reason why this shouldn't go to 1.9.1 branch too?

I've been using this for 3 weeks with Firefox 3.5.3 and it has made a world of difference for me. If others are also suffering then this seems a good candidate for 1.9.1.

(From update of attachment 397329)
also requesting approval on 1.9.1 branch. this is the main blocker for us in ubuntu karmic.

(From update of attachment 397329)
Approved for 1.9.1.6, a=dveditz for release-drivers

If this is a topcrash on Ubuntu, it should really block 1.9.2. (And we're taking it on 1.9.1, so if it's not fixed on 1.9.2, it'll be a regression.)

Now a blocker, so you're good to land this on 1.9.2, you can remove the approval request.

Micah Gersten (micahg) on 2009-12-25
summary: - thunderbird-bin crashed with signal 5 in _XError()
+ thunderbird-bin crashed with Badwindow Error
Changed in thunderbird:
status: Unknown → Fix Released
Micah Gersten (micahg) on 2009-12-25
Changed in thunderbird:
milestone: none → 3.0.1
Micah Gersten (micahg) wrote :

Thank you for trying to make Ubuntu better. This has already been fixed upstream and should be released in Thunderbird 3.0.1
Please report any other bugs you may find.

Changed in thunderbird (Ubuntu):
status: Confirmed → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package thunderbird - 3.0.1+nobinonly-0ubuntu1

---------------
thunderbird (3.0.1+nobinonly-0ubuntu1) lucid; urgency=low

  * New upstream release v3.0.1 (THUNDERBIRD_3_0_1_RELEASE)
    - fix LP: #257483 - thunderbird-bin crashed with Badwindow Error
    - fix LP: #499603 - thunderbird-bin crashed with SIGSEGV when trying to
                        Edit as New

  * Fix FTBFS on Sparc by disabling jit (LP: #523627)
    - update debian/rules
  * Drop cairo FTBFS patch after upstream landing
    - drop debian/patches/bz466250_att349521_fix_ftbfs_with_cairo_fb.patch
    - update debian/series
 -- Micah Gersten <email address hidden> Sun, 21 Feb 2010 12:15:33 -0600

Changed in thunderbird (Ubuntu):
status: Triaged → Fix Released
Changed in thunderbird:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.