Closed Bug 1563163 Opened 5 months ago Closed 3 months ago

Tab crashes when inspecting page in Print Preview mode


(DevTools :: Inspector, defect)

67 Branch
Not set


(firefox70 verified)

Firefox 70
Tracking Status
firefox70 --- verified


(Reporter: dale, Assigned: bradwerth, NeedInfo)



Crash Data


(2 files)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

Steps to reproduce:

  1. Open any page;
  2. Go into print preview;
  3. Right Click - Inspect Element;

Actual results:

Tab crash

Expected results:

Inspector opened with css styles for @print media

Please follow the steps on and report back here. Thanks!

Flags: needinfo?(dale)
Component: Untriaged → Print Preview
Product: Firefox → Core

Hello Andre!

Just reproduced the bug in safe mode.

Firefox is clean and up to date (latest from the repos).

Flags: needinfo?(dale)

Hello Dale - Do you have a crash report in about:crashes? If so, please paste it here. Thanks.

Flags: needinfo?(dale)

I can reproduce this trivially:

It's crasing with a null dereference here on the flexbox lenght code:

Brad, seems you are familiar with that code? We could at least mitigate the crash I'm sure.

Component: Print Preview → Inspector
Ever confirmed: true
Flags: needinfo?(bwerth)
Product: Core → DevTools

Okay, the core issue is that nsPageSequenceFrame::Reflow early exits during incremental reflow at So the flex container is supposed to reflow and generate the FlexContainerInfo structure, but never gets the chance. The Flex::Flex constructor assumes that the structure exists, and dereferences the NULL pointer.

I don't know how to fix the nsPageSequenceFrame::Reflow issue, so I'll needinfo Mats on that -- is there an existing bug? I'll fix the Flex::Flex code to gracefully handle the case of the missing FlexContainerInfo structure. That will fix the crash, but we'll also have an empty Flex Layout panel when inspecting flex containers under these conditions.

Flags: needinfo?(bwerth) → needinfo?(mats)

That's a can of worms, see bug 1157012 and the bugs linked from there.

Flags: needinfo?(mats)
Pushed by
Part 1: Make Flex::Flex gracefully handle frames without FlexContainerInfo structures. r=mats
Part 2: Downgrade an assert to a warning in nsFlexContainerFrame::GetFlexFrameWithComputedInfo. r=mats
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Assignee: nobody → bwerth
Duplicate of this bug: 1551114
Duplicate of this bug: 1535990
Crash Signature: [@ mozilla::dom::Flex::Flex]
Flags: qe-verify+

Following the STR from the first comment, I managed to reproduce the issue on nightly 69.0a1 (2019-07-02) but only for the Twitter, YouTube and Reddit websites .
I can confirm that the issue is fixed in 70.0b6.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.