Closed Bug 1386773 Opened 7 years ago Closed 7 years ago

stylo: panicked at 'assertion failed: rule_node != *self.rule_tree.root()'

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- disabled
firefox57 --- fixed

People

(Reporter: truber, Assigned: bholley)

References

(Blocks 2 open bugs)

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

Attached file testcase.html
The attached testcase causes a panic in m-c rev 52285ea5e54c with stylo enabled by pref.

thread '<unnamed>' panicked at 'assertion failed: rule_node != *self.rule_tree.root()', /home/worker/workspace/build/src/servo/components/style/stylist.rs:913
stack backtrace:
   0:     0x7f5498b60cf3 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::hcab99e0793da62c7
   1:     0x7f5498b5c016 - std::sys_common::backtrace::_print::hbfe5b0c7e79c0711
   2:     0x7f5498b6e38a - std::panicking::default_hook::{{closure}}::h9ba2c6973907a2be
   3:     0x7f5498b6df8b - std::panicking::default_hook::he4d55e2dd21c3cca
   4:     0x7f5498b6e79b - std::panicking::rust_panic_with_hook::ha138c05cd33ad44d
   5:     0x7f54985842ca - std::panicking::begin_panic::h0c7fb41fdbb89865
   6:     0x7f5498c8bc9a - style::stylist::Stylist::lazy_pseudo_rules::hf34b33aca43580af
   7:     0x7f5498c8db22 - style::stylist::Stylist::lazily_compute_pseudo_element_style::h1f459dbee75559a7
   8:     0x7f549854a24c - geckoservo::glue::get_pseudo_style::h265517f4425d90a0
   9:     0x7f5498549d0c - Servo_ResolvePseudoStyle
  10:     0x7f5496947527 - mozilla::ServoStyleSet::ProbePseudoElementStyle(mozilla::dom::Element*, mozilla::CSSPseudoElementType, mozilla::ServoStyleContext*)
  11:     0x7f5496b40785 - mozilla::StyleSetHandle::Ptr::ProbePseudoElementStyle(mozilla::dom::Element*, mozilla::CSSPseudoElementType, nsStyleContext*)
  12:     0x7f5496b5731f - nsTextPaintStyle::InitSelectionColorsAndShadow()
  13:     0x7f5496b575c2 - nsTextPaintStyle::GetSelectionColors(unsigned int*, unsigned int*)
  14:     0x7f5496b58380 - nsTextFrame::PaintTextWithSelectionColors(nsTextFrame::PaintTextSelectionParams const&, mozilla::UniquePtr<SelectionDetails, mozilla::DefaultDelete<SelectionDetails> > const&, short*, nsCharClipDisplayItem::ClipEdges const&)
  15:     0x7f5496b59097 - nsTextFrame::PaintTextWithSelection(nsTextFrame::PaintTextSelectionParams const&, nsCharClipDisplayItem::ClipEdges const&)
  16:     0x7f5496b5adf3 - nsTextFrame::PaintText(nsTextFrame::PaintTextParams const&, nsCharClipDisplayItem const&, float)
  17:     0x7f5496b5b502 - nsDisplayText::RenderToContext(gfxContext*, nsDisplayListBuilder*, bool)
  18:     0x7f5496b5bc8c - nsDisplayText::Paint(nsDisplayListBuilder*, gfxContext*)
Flags: in-testsuite?
Oh, I see... We skip empty rules when matching, so we can indeed end with the root there. Nice test-case Jesse, as always :-)
https://github.com/servo/servo/pull/17949

(Need to land the crashtest afterwards)
Assignee: nobody → emilio+bugs
Status: NEW → ASSIGNED
Priority: -- → P1
Emilio, what's the status on this? Is the patch we have in the PR going to need to be reworked?
Flags: needinfo?(emilio+bugs)
I reworked it, it just needs review... though it may / will be impacted if we fix bug 1384802 (in which case the assertion will hold).
Flags: needinfo?(emilio+bugs)
Priority: P1 → P2
The testcase here no longer panics, presumably because bug 1384802 fixed the underlying issue. I'll land the testcase.
Assignee: emilio → bobbyholley
https://hg.mozilla.org/mozilla-central/rev/b07fb0e9d990
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Depends on: 1384802
Flags: in-testsuite? → in-testsuite+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: