Closed Bug 1661446 Opened 4 years ago Closed 4 years ago

Crash in [@ nsGlobalWindowOuter::Print]

Categories

(Core :: Printing: Setup, defect, P1)

Unspecified
Windows 10
defect

Tracking

()

RESOLVED FIXED
82 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- unaffected
firefox81 --- fixed
firefox82 --- fixed

People

(Reporter: aryx, Assigned: emilio)

References

(Regression)

Details

(Keywords: crash, regression, Whiteboard: [print2020_v81])

Crash Data

Attachments

(1 file)

4 installations have reported this failure so far, changes indicate it's from bug 1636728.

Crash report: https://crash-stats.mozilla.org/report/index/c8cefce3-7b37-4040-ac3a-067db0200826

Top 10 frames of crashing thread:

0 xul.dll nsGlobalWindowOuter::Print dom/base/nsGlobalWindowOuter.cpp:5254
1 xul.dll nsGlobalWindowInner::PrintPreview dom/base/nsGlobalWindowInner.cpp:3611
2 xul.dll mozilla::dom::Window_Binding::printPreview dom/bindings/WindowBinding.cpp:3205
3 xul.dll mozilla::dom::binding_detail::GenericMethod<mozilla::dom::binding_detail::MaybeCrossOriginObjectThisPolicy, mozilla::dom::binding_detail::ThrowExceptions> dom/bindings/BindingUtils.cpp:3227
4 xul.dll js::InternalCallOrConstruct js/src/vm/Interpreter.cpp:599
5 xul.dll Interpret js/src/vm/Interpreter.cpp:3336
6 xul.dll js::InternalCallOrConstruct js/src/vm/Interpreter.cpp:636
7 xul.dll JS_CallFunctionValue js/src/jsapi.cpp:2768
8 xul.dll nsXPCWrappedJS::CallMethod js/xpconnect/src/XPCWrappedJSClass.cpp:963
9 xul.dll PrepareAndDispatch xpcom/reflect/xptcall/md/win32/xptcstubs_x86_64.cpp:168
Flags: needinfo?(emilio)
Assignee: nobody → emilio

Only 4 of 17 crash reports have Fission enabled, so this crash is not a Fission bug.

Summary: [Fission] Crash in [@ nsGlobalWindowOuter::Print] → Crash in [@ nsGlobalWindowOuter::Print]

15 via Window_Binding::printPreview
2 via Window_Binding::print

Even though the outer comes from the inner, and the inner always checks
HasActiveDocument(), that seems to be a bit of a lie, insofar
HasActiveDocument() only checks IsCurrentActiveWindow(), and that can
return true for an already-discarded page.

Throwing in this case seems acceptable.

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84220288f218
Don't assert that we still have a document in nsGlobalWindowOuter::Print. r=smaug
Severity: -- → S2
Priority: -- → P1
Whiteboard: [print2020_v81]
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch

Note that when I tried to do print-preview https://www.instrupix.com/wprm_print/recipe/5935 by pressing "Print" button in the document in a container tab (for bug 1661867), I get

[Child 198774, Main Thread] WARNING: '!docToPrint', file central/dom/base/nsGlobalWindowOuter.cpp, line 5288

which is the line what Emilio added in this bug.

So, I am 100% sure it's a test case caused this crash. (it still causes hang on the print preview window on my Linux box)

See Also: → 1661867

Also note that a browser mochitest I posted in bug 1661867 comment 6 could be also an automated test case for this. (I've confirmed that the test crashes without the fix for this bug).

Comment on attachment 9172660 [details]
Bug 1661446 - Don't assert that we still have a document in nsGlobalWindowOuter::Print. r=smaug,nika

Beta/Release Uplift Approval Request

  • User impact if declined: Printing project fix
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky):
  • String changes made/needed:
Attachment #9172660 - Flags: approval-mozilla-beta?

Since the status are different for nightly and release, what's the status for beta?
For more information, please visit auto_nag documentation.

Comment on attachment 9172660 [details]
Bug 1661446 - Don't assert that we still have a document in nsGlobalWindowOuter::Print. r=smaug,nika

Approved for 81.0b6.

Attachment #9172660 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
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: