Closed Bug 1432633 Opened 2 years ago Closed 2 years ago

thread '<unnamed>' panicked at 'Trying to collect rules for a detached pseudo-element'

Categories

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

59 Branch
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 1411008
Tracking Status
firefox59 --- affected
firefox60 --- affected

People

(Reporter: tsmith, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(1 file)

Attached file testcase.html
[55642, Main Thread] ###!!! ASSERTION: should not have pseudo-element data: 'mPseudo || !mStyleContext->HasPseudoElementData()', file /src/layout/style/nsComputedDOMStyle.cpp, line 1088
thread '<unnamed>' panicked at 'Trying to collect rules for a detached pseudo-element', /checkout/src/libcore/option.rs:839:4
stack backtrace:
   0:     0x7fa1cb6ea9a3 - std::sys::imp::backtrace::tracing::imp::unwind_backtrace::h8ed7485deb8ab958
                               at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1:     0x7fa1cb6e50f0 - std::sys_common::backtrace::_print::h3d4f9ea58578e60f
                               at /checkout/src/libstd/sys_common/backtrace.rs:69
   2:     0x7fa1cb6f7ea3 - std::panicking::default_hook::{{closure}}::h0088fe51b67c687c
                               at /checkout/src/libstd/sys_common/backtrace.rs:58
                               at /checkout/src/libstd/panicking.rs:381
   3:     0x7fa1cb6f7c12 - std::panicking::default_hook::hf425c768c5ffbbad
                               at /checkout/src/libstd/panicking.rs:397
   4:     0x7fa1cb6f8367 - std::panicking::rust_panic_with_hook::h25b934bb4484e9e0
                               at /checkout/src/libstd/panicking.rs:577
   5:     0x7fa1cb6f8234 - std::panicking::begin_panic::h59483e27e93d7bc6
                               at /checkout/src/libstd/panicking.rs:538
   6:     0x7fa1cb6f8139 - std::panicking::begin_panic_fmt::h5f221297e8a3dbdb
                               at /checkout/src/libstd/panicking.rs:522
   7:     0x7fa1cb6f80ca - rust_begin_unwind
                               at /checkout/src/libstd/panicking.rs:498
   8:     0x7fa1cb70e710 - core::panicking::panic_fmt::h4d1ab9bae1f32475
                               at /checkout/src/libcore/panicking.rs:71
   9:     0x7fa1cb70e77d - core::option::expect_failed::h299a35470dcb4d8e
                               at /checkout/src/libcore/option.rs:839
  10:     0x7fa1caf9b3e5 - style::dom::TElement::rule_hash_target::h89499cc2f94fdd82
                               at /checkout/src/libcore/option.rs:302
                               at /src/servo/components/style/dom.rs:750
  11:     0x7fa1caf0c327 - style::stylist::Stylist::push_applicable_declarations::hdc90e69424e5871e
                               at /src/servo/components/style/stylist.rs:1222
  12:     0x7fa1caf4d38f - <style::style_resolver::StyleResolverForElement<'a, 'ctx, 'le, E>>::match_primary::h6d1b87f4e5f817e9
                               at /src/servo/components/style/style_resolver.rs:430
  13:     0x7fa1caf4dac6 - <style::style_resolver::StyleResolverForElement<'a, 'ctx, 'le, E>>::resolve_primary_style::hbb97e03cd165324e
                               at /src/servo/components/style/style_resolver.rs:158
  14:     0x7fa1caf4d6d9 - <style::style_resolver::StyleResolverForElement<'a, 'ctx, 'le, E>>::resolve_style::hbd6f37a31612081c
                               at /src/servo/components/style/style_resolver.rs:230
  15:     0x7fa1caee1dec - Servo_ResolveStyleLazily
                               at /src/servo/components/style/traversal.rs:377
                               at /src/servo/ports/geckolib/glue.rs:3614
  16:     0x7fa1c641c9e1 - _ZN7mozilla13ServoStyleSet26ResolveStyleLazilyInternalEPNS_3dom7ElementENS_20CSSPseudoElementTypeENS_18StyleRuleInclusionE
                               at /src/layout/style/ServoStyleSet.cpp:1331
  17:     0x7fa1c641e058 - _ZN7mozilla13ServoStyleSet18ResolveStyleLazilyEPNS_3dom7ElementENS_20CSSPseudoElementTypeENS_18StyleRuleInclusionE
                               at /src/layout/style/ServoStyleSet.cpp:574
  18:     0x7fa1c64a600c - _ZN18nsComputedDOMStyle24DoGetStyleContextNoFlushEPN7mozilla3dom7ElementEP6nsAtomP12nsIPresShellNS_9StyleTypeENS_13AnimationFlagE
                               at /src/layout/style/nsComputedDOMStyle.cpp:781
  19:     0x7fa1c2b80b40 - _ZN18nsComputedDOMStyle22GetStyleContextNoFlushEPN7mozilla3dom7ElementEP6nsAtomP12nsIPresShellNS_9StyleTypeE
                               at /src/layout/style/nsComputedDOMStyle.h:112
  20:     0x7fa1c64a5247 - _ZN18nsComputedDOMStyle25UpdateCurrentStyleSourcesEb
                               at /src/layout/style/nsComputedDOMStyle.cpp:1067
  21:     0x7fa1c64a598e - _ZN18nsComputedDOMStyle19GetPropertyCSSValueERK12nsTSubstringIDsERN7mozilla11ErrorResultE
                               at /src/layout/style/nsComputedDOMStyle.cpp:1174
  22:     0x7fa1c64a452d - _ZN18nsComputedDOMStyle16GetPropertyValueERK12nsTSubstringIDsERS1_
                               at /src/layout/style/nsComputedDOMStyle.cpp:479
  23:     0x7fa1c61d9137 - _ZN7mozilla12CSSEditUtils24GetCSSInlinePropertyBaseEP7nsINodeP6nsAtomR12nsTSubstringIDsENS0_9StyleTypeE
                               at /src/editor/libeditor/CSSEditUtils.cpp:525
  24:     0x7fa1c6224a75 - _ZN7mozilla10HTMLEditor41GetAbsolutelyPositionedSelectionContainerEPP7nsINode
                               at /src/editor/libeditor/HTMLAbsPositionEditor.cpp:107
  25:     0x7fa1c6224744 - _ZN7mozilla10HTMLEditor41GetAbsolutelyPositionedSelectionContainerEPP13nsIDOMElement
                               at /src/editor/libeditor/HTMLAbsPositionEditor.cpp:85
  26:     0x7fa1c623647b - _ZN7mozilla10HTMLEditor38CheckSelectionStateForAnonymousButtonsEP12nsISelection
                               at /src/editor/libeditor/HTMLAnonymousNodeEditor.cpp:365
  27:     0x7fa1c62c7006 - _ZN7mozilla24ResizerSelectionListener22NotifySelectionChangedEP14nsIDOMDocumentP12nsISelections
                               at /src/editor/libeditor/HTMLEditorObjectResizer.cpp:93
  28:     0x7fa1c2c2957b - _ZN7mozilla3dom9Selection24NotifySelectionListenersEv
                               at /src/dom/base/Selection.cpp:3840
  29:     0x7fa1c691e915 - _ZN16nsFrameSelection24NotifySelectionListenersEN7mozilla13SelectionTypeE
                               at /src/layout/generic/nsFrameSelection.cpp:2022
  30:     0x7fa1c2c29b86 - _ZN7mozilla3dom9Selection15EndBatchChangesEs
                               at /src/dom/base/Selection.cpp:3859
  31:     0x7fa1c2c26733 - _ZN7mozilla3dom16SelectionBatcherD2Ev
                               at /src/obj-firefox/dist/include/mozilla/dom/Selection.h:591
  32:     0x7fa1c2c264bb - _ZN7mozilla3dom9Selection17SelectAllChildrenER7nsINodeRNS_11ErrorResultE
                               at /src/dom/base/Selection.cpp:3254
  33:     0x7fa1c629e946 - _ZN7mozilla10HTMLEditor9SelectAllEv
                               at /src/editor/libeditor/HTMLEditor.cpp:3436
  34:     0x7fa1c6216623 - _ZN7mozilla16SelectAllCommand9DoCommandEPKcP11nsISupports
                               at /src/editor/libeditor/EditorCommands.cpp:855
  35:     0x7fa1c4a00ece - _ZN24nsControllerCommandTable9DoCommandEPKcP11nsISupports
                               at /src/dom/commandhandler/nsControllerCommandTable.cpp:147
  36:     0x7fa1c49f97fd - _ZN23nsBaseCommandController9DoCommandEPKc
                               at /src/dom/commandhandler/nsBaseCommandController.cpp:136
  37:     0x7fa1c49fe699 - _ZN16nsCommandManager9DoCommandEPKcP16nsICommandParamsP18mozIDOMWindowProxy
                               at /src/dom/commandhandler/nsCommandManager.cpp:212
  38:     0x7fa1c4daa6da - _ZN14nsHTMLDocument11ExecCommandERK12nsTSubstringIDsEbS3_R12nsIPrincipalRN7mozilla11ErrorResultE
                               at /src/dom/html/nsHTMLDocument.cpp:3293
  39:     0x7fa1c43c2ad4 - _ZN7mozilla3dom19HTMLDocumentBindingL11execCommandEP9JSContextN2JS6HandleIP8JSObjectEEP14nsHTMLDocumentRK19JSJitMethodCallArgs
                               at /src/obj-firefox/dom/bindings/HTMLDocumentBinding.cpp:862
  40:     0x7fa1c46fd06b - _ZN7mozilla3dom20GenericBindingMethodEP9JSContextjPN2JS5ValueE
                               at /src/dom/bindings/BindingUtils.cpp:3036
  41:     0x7fa1c982cf8f - _ZN2js12CallJSNativeEP9JSContextPFbS1_jPN2JS5ValueEERKNS2_8CallArgsE
                               at /src/js/src/jscntxtinlines.h:291
  42:     0x7fa1c982c921 - _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructE
                               at /src/js/src/vm/Interpreter.cpp:473
  43:     0x7fa1c982dd1c - _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsE
                               at /src/js/src/vm/Interpreter.cpp:522
  44:     0x7fa1c982279e - _ZL9InterpretP9JSContextRN2js8RunStateE
                               at /src/js/src/vm/Interpreter.cpp:3096
  45:     0x7fa1c980de0b - _ZN2js9RunScriptEP9JSContextRNS_8RunStateE
  46:     0x7fa1c982cae8 - _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructE
                               at /src/js/src/vm/Interpreter.cpp:495
  47:     0x7fa1c982dd1c - _ZL12InternalCallP9JSContextRKN2js13AnyInvokeArgsE
                               at /src/js/src/vm/Interpreter.cpp:522
  48:     0x7fa1c982df25 - _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EE
                               at /src/js/src/vm/Interpreter.cpp:541
  49:     0x7fa1ca13f87d - _ZN2JS4CallEP9JSContextNS_6HandleINS_5ValueEEES4_RKNS_16HandleValueArrayENS_13MutableHandleIS3_EE
                               at /src/js/src/jsapi.cpp:3037
  50:     0x7fa1c4164ea7 - _ZN7mozilla3dom19EventHandlerNonNull4CallEP9JSContextN2JS6HandleINS4_5ValueEEERNS0_5EventENS4_13MutableHandleIS6_EERNS_11ErrorResultE
                               at /src/obj-firefox/dom/bindings/EventHandlerBinding.cpp:260
  51:     0x7fa1c4ada07e - _ZN7mozilla3dom19EventHandlerNonNull4CallIP11nsISupportsEEvRKT_RNS0_5EventEN2JS13MutableHandleINSA_5ValueEEERNS_11ErrorResultEPKcNS0_14CallbackObject17ExceptionHandlingEP13JSCompartment
                               at /src/obj-firefox/dist/include/mozilla/dom/EventHandlerBinding.h:362
  52:     0x7fa1c4ad874d - _ZN7mozilla14JSEventHandler11HandleEventEP11nsIDOMEvent
                               at /src/dom/events/JSEventHandler.cpp:215
  53:     0x7fa1c4ab1f6f - _ZN7mozilla20EventListenerManager18HandleEventSubTypeEPNS0_8ListenerEP11nsIDOMEventPNS_3dom11EventTargetE
                               at /src/dom/events/EventListenerManager.cpp:1111
  54:     0x7fa1c4ab3569 - _ZN7mozilla20EventListenerManager19HandleEventInternalEP13nsPresContextPNS_11WidgetEventEPP11nsIDOMEventPNS_3dom11EventTargetEP13nsEventStatus
                               at /src/dom/events/EventListenerManager.cpp:1286
  55:     0x7fa1c4aa513b - _ZN7mozilla20EventTargetChainItem11HandleEventERNS_21EventChainPostVisitorERNS_19ELMCreationDetectorE
                               at /src/dom/events/EventDispatcher.cpp:343
  56:     0x7fa1c4aa47f0 - _ZN7mozilla20EventTargetChainItem22HandleEventTargetChainER8nsTArrayIS0_ERNS_21EventChainPostVisitorEPNS_24EventDispatchingCallbackERNS_19ELMCreationDetectorE
                               at /src/dom/events/EventDispatcher.cpp:496
  57:     0x7fa1c4aa64e6 - _ZN7mozilla15EventDispatcher8DispatchEP11nsISupportsP13nsPresContextPNS_11WidgetEventEP11nsIDOMEventP13nsEventStatusPNS_24EventDispatchingCallbackEP8nsTArrayIPNS_3dom11EventTargetEE
                               at /src/dom/events/EventDispatcher.cpp:865
  58:     0x7fa1c673a791 - _ZN16nsDocumentViewer12LoadCompleteE8nsresult
                               at /src/layout/base/nsDocumentViewer.cpp:1071
  59:     0x7fa1c8e1a764 - _ZN10nsDocShell11EndPageLoadEP14nsIWebProgressP10nsIChannel8nsresult
                               at /src/docshell/base/nsDocShell.cpp:7248
  60:     0x7fa1c8e17b8c - _ZN10nsDocShell13OnStateChangeEP14nsIWebProgressP10nsIRequestj8nsresult
                               at /src/docshell/base/nsDocShell.cpp:7041
  61:     0x7fa1c8e1c1af - _ZThn472_N10nsDocShell13OnStateChangeEP14nsIWebProgressP10nsIRequestj8nsresult
                               at /src/docshell/base/nsDocShell.cpp:0
  62:     0x7fa1c1de75d9 - _ZN11nsDocLoader19DoFireOnStateChangeEP14nsIWebProgressP10nsIRequestRi8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:1319
  63:     0x7fa1c1de6b29 - _ZN11nsDocLoader18doStopDocumentLoadEP10nsIRequest8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:862
  64:     0x7fa1c1de438e - _ZN11nsDocLoader16DocLoaderIsEmptyEb
                               at /src/uriloader/base/nsDocLoader.cpp:751
  65:     0x7fa1c1de5c75 - _ZN11nsDocLoader13OnStopRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:633
  66:     0x7fa1c1de668c - _ZThn8_N11nsDocLoader13OnStopRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/uriloader/base/nsDocLoader.cpp:0
  67:     0x7fa1c06404a5 - _ZN7mozilla3net11nsLoadGroup13RemoveRequestEP10nsIRequestP11nsISupports8nsresult
                               at /src/netwerk/base/nsLoadGroup.cpp:629
  68:     0x7fa1c2d2c582 - _ZN10nsDocument15DoUnblockOnloadEv
                               at /src/dom/base/nsDocument.cpp:8937
  69:     0x7fa1c2d2c25e - _ZN10nsDocument13UnblockOnloadEb
                               at /src/dom/base/nsDocument.cpp:8859
  70:     0x7fa1c2d12dc8 - _ZN10nsDocument27DispatchContentLoadedEventsEv
                               at /src/dom/base/nsDocument.cpp:5526
  71:     0x7fa1c2d7da05 - _ZN7mozilla6detail18RunnableMethodImplIP10nsDocumentMS2_FvvELb1ELNS_12RunnableKindE0EJEE3RunEv
                               at /src/obj-firefox/dist/include/nsThreadUtils.h:1193
  72:     0x7fa1c048b207 - _ZN8nsThread16ProcessNextEventEbPb
                               at /src/xpcom/threads/nsThread.cpp:1040
  73:     0x7fa1c04ad588 - _Z19NS_ProcessNextEventP9nsIThreadb
                               at /src/xpcom/threads/nsThreadUtils.cpp:517
  74:     0x7fa1c10bc463 - _ZN7mozilla3ipc11MessagePump3RunEPN4base11MessagePump8DelegateE
                               at /src/ipc/glue/MessagePump.cpp:97
  75:     0x7fa1c1002d98 - _ZN11MessageLoop11RunInternalEv
                               at /src/ipc/chromium/src/base/message_loop.cc:326
  76:     0x7fa1c1002c1c - _ZN11MessageLoop3RunEv
                               at /src/ipc/chromium/src/base/message_loop.cc:299
  77:     0x7fa1c60eb12a - _ZN14nsBaseAppShell3RunEv
                               at /src/widget/nsBaseAppShell.cpp:157
  78:     0x7fa1c9441b64 - _ZN12nsAppStartup3RunEv
                               at /src/toolkit/components/startup/nsAppStartup.cpp:288
  79:     0x7fa1c95c593e - _ZN7XREMain11XRE_mainRunEv
                               at /src/toolkit/xre/nsAppRunner.cpp:4702
  80:     0x7fa1c95c7a0e - _ZN7XREMain8XRE_mainEiPPcRKN7mozilla15BootstrapConfigE
                               at /src/toolkit/xre/nsAppRunner.cpp:4841
  81:     0x7fa1c95c8a41 - _Z8XRE_mainiPPcRKN7mozilla15BootstrapConfigE
                               at /src/toolkit/xre/nsAppRunner.cpp:4933
  82:           0x4f00ea - _ZL7do_mainiPPcS0_
                               at /src/browser/app/nsBrowserApp.cpp:231
  83:           0x4ef91a - main
                               at /src/browser/app/nsBrowserApp.cpp:304
  84:     0x7fa1dfb9582f - __libc_start_main
  85:           0x41f3d4 - <unknown>
Flags: in-testsuite?
Flags: needinfo?(emilio)
Severity: normal → critical
Component: Layout → CSS Parsing and Computation
This is another instance of bug 1411008, we changed the message a while ago.

The TL;DR is that editor tries to get the style of NAC, and that NAC is detached from the document by the style flush that we need to do in order to get the up-to-date style.

We could wallpaper it I guess... But the answer we'd give would be nonsensical. We could also just make flushing styles really only flush styles, and that'd make the reframe of the NAC container not happen, and thus everything would make a bit more sense...
Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE
Duplicate of bug: 1411008
You need to log in before you can comment on or make changes to this bug.