Assertion failure: aPoint.IsSetAndValid(), at /src/editor/libeditor/WSRunObject.cpp:1401

RESOLVED FIXED in Firefox 59

Status

()

defect
P3
normal
RESOLVED FIXED
a year ago
11 months ago

People

(Reporter: tsmith, Assigned: masayuki)

Tracking

(Blocks 1 bug, {assertion, testcase})

59 Branch
mozilla59
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox-esr52 unaffected, firefox57 unaffected, firefox58 unaffected, firefox59 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

a year ago
Posted file testcase.html
Assertion failure: aPoint.IsSetAndValid(), at /src/editor/libeditor/WSRunObject.cpp:1401

#0 mozilla::WSRunObject::GetNextCharPoint(mozilla::EditorDOMPointBase<nsINode*, nsIContent*> const&) /src/editor/libeditor/WSRunObject.cpp:1403:36
#1 mozilla::WSRunObject::GetAsciiWSBounds(short, nsINode*, int, mozilla::dom::Text**, int*, mozilla::dom::Text**, int*) /src/editor/libeditor/WSRunObject.cpp:1545:21
#2 mozilla::WSRunObject::ConvertToNBSP(mozilla::WSRunObject::WSPoint) /src/editor/libeditor/WSRunObject.cpp:1513:3
#3 mozilla::WSRunObject::PrepareToDeleteRangePriv(mozilla::WSRunObject*) /src/editor/libeditor/WSRunObject.cpp:1261:23
#4 mozilla::WSRunObject::PrepareToDeleteRange(mozilla::HTMLEditor*, nsCOMPtr<nsINode>*, int*, nsCOMPtr<nsINode>*, int*) /src/editor/libeditor/WSRunObject.cpp:135:20
#5 mozilla::HTMLEditRules::WillDeleteSelection(mozilla::dom::Selection*, short, short, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:2645:10
#6 mozilla::HTMLEditRules::WillDoAction(mozilla::dom::Selection*, mozilla::RulesInfo*, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:653:14
#7 mozilla::TextEditor::DeleteSelection(short, short) /src/editor/libeditor/TextEditor.cpp:671:24
#8 mozilla::DeleteCommand::DoCommand(char const*, nsISupports*) /src/editor/libeditor/EditorCommands.cpp:791:22
#9 nsControllerCommandTable::DoCommand(char const*, nsISupports*) /src/dom/commandhandler/nsControllerCommandTable.cpp:147:26
#10 nsBaseCommandController::DoCommand(char const*) /src/dom/commandhandler/nsBaseCommandController.cpp:136:25
#11 nsCommandManager::DoCommand(char const*, nsICommandParams*, mozIDOMWindowProxy*) /src/dom/commandhandler/nsCommandManager.cpp:212:22
#12 nsHTMLDocument::ExecCommand(nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsIPrincipal&, mozilla::ErrorResult&) /src/dom/html/nsHTMLDocument.cpp:3282:18
#13 mozilla::dom::HTMLDocumentBinding::execCommand(JSContext*, JS::Handle<JSObject*>, nsHTMLDocument*, JSJitMethodCallArgs const&) /src/obj-firefox/dom/bindings/HTMLDocumentBinding.cpp:849:21
#14 mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /src/dom/bindings/BindingUtils.cpp:3042:13
#15 0x3b8cdf227f10  (<unknown module>)
Flags: in-testsuite?
assertion only.
Priority: -- → P3
Hmm, this is one of existing bug of mutation observer hell.  When we try to replace ASCII whitespaces with an NBSP, the mutation observer removes the inserted NBSP.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
OS: Unspecified → All
Hardware: Unspecified → All
Comment hidden (mozreview-request)

Comment 6

a year ago
mozreview-review
Comment on attachment 8938753 [details]
Bug 1425997 - Don't try to remove whitespaces in WSRunObject::ConvertToNBSP() when the text node is changed by mutation observer

https://reviewboard.mozilla.org/r/209300/#review215120
Attachment #8938753 - Flags: review?(m_kato) → review+

Comment 7

a year ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/900d89625a37
Don't try to remove whitespaces in WSRunObject::ConvertToNBSP() when the text node is changed by mutation observer r=m_kato

Comment 8

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/900d89625a37
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Blocks: 1408227
Flags: in-testsuite? → in-testsuite+
:masayuki, I was looking at the test test_bug1425997.html and noticed that it doesn't test anything, it just as todo_is() calls.  Is there a reason to run this test if we are not actually looking for anything?  Maybe it is looking for a crash or assertions?

https://searchfox.org/mozilla-central/source/editor/libeditor/tests/test_bug1425997.html
Flags: needinfo?(masayuki)
(In reply to Joel Maher ( :jmaher ) (UTC-4) from comment #9)
> :masayuki, I was looking at the test test_bug1425997.html and noticed that
> it doesn't test anything, it just as todo_is() calls.  Is there a reason to
> run this test if we are not actually looking for anything?  Maybe it is
> looking for a crash or assertions?
> 
> https://searchfox.org/mozilla-central/source/editor/libeditor/tests/
> test_bug1425997.html

Yeah, it's testing assertions. If this bug is regressed, it detects with hitting MOZ_ASSERT on debug build.
Flags: needinfo?(masayuki)
You need to log in before you can comment on or make changes to this bug.