Closed Bug 344184 Opened 19 years ago Closed 19 years ago

Crash [@ FindNextNode] with this testcase in designMode

Categories

(Core :: Spelling checker, defect)

x86
Windows XP
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: roc)

References

Details

(5 keywords)

Crash Data

Attachments

(2 files)

See upcoming testcase. When clicking inside the iframe of the testcase, current trunk builds of Mozilla crash. I haven't been able to get it crash on current 1.8.1 branch builds. Talkback ID: TB20804012G FindNextNode mozInlineSpellWordUtil::BuildSoftText nsGlobalWindow::QueryInterface gMidasParamTable This regressed between 2006-07-03 and 2006-07-04, indicating a regression from bug 339066.
Attached file testcase
Mozilla crashes when clicking inside of the iframe. You need to view the testcase locally, because of the use of enhanced privileges. (the testcase is doing some odd things)
Crashes at FindNextNode are the top crash for the 1.8 branch. Not sure if they're this bug or not, though.
Flags: blocking1.8.1?
Keywords: topcrash
It looks like we're dealing with a corrupt DOM. We find a SELECT element in the tree which has a null parent. This may have something to do with the fact that the testcase puts HTML content inside a <textarea>, which is pretty disturbing. If so, I suspect this is not the main cause of reported FindNextNode crashes.
Okay, we're crashing because mozInlineSpellChecker is remembering the last caret position as being at the <select> element, which has been removed. We try to find the word it's a part of, which doesn't work because it's not in the DOM anymore.
Attached patch fixSplinter Review
Check if the "old caret position" content node is still in the DOM. If it is not, then we can just stop. I think a better way to fix this would be to avoid caching mCurrentSelectionAnchorNode, but that might require changes to nsIEditor APIs, so I'll go with this for now. Also it seems to me that spellchecking could be confused by changes due to DOM API calls. We need to dig into this when brettw's back. This actually could be the cause of various crashes, it's not really related to funky HTML inside textareas.
Assignee: mscott → roc
Status: NEW → ASSIGNED
Attachment #229210 - Flags: superreview?
Attachment #229210 - Flags: review?
Robert, did you mean to ask review on the patch?
Flags: blocking1.8.1? → blocking1.8.1+
Comment on attachment 229210 [details] [diff] [review] fix errrr yeah
Attachment #229210 - Flags: superreview?(mscott)
Attachment #229210 - Flags: superreview?
Attachment #229210 - Flags: review?(mscott)
Attachment #229210 - Flags: review?
Depends on: 344729
No longer depends on: 344729
Attachment #229210 - Flags: superreview?(mscott)
Attachment #229210 - Flags: superreview+
Attachment #229210 - Flags: review?(mscott)
Attachment #229210 - Flags: review+
*** Bug 344729 has been marked as a duplicate of this bug. ***
Can someone check this in for me? I am about to board a plane.
Tree is closed until at least 7/15/2006, 6pm, see http://weblogs.mozillazine.org/it/
Whiteboard: [checkin needed]
Alright, I guess I'll check this in myself now that I'm in CA and have Internet access :-)
Checking in mozInlineSpellChecker.cpp; /cvsroot/mozilla/extensions/spellcheck/src/mozInlineSpellChecker.cpp,v <-- moz InlineSpellChecker.cpp new revision: 1.19; previous revision: 1.18 done Checking in mozInlineSpellWordUtil.h; /cvsroot/mozilla/extensions/spellcheck/src/mozInlineSpellWordUtil.h,v <-- mozI nlineSpellWordUtil.h new revision: 1.2; previous revision: 1.1 done I just checked the patch into trunk, since I heard of your laptop problems (and ispiked said you wouldn't mind).
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Comment on attachment 229210 [details] [diff] [review] fix need this crash fix on branch
Attachment #229210 - Flags: approval1.8.1?
Flags: blocking1.8.0.6?
Flags: blocking1.8.0.6?
Comment on attachment 229210 [details] [diff] [review] fix a=dbaron on behalf of drivers. Please check in to MOZILLA_1_8_BRANCH and mark fixed1.8.1 once you have done so.
Attachment #229210 - Flags: approval1.8.1? → approval1.8.1+
verified with Windows 2.0b2 build of 20060821
Crash Signature: [@ FindNextNode]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: