Closed Bug 1655674 Opened 4 years ago Closed 4 years ago

Crash in [@ mozilla::PresShell::GetPageSequenceFrame]

Categories

(Core :: Layout, defect)

x86
Windows 7
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- unaffected
firefox79 --- unaffected
firefox80 --- wontfix
firefox81 --- fixed

People

(Reporter: achronop, Assigned: bobowen)

Details

(Keywords: crash, regressionwindow-wanted, Whiteboard: [print2020_v81])

Crash Data

Attachments

(1 file)

This bug is for crash report bp-5f6a6c72-498b-47e5-b416-913800200713.

Top 10 frames of crashing thread:

0 xul.dll mozilla::PresShell::GetPageSequenceFrame const 
1 xul.dll nsPrintJob::DoPrint layout/printing/nsPrintJob.cpp:2271
2 xul.dll nsPrintJob::PrintDocContent layout/printing/nsPrintJob.cpp:2139
3 xul.dll nsPrintJob::SetupToPrintContent layout/printing/nsPrintJob.cpp:1624
4 xul.dll nsPrintJob::FinishPrintPreview layout/printing/nsPrintJob.cpp:2821
5 xul.dll nsDocumentViewer::Destroy layout/base/nsDocumentViewer.cpp:1759
6 xul.dll nsDocShell::Destroy docshell/base/nsDocShell.cpp:4210
7 xul.dll nsWebBrowser::SetDocShell toolkit/components/browser/nsWebBrowser.cpp:1162
8 xul.dll nsWebBrowser::InternalDestroy toolkit/components/browser/nsWebBrowser.cpp:181
9 xul.dll nsWebBrowser::Destroy toolkit/components/browser/nsWebBrowser.cpp:873

Feel free to update the regression bug if it is not correct.

No longer regressed by: 1543315

Tracking for printing work. Bump severity if numbers start increasing.

Severity: -- → S3
Flags: needinfo?(jwatt)
Whiteboard: [print2020_v82]
QA Whiteboard: [qa-regression-triage]

Tried to find a regression range, but there is not enough information that could help me reproduce this crash. The QA Whiteboard [qa-regression-triage] is already added, please remove it if this report becomes actionable and QA work is needed.

Assignee: nobody → bobowencode
Status: NEW → ASSIGNED

I haven't managed to reproduce, but what I suspect is happening is that FinishPrintPreview is getting called twice.
In FinishPrintPreview, mIsCreatingPrintPreview is set to false.
This means that if called again the check at [1] won't be triggered and we get this crash and more generally most of the code will think we were printing instead of previewing.

Now FinishPrintPreview is called in nsDocumentViewer::Destroy if the PrintJob has mIsDoingPrintPreview set to true.
Generally mIsDoingPrintPreview and mIsCreatingPrintPreview are set in together apart from in FinishPrintPreview.
So if mIsDoingPrintPreview is true and mIsCreatingPrintPreview is false then FinishPrintPreview, must have been called already.

Perhaps I can make FinishPrintPreveiw do nothing when mIsCreatingPrintPreview is false, but I need to check around multiple uses of the same PrintJob, which I think happens for print preview.

[1] https://searchfox.org/mozilla-central/rev/26b13464c2beb26e0d864d561c30e817a85c348a/layout/printing/nsPrintJob.cpp#1350

Pushed by bobowencode@gmail.com: https://hg.mozilla.org/integration/autoland/rev/2358a7e9b7cd Prevent nsPrintJob::FinishPrintPreview running twice by checking mIsCreatingPrintPreview. r=jwatt
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Flags: needinfo?(jwatt)
Whiteboard: [print2020_v82] → [print2020_v81]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: