Closed Bug 316543 Opened 19 years ago Closed 18 years ago

crash [@ mozSpellChecker::mozSpellChecker] when opening message compose window

Categories

(Core :: Spelling checker, defect)

1.8 Branch
x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: ispiked, Assigned: ispiked)

References

()

Details

(Keywords: crash, topcrash, verified1.8.1.8)

Crash Data

Attachments

(1 file, 1 obsolete file)

Observed using a nightly build of SeaMonkey (20051114).

From bug 315934:
When opening mail compose window (such as by clicking the compose button or
reply, or forward ...), Seamonkey crashes instantly.

Reproducible: Always

Steps to Reproduce:
1. Start Seamonkey
2. Start mailnews
3. Click "compose".

Actual Results:  
Crash instantly. TalkBack send report.

Expected Results:  
No crash :)

Occures with a freshly created profile.

Incident ID: 11841826
Stack Signature	mozSpellChecker::mozSpellChecker 9d91bb19
Product ID	MozillaTrunk
Build ID	2005111409
Trigger Time	2005-11-14 13:10:42.0
Platform	Win32
Operating System	Windows NT 5.0 build 2195
Module	spellchk.dll + (000012b3)
URL visited	
User Comments	Opening Compose window
Since Last Crash	15 sec
Total Uptime	15 sec
Trigger Reason	Access violation
Source File, Line No.	c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/extensions/spellcheck/src/mozSpellChecker.cpp, line 58
Stack Trace 	
mozSpellChecker::mozSpellChecker  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/extensions/spellcheck/src/mozSpellChecker.cpp, line 58]
mozSpellCheckerConstructor  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/extensions/spellcheck/src/mozSpellCheckerFactory.cpp, line 63]
CallCreateInstance  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpcom/build/nsComponentManagerUtils.cpp, line 171]
nsEditorSpellCheck::InitSpellChecker  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/composer/src/nsEditorSpellCheck.cpp, line 144]
mozInlineSpellChecker::SetEnableRealTimeSpell  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/extensions/spellcheck/src/mozInlineSpellChecker.cpp, line 174]
XPTC_InvokeByIndex  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcinvoke.cpp, line 102]
XPCWrappedNative::CallMethod  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappednative.cpp, line 2139]
XPC_WN_GetterSetter  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappednativejsops.cpp, line 1468]
js_Invoke  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c, line 1177]
js_InternalInvoke  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c, line 1274]
js_InternalGetOrSet  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c, line 1333]
js_SetProperty  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsobj.c, line 3107]
js_Interpret  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c, line 3360]
js_Invoke  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/jsinterp.c, line 1197]
nsXPCWrappedJSClass::CallMethod  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappedjsclass.cpp, line 1372]
nsXPCWrappedJS::CallMethod  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/js/src/xpconnect/src/xpcwrappedjs.cpp, line 462]
SharedStub  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp, line 147]
nsCommandManager::CommandStatusChanged  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/embedding/components/commandhandler/src/nsCommandManager.cpp, line 115]
nsComposerCommandsUpdater::UpdateOneCommand  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp, line 368]
nsComposerCommandsUpdater::NotifyDocumentCreated  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp, line 83]
nsEditor::PostCreate  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/libeditor/base/nsEditor.cpp, line 354]
nsEditingSession::EndDocumentLoad  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/composer/src/nsEditingSession.cpp, line 1113]
nsEditingSession::OnStateChange  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/editor/composer/src/nsEditingSession.cpp, line 818]
nsDocLoader::FireOnStateChange  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/uriloader/base/nsDocLoader.cpp, line 1214]
nsDocLoader::doStopDocumentLoad  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/uriloader/base/nsDocLoader.cpp, line 848]
nsDocLoader::OnStopRequest  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/uriloader/base/nsDocLoader.cpp, line 665]
nsLoadGroup::RemoveRequest  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/netwerk/base/src/nsLoadGroup.cpp, line 686]
nsBaseChannel::OnStopRequest  [c:/builds/tinderbox/MozillaTrunk/WINNT_5.0_Clobber/mozilla/netwerk/base/src/nsBaseChannel.cpp, line 555]
The Spell Check extension is causing the crash.  Can you uninstall it and try to reproduce?
the code doesn't properly handle GS failing (it crashes...)
Attached patch make the constructor smarter (obsolete) — Splinter Review
Assignee: mscott → ispiked
Status: UNCONFIRMED → ASSIGNED
Attachment #223582 - Flags: review?
Attachment #223582 - Flags: review? → review?(timeless)
Comment on attachment 223582 [details] [diff] [review]
make the constructor smarter

this should work :)

>+mozSpellChecker::Init()
>+  mPersonalDictionary = do_GetService("@mozilla.org/spellchecker/personaldictionary;1",&rv);

I don't consider a lack of a personal dictionary fatal. if you don't have it, that's ok.

>+  mSpellCheckingEngine = do_GetService("@mozilla.org/spellchecker/myspell;1",&rv);
>+  if (NS_FAILED(rv)) {
>+    NS_ERROR("Could not get spell checker");

I don't think we need to NS_ERROR for this.

>+  mSpellCheckingEngine->SetPersonalDictionary(mPersonalDictionary);

note that you don't have to null check mpersonaldictionary for this call (and in the average case i'd hope there is a personal dctionary).

how about another patch with those changes (r=me)
Attachment #223582 - Flags: review?(timeless) → review+
Carrying over +r.
Attachment #223582 - Attachment is obsolete: true
Attachment #223617 - Flags: review+
Attachment #223617 - Flags: superreview?(mscott)
Comment on attachment 223617 [details] [diff] [review]
make the constructor smarter (with comments addressed)

thanks for the patch!
Attachment #223617 - Flags: superreview?(mscott) → superreview+
Whiteboard: [checkin needed]
Patch checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
bug 315934 a dup ?
Comment on attachment 223617 [details] [diff] [review]
make the constructor smarter (with comments addressed)

this patch applies cleanly to both branches and should be taken.
Attachment #223617 - Flags: approval1.8.1.6?
Attachment #223617 - Flags: approval1.8.0.13?
Flags: blocking1.8.1.6?
Flags: blocking1.8.0.13?
This crash does not appear on the talkback lists in 1.5.0.x for Thunderbird, but does show up in Tbird 2.0.0.x
Flags: blocking1.8.0.13? → blocking1.8.0.13-
Attachment #223617 - Flags: approval1.8.0.13? → approval1.8.0.14?
Flags: blocking1.8.1.7? → blocking1.8.1.7+
Comment on attachment 223617 [details] [diff] [review]
make the constructor smarter (with comments addressed)

Approving for 1.8.1.7, a=dveditz for release-drivers
Attachment #223617 - Flags: approval1.8.1.7? → approval1.8.1.7+
Keywords: checkin-needed
Whiteboard: [checkin needed on 1.8 branch]
MOZILLA_1_8_BRANCH:

Checking in extensions/spellcheck/src/mozSpellChecker.cpp;
/cvsroot/mozilla/extensions/spellcheck/src/mozSpellChecker.cpp,v  <--  mozSpellChecker.cpp
new revision: 1.8.6.3; previous revision: 1.8.6.2
done
Checking in extensions/spellcheck/src/mozSpellChecker.h;
/cvsroot/mozilla/extensions/spellcheck/src/mozSpellChecker.h,v  <--  mozSpellChecker.h
new revision: 1.3.46.1; previous revision: 1.3
done
Checking in extensions/spellcheck/src/mozSpellCheckerFactory.cpp;
/cvsroot/mozilla/extensions/spellcheck/src/mozSpellCheckerFactory.cpp,v  <--  mozSpellCheckerFactory.cpp
new revision: 1.4.8.2; previous revision: 1.4.8.1
done
Keywords: checkin-needed
Whiteboard: [checkin needed on 1.8 branch]
Version: Trunk → 1.8 Branch
Keywords: fixed1.8.1.7
verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8pre) Gecko/20071019 Thunderbird/2.0.0.7pre ID:2007101904.
Comment on attachment 223617 [details] [diff] [review]
make the constructor smarter (with comments addressed)

This does not appear in the top 500 crashes for Tbird 1.5, whereas it is currently #13 for Thunderbird 2.0.0.6
Attachment #223617 - Flags: approval1.8.0.14? → approval1.8.0.14-
Crash Signature: [@ mozSpellChecker::mozSpellChecker]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: