Closed Bug 1660189 Opened 4 years ago Closed 4 years ago

Crash in [@ nsPrintObject::InitAsRootObject]

Categories

(Core :: Print Preview, defect)

Firefox 81
defect

Tracking

()

VERIFIED FIXED
81 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- unaffected
firefox81 --- verified

People

(Reporter: noni, Assigned: hiro)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: crash, regression, Whiteboard: [print2020_v81][old-ui-])

Crash Data

Attachments

(1 file)

This bug is for crash report bp-85e47faa-62b3-42e6-a84e-58fcb0200820.

Top 10 frames of crashing thread:

0 libxul.so nsPrintObject::InitAsRootObject layout/printing/nsPrintObject.cpp:107
1 libxul.so nsPrintJob::DoCommonPrint layout/printing/nsPrintJob.cpp:663
2 libxul.so nsPrintJob::CommonPrint layout/printing/nsPrintJob.cpp:586
3 libxul.so nsPrintJob::PrintPreview layout/printing/nsPrintJob.cpp:960
4 libxul.so nsDocumentViewer::PrintPreview layout/base/nsDocumentViewer.cpp:3221
5 libxul.so NS_InvokeByIndex 
6 libxul.so XPCWrappedNative::CallMethod js/xpconnect/src/XPCWrappedNative.cpp:1141
7 libxul.so XPC_WN_CallMethod js/xpconnect/src/XPCWrappedNativeJSOps.cpp:946
8 libxul.so js::InternalCallOrConstruct js/src/vm/Interpreter.cpp:599
9 libxul.so Interpret js/src/vm/Interpreter.cpp:3336

Affected versions

  • 81.0a1 (BuildId:20200819212829)

Affected platforms

  • Windows 10 64bit
  • Ubuntu 20.04 64bit.
  • macOS 10.15

Preconditions

  • Ensure that the print.tab_modal.enabled pref is set to true

Steps to reproduce

  1. Launch Firefox.
  2. Access the following page and quickly open print preview (before the page is completely loaded)
  3. Close print preview.

Expected result

  • Print preview is closed and the PDF is properly displayed.

Actual result

  • Tab Crash

Regression Window

  • Will get back with a regression range asap.

[Suggested Severity] S2

More crashreports:

Has Regression Range: --- → no
Has STR: --- → yes
Version: unspecified → Firefox 81

Maybe caused by bug 1654935?

(In reply to Hiroyuki Ikezoe (:hiro) from comment #1)

Maybe caused by bug 1654935?

So we're failing the:

    MOZ_ALWAYS_SUCCEEDS(
        targetBC->SetOpenerPolicy(sourceBC->Top()->GetOpenerPolicy()));

introduced by that bug. But I don't think we can say it was caused by it since that code landed on the 5th August, but the first crash is from build 20200817093723 (17th August), 12 days later.

Tom, can you spot anything in the code for the new print UI that might be causing this?

Flags: needinfo?(ttung)

I will have a closer look tomorrow, but it seems the targetBC is discarded which is unexpected.

Okay, this is (indirectly) regressed by bug 1557983.
this DispatchEventToWindowTree call might run script, thus it might destroy the docshell, we need to bail out in the case.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Flags: needinfo?(ttung)
Regressed by: 1557983
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/592c99d30543
Bail out from nsPrintJob::DoCommonPrint if the docshell was destroyed in beforeprint event handlers. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch

Confirming the crash no longer reproduces on latest 81.0a1 Nightly (buildID 20200823211533).

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: