Closed Bug 341592 Opened 18 years ago Closed 18 years ago

Crash on first start of Sunbird - "Failed to get the script language"

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
critical

Tracking

()

VERIFIED FIXED

People

(Reporter: mattwillis, Assigned: markh)

References

Details

(Keywords: crash, regression, topcrash)

Attachments

(2 files, 2 obsolete files)

On first launch of Sunbird, it crashes with the following:

###!!! ASSERTION: preserved wrapper table not empty at shutdown: 'sPreservedWrapperTable.ops == 0', file /Users/mwillis/moz/tree2/mozilla/dom/src/base/nsDOMClassInfo.cpp, line 3683
WARNING: nsExceptionService ignoring thread destruction after shutdown: file /Users/mwillis/moz/tree2/mozilla/xpcom/base/nsExceptionService.cpp, line 191
Failed to load jar:file:///Users/mwillis/moz/tree2/mozilla/obj-i386-apple-darwin8.6.2/dist/SunbirdDebug.app/Contents/MacOS/chrome/calendar.jar!/content/calendar/hiddenWindow.js
###!!! ASSERTION: Failed to get the script language: 'Error', file /Users/mwillis/moz/tree2/mozilla/dom/src/base/nsDOMScriptObjectFactory.cpp, line 187
###!!! ASSERTION: Failed to hold the script object: 'Error', file ../../../../dist/include/dom/nsDOMScriptObjectHolder.h, line 80
###!!! ASSERTION: You can't dereference a NULL nsCOMPtr with operator->().: 'mRawPtr != 0', file ../../../../dist/include/xpcom/nsCOMPtr.h, line 849
copy/paste of bz's debugging
Attached patch Patch as described. (obsolete) — Splinter Review
The problem here is that we attempt to get a script-language during shutdown, for the purposes of freeing/unrooting a JS object.

I'm attaching a patch that addresses this.  It involves not relying on do_GetService(), but instead keeping a reference to (the singleton) nsDOMScriptObjectFactory, and cleaning this up in the (new, static) Shutdown method.

Note that this patch does not touch the other cleanup done by the xpcom shutdown observer.  The fact this code attempts to use services implies that it may not be working as expected - however, I am leaving that alone and only addressing the specific error identified in this report.
Attachment #225667 - Flags: review?(mrbkap)
Assignee: general → mhammond
Attachment #225667 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #225673 - Flags: review?(mrbkap)
Attachment #225667 - Flags: review?(mrbkap)
Um...  So _do_ we need the extra ref?  The old code cleared mLanguageArray in a shutdown observer; does just moving that to the destructor, without the rest of this patch, not help?
Attachment #225673 - Attachment is obsolete: true
Attachment #225678 - Flags: review?(bzbarsky)
Attachment #225673 - Flags: review?(mrbkap)
Comment on attachment 225678 [details] [diff] [review]
new patch after being hit with the clue-stick

Ok, good.  ;)
Attachment #225678 - Flags: superreview+
Attachment #225678 - Flags: review?(bzbarsky)
Attachment #225678 - Flags: review+
Checked in - lilmatt, please verify if you can.

Checking in nsDOMScriptObjectFactory.cpp;
new revision: 1.13; previous revision: 1.12
Checking in nsDOMScriptObjectFactory.h;
new revision: 1.5; previous revision: 1.4
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Depends on: 341700
We're still seeing this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Blocks: 342025
This is a topcrash for Firefox trunk (bug 342025).
Flags: blocking1.9a1?
Keywords: topcrash
Flags: blocking1.9a1? → blocking1.9a1+
I backed out that patch to fix bug 341700.  Please see comments there explaining what the issue was....
I just checked in a patch in bug 342025 which should hopefully stop this crash.  Please confirm (or deny) that you no longer see crashes here.
(In reply to comment #12)
> I just checked in a patch in bug 342025 which should hopefully stop this crash.
>  Please confirm (or deny) that you no longer see crashes here.

Confirming!

Thank you!

-> FIXED (based on patch from bug 342025)
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Verified fixed in
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060718 Sunbird/0.3a2+

-> VERIFIED
Status: RESOLVED → VERIFIED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: