Closed Bug 1051173 Opened 5 years ago Closed 3 years ago

crash in nsEditorSpellCheck::CheckCurrentDictionary()

Categories

(Core :: Spelling checker, defect, critical)

defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 1056322

People

(Reporter: nmaier, Unassigned)

References

()

Details

(Keywords: crash, testcase)

Crash Data

This bug was filed from the Socorro interface and is 
report bp-a4e7eb4b-f2d3-4798-b2c4-7e1cc2140809.
=============================================================

STR:
Run the following:
var editorSpellCheck = Cc["@mozilla.org/editor/editorspellchecker;1"].createInstance(Ci.nsIEditorSpellCheck);
editorSpellCheck.checkCurrentDictionary();

A cursorary check reveals that the crash seems to happen because |::mSpellChecker| was not initialized and that particular method lacks a |NS_ENSURE_TRUE(mSpellChecker, NS_ERROR_NOT_INITIALIZED);| check (that other methods use).

"Found" via StackOverflow, see URL.
bp-a4e7eb4b-f2d3-4798-b2c4-7e1cc2140809
 0 	XUL	nsEditorSpellCheck::CheckCurrentDictionary()	editor/composer/src/nsEditorSpellCheck.cpp
1 	XUL	NS_InvokeByIndex	xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_unix.cpp
2 	XUL	XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)	js/xpconnect/src/XPCWrappedNative.cpp 

right in the beginning of the method...
mail@78229 624 NS_IMETHODIMP
mail@78229 625 nsEditorSpellCheck::CheckCurrentDictionary()
mail@78229 626 {
mail@78229 627 mSpellChecker->CheckCurrentDictionary(); 

example windows crash...
bp-fa1181c9-36e0-4b54-8966-68dd22140808 kekc " Tried to call checkCurrentDictionary() in nsIEditorSpellCheck from an addon. Seems to crash the FF immediately."
Keywords: testcase
Crash Signature: [@ nsEditorSpellCheck::CheckCurrentDictionary()] → [@ nsEditorSpellCheck::CheckCurrentDictionary()] [@ nsEditorSpellCheck::CheckCurrentDictionary]
duplicate of bug 1056322?
Flags: needinfo?(m_kato)
(In reply to Wayne Mery (:wsmwk, NI for questions) from comment #2)
> duplicate of bug 1056322?

Yes.  Spell check should be initialized.
Flags: needinfo?(m_kato)
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1056322
You need to log in before you can comment on or make changes to this bug.