Closed
Bug 252681
Opened 20 years ago
Closed 20 years ago
mozISpellCheckingEngine check method faulting on misspelled words
Categories
(Core :: Spelling checker, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: robert.strong.bugs, Assigned: timeless)
Details
(Keywords: crash)
Attachments
(1 file)
745 bytes,
patch
|
mvl
:
review+
dmosedale
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1+
When using the following javascript - the check method always works with a
correctly spelled word and always faults when passing a misspelled word.
var spellChecker = Components.classes['@mozilla.org/spellchecker/myspell;1']
.createInstance().QueryInterface(Components.interfaces.mozISpellCheckingEngine);
spellChecker.dictionary = "en-US";
alert("two is spelled correctly? " + spellChecker.check("two"));
alert("twoo is spelled correctly? " + spellChecker.check("twoo"));
I have also noticed that the suggest method also faults which is probably related.
Reproducible: Always
Steps to Reproduce:
1. Add this code to an extension
var spellChecker = Components.classes['@mozilla.org/spellchecker/myspell;1']
.createInstance().QueryInterface(Components.interfaces.mozISpellCheckingEngine);
spellChecker.dictionary = "en-US";
alert("two is spelled correctly? " + spellChecker.check("two"));
alert("twoo is spelled correctly? " + spellChecker.check("twoo"));
2. run the code
Actual Results:
check returns true with a correctly spelled word
check faults and closes the application with an incorrectly spelled word
Expected Results:
Return the appropriate value in both cases without faulting.
Faulting application firefox.exe, version 0.9.0.0, faulting module myspell.dll,
version 1.7.20040.62616, fault address 0x00002db9.
Reporter | ||
Comment 1•20 years ago
|
||
Added the following two lines and it resolved my issue.
var persDict = Components.classes['@mozilla.org/spellchecker/personaldictionary;1']
.createInstance().QueryInterface(Components.interfaces.mozIPersonalDictionary);
spellChecker.personalDictionary = persDict;
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: FIXED → ---
Updated•20 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → INVALID
it's a bug. we shouldn't crash.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
js> var spellChecker =
Components.classes['@mozilla.org/spellchecker/myspell;1'].createInstance(Components.interfaces.mozISpellCheckingEngine);
js> spellChecker.dictionary = "en-US";
en-US
js> alert=print
function print() {
[native code]
}
js> alert("two is spelled correctly? " + spellChecker.check("two"));
two is spelled correctly? true
js> alert("twoo is spelled correctly? " + spellChecker.check("twoo"));
twoo is spelled correctly? false
js> quit()
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Attachment #154068 -
Flags: superreview?(tor)
Attachment #154068 -
Flags: review?(mvl)
Comment 4•20 years ago
|
||
Comment on attachment 154068 [details] [diff] [review]
fix
yeah, a personal dictionary should be optional.
Attachment #154068 -
Flags: review?(mvl) → review+
Comment 5•20 years ago
|
||
Comment on attachment 154068 [details] [diff] [review]
fix
sr=dmose
Attachment #154068 -
Flags: superreview?(tor) → superreview+
mozilla/extensions/spellcheck/myspell/src/myspAffixmgr.cpp 1.11
Status: ASSIGNED → RESOLVED
Closed: 20 years ago → 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•