Assertion failure: !node->IsContainerNode() || node->Length() == static_cast<uint32_t>(offset) ... [@ mozilla::EditorBase::InsertTextImpl]

RESOLVED FIXED in Firefox 58

Status

()

Core
Editor
RESOLVED FIXED
15 days ago
12 days ago

People

(Reporter: tsmith, Assigned: masayuki)

Tracking

(Blocks: 1 bug, {assertion, testcase})

58 Branch
mozilla58
assertion, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

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

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(2 attachments)

(Reporter)

Description

15 days ago
Created attachment 8926009 [details]
testcase.html

Assertion failure: !node->IsContainerNode() || node->Length() == static_cast<uint32_t>(offset) || node->GetChildAt(offset) == *aInOutChildAtOffset (|child| must be a child node at |offset| in |node| unless it's a text or some other data node, or after the last child), at /src/editor/libeditor/EditorBase.cpp:2519

#0 mozilla::EditorBase::InsertTextImpl(nsTSubstring<char16_t> const&, nsCOMPtr<nsINode>*, nsCOMPtr<nsIContent>*, int*, nsIDocument*) /src/editor/libeditor/EditorBase.cpp:2561:54
#1 mozilla::WSRunObject::InsertText(nsTSubstring<char16_t> const&, nsCOMPtr<nsINode>*, nsCOMPtr<nsIContent>*, int*, nsIDocument*) /src/editor/libeditor/WSRunObject.cpp:380:16
#2 mozilla::HTMLEditRules::WillInsertText(EditAction, mozilla::dom::Selection*, bool*, bool*, nsTSubstring<char16_t> const*, nsTSubstring<char16_t>*, int) /src/editor/libeditor/HTMLEditRules.cpp:1488:24
#3 mozilla::HTMLEditRules::WillDoAction(mozilla::dom::Selection*, mozilla::RulesInfo*, bool*, bool*) /src/editor/libeditor/HTMLEditRules.cpp:645:14
#4 mozilla::TextEditor::InsertText(nsTSubstring<char16_t> const&) /src/editor/libeditor/TextEditor.cpp:669:24
#5 mozilla::InsertPlaintextCommand::DoCommandParams(char const*, nsICommandParams*, nsISupports*) /src/editor/libeditor/EditorCommands.cpp:1102:22
#6 nsControllerCommandTable::DoCommandParams(char const*, nsICommandParams*, nsISupports*) /src/dom/commandhandler/nsControllerCommandTable.cpp:162:26
#7 nsBaseCommandController::DoCommandWithParams(char const*, nsICommandParams*) /src/dom/commandhandler/nsBaseCommandController.cpp:152:25
#8 nsCommandManager::DoCommand(char const*, nsICommandParams*, mozIDOMWindowProxy*) /src/dom/commandhandler/nsCommandManager.cpp:210:29
#9 nsHTMLDocument::ExecCommand(nsTSubstring<char16_t> const&, bool, nsTSubstring<char16_t> const&, nsIPrincipal&, mozilla::ErrorResult&) /src/dom/html/nsHTMLDocument.cpp:3372:18
#10 mozilla::dom::HTMLDocumentBinding::execCommand(JSContext*, JS::Handle<JSObject*>, nsHTMLDocument*, JSJitMethodCallArgs const&) /src/obj-firefox/dom/bindings/HTMLDocumentBinding.cpp:891:21
#11 mozilla::dom::GenericBindingMethod(JSContext*, unsigned int, JS::Value*) /src/dom/bindings/BindingUtils.cpp:3040:13
#12 js::CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&) /src/js/src/jscntxtinlines.h:291:15
#13 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:472:16
#14 InternalCall(JSContext*, js::AnyInvokeArgs const&) /src/js/src/vm/Interpreter.cpp:521:12
#15 Interpret(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:3061:18
#16 js::RunScript(JSContext*, js::RunState&) /src/js/src/vm/Interpreter.cpp:422:12
#17 js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct) /src/js/src/vm/Interpreter.cpp:494:15
#18 InternalCall(JSContext*, js::AnyInvokeArgs const&) /src/js/src/vm/Interpreter.cpp:521:12
#19 js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>) /src/js/src/vm/Interpreter.cpp:540:10
#20 JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /src/js/src/jsapi.cpp:3032:12
#21 mozilla::dom::EventHandlerNonNull::Call(JSContext*, JS::Handle<JS::Value>, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&) /src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260:37
#22 void mozilla::dom::EventHandlerNonNull::Call<nsISupports*>(nsISupports* const&, mozilla::dom::Event&, JS::MutableHandle<JS::Value>, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JSCompartment*) /src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362:12
#23 mozilla::JSEventHandler::HandleEvent(nsIDOMEvent*) /src/dom/events/JSEventHandler.cpp:215:12
#24 mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) /src/dom/events/EventListenerManager.cpp:1118:51
#25 mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) /src/dom/events/EventListenerManager.cpp:1293:20
#26 mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /src/dom/events/EventDispatcher.cpp:313:17
#27 mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /src/dom/events/EventDispatcher.cpp:462:16
#28 mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /src/dom/events/EventDispatcher.cpp:826:9
#29 nsDocumentViewer::LoadComplete(nsresult) /src/layout/base/nsDocumentViewer.cpp:1064:7
#30 nsDocShell::EndPageLoad(nsIWebProgress*, nsIChannel*, nsresult) /src/docshell/base/nsDocShell.cpp:7765:21
#31 nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7563:7
#32 non-virtual thunk to nsDocShell::OnStateChange(nsIWebProgress*, nsIRequest*, unsigned int, nsresult) /src/docshell/base/nsDocShell.cpp:7460:13
#33 nsDocLoader::DoFireOnStateChange(nsIWebProgress*, nsIRequest*, int&, nsresult) /src/uriloader/base/nsDocLoader.cpp:1321:3
#34 nsDocLoader::doStopDocumentLoad(nsIRequest*, nsresult) /src/uriloader/base/nsDocLoader.cpp:862:14
#35 nsDocLoader::DocLoaderIsEmpty(bool) /src/uriloader/base/nsDocLoader.cpp:751:9
#36 nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:633:5
#37 non-virtual thunk to nsDocLoader::OnStopRequest(nsIRequest*, nsISupports*, nsresult) /src/uriloader/base/nsDocLoader.cpp:489:14
#38 mozilla::net::nsLoadGroup::RemoveRequest(nsIRequest*, nsISupports*, nsresult) /src/netwerk/base/nsLoadGroup.cpp:629:28
#39 nsDocument::DoUnblockOnload() /src/dom/base/nsDocument.cpp:9376:18
#40 nsDocument::UnblockOnload(bool) /src/dom/base/nsDocument.cpp:9298:9
#41 nsDocument::DispatchContentLoadedEvents() /src/dom/base/nsDocument.cpp:5688:3
#42 mozilla::detail::RunnableMethodImpl<nsDocument*, void (nsDocument::*)(), true, (mozilla::RunnableKind)0>::Run() /src/obj-firefox/dist/include/nsThreadUtils.h:1192:13
#43 mozilla::SchedulerGroup::Runnable::Run() /src/xpcom/threads/SchedulerGroup.cpp:396:25
#44 nsThread::ProcessNextEvent(bool, bool*) /src/xpcom/threads/nsThread.cpp:1037:14
#45 NS_ProcessNextEvent(nsIThread*, bool) /src/xpcom/threads/nsThreadUtils.cpp:513:10
#46 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:97:21
#47 MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#48 MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#49 nsBaseAppShell::Run() /src/widget/nsBaseAppShell.cpp:158:27
#50 XRE_RunAppShell() /src/toolkit/xre/nsEmbedFunctions.cpp:877:22
#51 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) /src/ipc/glue/MessagePump.cpp:269:9
#52 MessageLoop::RunInternal() /src/ipc/chromium/src/base/message_loop.cc:326:10
#53 MessageLoop::Run() /src/ipc/chromium/src/base/message_loop.cc:299:3
#54 XRE_InitChildProcess(int, char**, XREChildData const*) /src/toolkit/xre/nsEmbedFunctions.cpp:703:34
#55 content_process_main(mozilla::Bootstrap*, int, char**) /src/browser/app/../../ipc/contentproc/plugin-container.cpp:63:30
#56 main /src/browser/app/nsBrowserApp.cpp:280:18
#57 __libc_start_main /build/glibc-bfm8X4/glibc-2.23/csu/../csu/libc-start.c:291
#58 _start (firefox+0x41ebe4)
Flags: in-testsuite?
INFO: Last good revision: f2b1253de1e684d57290ba086fc57e300870a91b
INFO: First bad revision: fdb1abbe808a069d2b6ca4ae7ed98969a3fb7314
INFO: Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=f2b1253de1e684d57290ba086fc57e300870a91b&tochange=fdb1abbe808a069d2b6ca4ae7ed98969a3fb7314
Blocks: 1406482
Has Regression Range: --- → yes
status-firefox56: --- → unaffected
status-firefox57: --- → unaffected
status-firefox-esr52: --- → unaffected
Flags: needinfo?(masayuki)
Depends on: 1415509
I confirmed that this bug will be fixed by the patches for bug 1415509. After landing them, I'll add the testcase to crashtests. I confirmed that this is reproducible even if it's a crashtest.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Flags: needinfo?(masayuki)
Comment hidden (mozreview-request)

Comment 4

12 days ago
mozreview-review
Comment on attachment 8927138 [details]
Bug 1415231 - Add crash tests for a regression of bug 1406482 which has been fixed by bug 1415509

https://reviewboard.mozilla.org/r/198376/#review203652
Attachment #8927138 - Flags: review?(m_kato) → review+

Comment 5

12 days ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/5fd62ef74ab1
Add crash tests for a regression of bug 1406482 which has been fixed by bug 1415509 r=m_kato
https://hg.mozilla.org/mozilla-central/rev/5fd62ef74ab1
Status: ASSIGNED → RESOLVED
Last Resolved: 12 days ago
status-firefox58: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.