Closed Bug 1671503 Opened 4 years ago Closed 4 years ago

Assertion failure: doc->IsStaticDocument(), at src/layout/printing/nsPrintJob.cpp:284

Categories

(Core :: Print Preview, defect, P1)

defect

Tracking

()

RESOLVED FIXED
83 Branch
Fission Milestone M6c
Tracking Status
firefox-esr78 --- unaffected
firefox82 --- unaffected
firefox83 --- fixed

People

(Reporter: tsmith, Assigned: emilio)

References

(Blocks 1 open bug, Regression)

Details

(4 keywords, Whiteboard: [bugmon:confirmed])

Crash Data

Attachments

(3 files)

Attached file testcase.html

Assertion failure: doc->IsStaticDocument(), at src/layout/printing/nsPrintJob.cpp:284

This does require fission.autostart=true

#0 0x7f8a5f011f50 in BuildNestedPrintObjects(mozilla::UniquePtr<nsPrintObject, mozilla::DefaultDelete<nsPrintObject> > const&, RefPtr<mozilla::dom::Document> const&, RefPtr<nsPrintData>&) /gecko/layout/printing/nsPrintJob.cpp:284:5
#1 0x7f8a5f00d5c3 in nsPrintJob::DoCommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*) /gecko/layout/printing/nsPrintJob.cpp:556:5
#2 0x7f8a5f00c9f7 in nsPrintJob::CommonPrint(bool, nsIPrintSettings*, nsIWebProgressListener*, mozilla::dom::Document*) /gecko/layout/printing/nsPrintJob.cpp:477:17
#3 0x7f8a5f013b17 in nsPrintJob::PrintPreview(mozilla::dom::Document*, nsIPrintSettings*, nsIWebProgressListener*, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&) /gecko/layout/printing/nsPrintJob.cpp:859:7
#4 0x7f8a5e7bdcb8 in nsDocumentViewer::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&) /gecko/layout/base/nsDocumentViewer.cpp:3183:18
#5 0x7f8a596e9103 in nsGlobalWindowOuter::Print(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, nsGlobalWindowOuter::IsPreview, nsGlobalWindowOuter::IsForWindowDotPrint, std::function<void (mozilla::dom::PrintPreviewResultInfo const&)>&&, mozilla::ErrorResult&) /gecko/dom/base/nsGlobalWindowOuter.cpp:5400:33
#6 0x7f8a5968f4fb in nsGlobalWindowInner::PrintPreview(nsIPrintSettings*, nsIWebProgressListener*, nsIDocShell*, mozilla::ErrorResult&) /gecko/dom/base/nsGlobalWindowInner.cpp:3622:3
#7 0x7f8a5ae3672e in mozilla::dom::Window_Binding::printPreview(JSContext*, JS::Handle<JSObject*>, void*, JSJitMethodCallArgs const&) /builds/worker/workspace/obj-build/dom/bindings/WindowBinding.cpp:3208:59
#8 0x7f8a5b67ab78 in bool mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions>(JSContext*, unsigned int, JS::Value*) /gecko/dom/bindings/BindingUtils.cpp:3229:13
#9 0x7f8a620ee574 in CallJSNative /gecko/js/src/vm/Interpreter.cpp:506:13
#10 0x7f8a620ee574 in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:598:12
#11 0x7f8a620f094e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:663:10
#12 0x7f8a620d7398 in CallFromStack /gecko/js/src/vm/Interpreter.cpp:667:10
#13 0x7f8a620d7398 in Interpret(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:3335:16
#14 0x7f8a620b7df6 in js::RunScript(JSContext*, js::RunState&) /gecko/js/src/vm/Interpreter.cpp:476:13
#15 0x7f8a620ee77c in js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:635:13
#16 0x7f8a620f094e in InternalCall(JSContext*, js::AnyInvokeArgs const&, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:663:10
#17 0x7f8a620f0cd0 in js::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, js::AnyInvokeArgs const&, JS::MutableHandle<JS::Value>, js::CallReason) /gecko/js/src/vm/Interpreter.cpp:680:8
#18 0x7f8a62a657e2 in JS::Call(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) /gecko/js/src/jsapi.cpp:2829:10
#19 0x7f8a5b276208 in mozilla::dom::EventListener::HandleEvent(mozilla::dom::BindingCallContext&, JS::Handle<JS::Value>, mozilla::dom::Event&, mozilla::ErrorResult&) /builds/worker/workspace/obj-build/dom/bindings/EventListenerBinding.cpp:57:8
#20 0x7f8a5bde85d8 in void mozilla::dom::EventListener::HandleEvent<mozilla::dom::EventTarget*>(mozilla::dom::EventTarget* const&, mozilla::dom::Event&, mozilla::ErrorResult&, char const*, mozilla::dom::CallbackObject::ExceptionHandling, JS::Realm*) /builds/worker/workspace/obj-build/dist/include/mozilla/dom/EventListenerBinding.h:66:12
#21 0x7f8a5bde7ff4 in mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, mozilla::dom::Event*, mozilla::dom::EventTarget*) /gecko/dom/events/EventListenerManager.cpp:1072:43
#22 0x7f8a5bde9841 in mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event**, mozilla::dom::EventTarget*, nsEventStatus*, bool) /gecko/dom/events/EventListenerManager.cpp:1269:17
#23 0x7f8a5bdd72ce in mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) /gecko/dom/events/EventDispatcher.cpp:352:17
#24 0x7f8a5bdd5ad3 in mozilla::EventTargetChainItem::HandleEventTargetChain(nsTArray<mozilla::EventTargetChainItem>&, mozilla::EventChainPostVisitor&, mozilla::EventDispatchingCallback*, mozilla::ELMCreationDetector&) /gecko/dom/events/EventDispatcher.cpp:554:16
#25 0x7f8a5bdd9f29 in mozilla::EventDispatcher::Dispatch(nsISupports*, nsPresContext*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsEventStatus*, mozilla::EventDispatchingCallback*, nsTArray<mozilla::dom::EventTarget*>*) /gecko/dom/events/EventDispatcher.cpp:1092:11
#26 0x7f8a5bddf2d9 in mozilla::EventDispatcher::DispatchDOMEvent(nsISupports*, mozilla::WidgetEvent*, mozilla::dom::Event*, nsPresContext*, nsEventStatus*) /gecko/dom/events/EventDispatcher.cpp
#27 0x7f8a59b8f27f in nsINode::DispatchEvent(mozilla::dom::Event&, mozilla::dom::CallerType, mozilla::ErrorResult&) /gecko/dom/base/nsINode.cpp:1315:17
#28 0x7f8a595dc0af in nsContentUtils::DispatchEvent(mozilla::dom::Document*, nsISupports*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, mozilla::Trusted, bool*, mozilla::ChromeOnlyDispatch) /gecko/dom/base/nsContentUtils.cpp:4072:28
#29 0x7f8a595dbdf3 in nsContentUtils::DispatchTrustedEvent(mozilla::dom::Document*, nsISupports*, nsTSubstring<char16_t> const&, mozilla::CanBubble, mozilla::Cancelable, mozilla::Composed, bool*) /gecko/dom/base/nsContentUtils.cpp:4042:10
#30 0x7f8a5989a1ce in mozilla::dom::Document::DispatchContentLoadedEvents() /gecko/dom/base/Document.cpp:7302:3
#31 0x7f8a5996b6ff in applyImpl<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1188:12
#32 0x7f8a5996b6ff in apply<mozilla::dom::Document, void (mozilla::dom::Document::*)()> /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1194:12
#33 0x7f8a5996b6ff in mozilla::detail::RunnableMethodImpl<mozilla::dom::Document*, void (mozilla::dom::Document::*)(), true, (mozilla::RunnableKind)0>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:1240:13
#34 0x7f8a5618a9bd in mozilla::SchedulerGroup::Runnable::Run() /gecko/xpcom/threads/SchedulerGroup.cpp:146:20
#35 0x7f8a56194979 in mozilla::RunnableTask::Run() /gecko/xpcom/threads/TaskController.cpp:245:16
#36 0x7f8a56191467 in mozilla::TaskController::DoExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:515:26
#37 0x7f8a5618f307 in mozilla::TaskController::ExecuteNextTaskOnlyMainThreadInternal(mozilla::detail::BaseAutoLock<mozilla::Mutex&> const&) /gecko/xpcom/threads/TaskController.cpp:374:15
#38 0x7f8a5618f75d in mozilla::TaskController::ProcessPendingMTTask(bool) /gecko/xpcom/threads/TaskController.cpp:171:36
#39 0x7f8a5619c241 in operator() /gecko/xpcom/threads/TaskController.cpp:85:37
#40 0x7f8a5619c241 in mozilla::detail::RunnableFunction<mozilla::TaskController::InitializeInternal()::$_3>::Run() /builds/worker/workspace/obj-build/dist/include/nsThreadUtils.h:577:5
#41 0x7f8a561bbceb in nsThread::ProcessNextEvent(bool, bool*) /gecko/xpcom/threads/nsThread.cpp:1197:14
#42 0x7f8a561c656c in NS_ProcessNextEvent(nsIThread*, bool) /gecko/xpcom/threads/nsThreadUtils.cpp:513:10
#43 0x7f8a574937bf in mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) /gecko/ipc/glue/MessagePump.cpp:87:21
#44 0x7f8a57396e61 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:334:10
#45 0x7f8a57396e61 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:327:3
#46 0x7f8a57396e61 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:309:3
#47 0x7f8a5e168f97 in nsBaseAppShell::Run() /gecko/widget/nsBaseAppShell.cpp:137:27
#48 0x7f8a61e87e4f in XRE_RunAppShell() /gecko/toolkit/xre/nsEmbedFunctions.cpp:913:20
#49 0x7f8a57396e61 in RunInternal /gecko/ipc/chromium/src/base/message_loop.cc:334:10
#50 0x7f8a57396e61 in RunHandler /gecko/ipc/chromium/src/base/message_loop.cc:327:3
#51 0x7f8a57396e61 in MessageLoop::Run() /gecko/ipc/chromium/src/base/message_loop.cc:309:3
#52 0x7f8a61e873ec in XRE_InitChildProcess(int, char**, XREChildData const*) /gecko/toolkit/xre/nsEmbedFunctions.cpp:744:34
#53 0x5616bd441e2d in content_process_main(mozilla::Bootstrap*, int, char**) /gecko/browser/app/../../ipc/contentproc/plugin-container.cpp:56:28
#54 0x5616bd442267 in main /gecko/browser/app/nsBrowserApp.cpp:304:18
Flags: in-testsuite?
Attached file prefs.js

Bugmon Analysis:
Unable to reproduce bug using the following builds:

mozilla-central 20201015215335-c8b4cf6696dd
mozilla-central 20201015035702-7b96efde9ee1
Removing bugmon keyword as no further action possible.
Please review the bug and re-add the keyword for further analysis.

Keywords: bugmon
Whiteboard: [bugmon:confirmed]
Severity: -- → S3
Assignee: nobody → emilio
Severity: S3 → S2
Priority: -- → P1
Flags: needinfo?(emilio)
Crash Signature: [@ BuildNestedPrintObjects]

See the comment. A bit racy, but some of the time crashtest crashes
without the patch.

Null-check is just paranoia.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6d63e8bc04bf Handle documents from iframes that haven't changed remoteness yet correctly. r=nordzilla

Bug 1671480 was closed as a dupe of this bug. I'm moving the Fission Milestone == M6c from that bug to this bug for Fission project tracking.

Fission Milestone: --- → M6c
Attachment #9181983 - Attachment description: Bug 1671503 - Handle documents from iframes that haven't changed remoteness yet correctly. r=jwatt → Bug 1671503 - Handle documents from iframes that haven't changed remoteness yet correctly. r=nordzilla
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d8261c6cb451 Handle documents from iframes that haven't changed remoteness yet correctly. r=nordzilla
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
Flags: in-testsuite? → in-testsuite+
Regressed by: 1670816
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: