Last Comment Bug 419035 - [1.8 branch only] "Random" crash when I want to display a mail
: [1.8 branch only] "Random" crash when I want to display a mail
: fixed1.8.1.13
Product: Thunderbird
Classification: Client Software
Component: General (show other bugs)
: 2.0
: x86 Linux
-- normal (vote)
: ---
Assigned To: Magnus Melin
Depends on:
  Show dependency treegraph
Reported: 2008-02-22 05:57 PST by Steven Demierre
Modified: 2008-04-23 16:58 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Stack trace (105.90 KB, text/plain)
2008-02-22 05:59 PST, Steven Demierre
no flags Details
proposed fix (1.16 KB, patch)
2008-02-28 12:28 PST, Magnus Melin
tony: review+
dveditz: approval1.8.1.13+
Details | Diff | Splinter Review

Description User image Steven Demierre 2008-02-22 05:57:20 PST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20080129 Iceweasel/ (Debian-
Build Identifier: (sorry, no build identifier...)

The problem appears with Icedove, the Debian branded version of Thunderbird (but i think the error is more general, likely afflicting the whole Mozilla suite)

When i single-click on some mails to display them, Thunderbird crashes with Sigsegv.
I've attached gdb and traced the error down to line nr. 864 in mozilla/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp (version 
The variable gMonitor is NULL, because the call on line 841 fails and so gMonitor is never initialized.

I don't know yet why the init() call fails, but probably, gMonitor should be chechked for NULL in the destructor anyway.

Reproducible: Sometimes

Steps to Reproduce:
1. Open Thunderbird
2. Click on an email in the main window
3. -> Crash

I can fix this problem for some minutes/hours by reinstalling Thunderbird with my package manager, but then it happens again (and for all mails until i reinstall it).

The bug is the same as
Comment 1 User image Steven Demierre 2008-02-22 05:59:21 PST
Created attachment 304978 [details]
Stack trace
Comment 2 User image Steven Demierre 2008-02-27 01:07:28 PST
The bug disappears when i disable the Lightning extension (Version 0.7).
However, this is not really a solution, as i want to have Lightning enabled.
Comment 3 User image Magnus Melin 2008-02-27 11:36:15 PST
I wonder if  PR_DestroyMonitor should null-check...
Comment 4 User image Magnus Melin 2008-02-28 12:24:25 PST
timeless tells me nspr requires that you not pass null.

The code is very different on trunk, I don't think the crash is an issue there.
Comment 5 User image Magnus Melin 2008-02-28 12:28:02 PST
Created attachment 306349 [details] [diff] [review]
proposed fix

How does this look? it would be null at least if Init() failed early.
Comment 6 User image Tony Chang (Google) 2008-02-28 12:47:29 PST
Comment on attachment 306349 [details] [diff] [review]
proposed fix

I think that's fine, but it would be nice to know why this is happening.  Once we know why, we could add a comment explaining why we need this check.
Comment 7 User image Steven Demierre 2008-02-28 13:40:35 PST
I'll try to do some more debugging tomorrow and maybe i can tell you, why it happens. 
Comment 8 User image Daniel Veditz [:dveditz] 2008-02-29 16:13:37 PST
Comment on attachment 306349 [details] [diff] [review]
proposed fix

approved for, a=dveditz,dmose for release-drivers
Comment 9 User image Magnus Melin 2008-03-01 03:15:03 PST
Checked in on the 1.8 branch:

Checking in toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp;
/cvsroot/mozilla/toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp,v  <--  nsUrlClassifierDBService.cpp
new revision:; previous revision:
Comment 10 User image Al Billings [:abillings] 2008-04-23 16:58:37 PDT
Is there a repro case that I or someone else in QA can run for this? It is otherwise difficult to verify the fix for the release.

Note You need to log in before you can comment on or make changes to this bug.