ASSERTION: JoinNode called with node not listed in offset table while editing HTML email in GMail

RESOLVED FIXED in mozilla1.9beta3

Status

()

Core
Editor
RESOLVED FIXED
11 years ago
7 years ago

People

(Reporter: roc, Assigned: cpearce)

Tracking

({assertion})

Trunk
mozilla1.9beta3
x86
All
assertion
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

###!!! ASSERTION: JoinNode called with node not listed in offset table.: '0', file /Users/roc/mozilla-checkin/mozilla/editor/txtsvc/src/nsTextServicesDocument.cpp, line 2630

This assertion fires on and off when I edit HTML email in GMail.

I wonder if it's associated with extremely frequent crashes I'm getting using GMail on latest (2-day-old) trunk.

Comment 1

10 years ago
Another STR:
1. load http://www.mozilla.org/editor/midasdemo/
2. select some of the text on the page and copy (CTRL+C)
3. click on the midas control
4. paste (CTRL+V) twice
OS: Mac OS X → All
(Assignee)

Comment 2

10 years ago
Created attachment 290265 [details] [diff] [review]
Patch v1

Ok, the problem is that nsTextServicesDocument::JoinNodes() is returning failure when it tries to merge two nodes that aren't stored in its OffsetTable. However the OffsetTable is never initialized, so there's no entry for that node in the OffsetTable. Other things like nsTextServicesDocument::DeleteNode() just return NS_OK when they're called and they don't have an entry in the OffsetTable, so I think it's safe to just match that behaviour and do nothing and return NS_OK.

If we do the above another assertion fires in mozilla/extensions/spellcheck/src/mozInlineSpellChecker.cpp, line 213. This is caused by nsHTMLEditRules::AfterEditInner() not updating its range correctly before calling HandleInlineSpellCheck(), so this patch fixes that too.
Assignee: nobody → chris
Status: NEW → ASSIGNED
Attachment #290265 - Flags: review?(roc)
Comment on attachment 290265 [details] [diff] [review]
Patch v1

Looks OK to me but peterv really needs to review it
Attachment #290265 - Flags: superreview+
Attachment #290265 - Flags: review?(roc)
Attachment #290265 - Flags: review?(peterv)
Attachment #290265 - Flags: review?(peterv) → review+
(Assignee)

Comment 4

10 years ago
Setting blocking1.9? because this bug is caused by document-change ranges not being setup correctly in editor transactions, and could potentially cause other problems. I've seen this assertion fire in at least one other bug.
Flags: blocking1.9?
Comment on attachment 290265 [details] [diff] [review]
Patch v1

Fix assertion.
Attachment #290265 - Flags: approval1.9?

Updated

10 years ago
Attachment #290265 - Flags: approval1.9? → approval1.9+
Keywords: checkin-needed
Checking in editor/libeditor/html/nsHTMLEditRules.cpp;
/cvsroot/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp,v  <--  nsHTMLEditRules.cpp
new revision: 1.343; previous revision: 1.342
done
Checking in editor/txtsvc/src/nsTextServicesDocument.cpp;
/cvsroot/mozilla/editor/txtsvc/src/nsTextServicesDocument.cpp,v  <--  nsTextServicesDocument.cpp
new revision: 1.63; previous revision: 1.62
done
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M11
Keywords: assertion

Updated

10 years ago
Depends on: 432225

Updated

10 years ago
Depends on: 429118
(Assignee)

Updated

7 years ago
Flags: blocking1.9?
You need to log in before you can comment on or make changes to this bug.