Closed Bug 1518954 Opened 11 months ago Closed 11 months ago

Hit MOZ_CRASH(assertion failed: self.percentage.is_none() || self.unclamped_length() == Length::zero()) at servo/components/style/gecko/values.rs:154

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox-esr60 --- unaffected
firefox64 --- unaffected
firefox65 --- unaffected
firefox66 --- fixed

People

(Reporter: tsmith, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Keywords: assertion, testcase)

Attachments

(2 files)

Attached file testcase.html

Hit MOZ_CRASH(assertion failed: self.percentage.is_none() || self.unclamped_length() == Length::zero()) at servo/components/style/gecko/values.rs:154

#0 MOZ_CrashOOL(char const*, int, char const*) src/obj-firefox/dist/include/mozilla/Assertions.h:314:3
#1 GeckoCrashOOL src/toolkit/xre/nsAppRunner.cpp:5118:3
#2 gkrust_shared::panic_hook::h73d2b7a1b3bd4390 src/toolkit/library/rust/shared/lib.rs:232:8
#3 core::ops::function::Fn::call::h82b76924918e6723 src/libcore/ops/function.rs:78:4
#4 std::panicking::rust_panic_with_hook::h71214e7ce0f7ac01 /rustc/abe02cefd6cd1916df62ad7dc80161bea50b72e8/src/libstd/panicking.rs:480:16
#5 std::panicking::begin_panic::hc9e7333e97c96bbc src/libstd/panicking.rs:410:4
#6 $LT$style..values..computed..length..LengthPercentage$u20$as$u20$style..gecko..values..GeckoStyleCoordConvertible$GT$::to_gecko_style_coord::h78a1491ad6251efc src/servo/components/style/gecko/values.rs:154:8
#7 style::gecko::values::
$LT$impl$u20$style..gecko_bindings..structs..root..nsStyleCoord$GT$::set::h976b02cb4a369bf1 src/servo/components/style/gecko/values.rs:49:8
#8 style::gecko::conversions::$LT$impl$u20$style..gecko_bindings..structs..root..nsStyleImage$GT$::set_gradient::h99ba57cdacab911b src/servo/components/style/gecko/conversions.rs:364
#9 style::gecko::conversions::
$LT$impl$u20$style..gecko_bindings..structs..root..nsStyleImage$GT$::set::hb812306d0c299bcf src/servo/components/style/gecko/conversions.rs:160
#10 style::gecko_properties::_$LT$impl$u20$style..gecko_bindings..structs..root..mozilla..GeckoDisplay$GT$::set_shape_outside::hf976760869199052 src/obj-firefox/x86_64-unknown-linux-gnu/debug/build/style-92543132ba6cee75/out/gecko_properties.rs:10491:20
#11 style::properties::StyleBuilder::set_shape_outside::h9daf5060b8a1cc21 src/obj-firefox/x86_64-unknown-linux-gnu/debug/build/style-92543132ba6cee75/out/properties.rs:74636:8
#12 style::properties::longhands::shape_outside::cascade_property::h6621eeeffbaf47ba src/obj-firefox/x86_64-unknown-linux-gnu/debug/build/style-92543132ba6cee75/out/longhands/box.rs:7762
#13 style::properties::cascade::Cascade::apply_declaration_ignoring_phase::h9e5f68823a14632f src/servo/components/style/properties/cascade.rs:467:8
#14 style::properties::cascade::Cascade::apply_declaration::h1284d54c74d7448d src/servo/components/style/properties/cascade.rs:452
#15 style::properties::cascade::Cascade::apply_properties::hfa77d3c51e272b8d src/servo/components/style/properties/cascade.rs:548
#16 style::properties::cascade::apply_declarations::h68bc6d6bbefd2dba src/servo/components/style/properties/cascade.rs:306:8
#17 style::properties::cascade::cascade_rules::h353da6fc7748cf22 (.llvm.15926100201539898875) src/servo/components/style/properties/cascade.rs:170
#18 style::properties::cascade::cascade::he795e5cc98f35dc9 src/servo/components/style/properties/cascade.rs:93:4
#19 style::stylist::Stylist::cascade_style_and_visited::h0e1e8cc88049188e src/servo/components/style/stylist.rs:869
#20 _$LT$style..style_resolver..StyleResolverForElement$LT$$u27$a$C$$u20$$u27$ctx$C$$u20$$u27$le$C$$u20$E$GT$$GT$::cascade_style_and_visited::h9471726327ce8b69 src/servo/components/style/style_resolver.rs:306:21
#21 _$LT$style..style_resolver..StyleResolverForElement$LT$$u27$a$C$$u20$$u27$ctx$C$$u20$$u27$le$C$$u20$E$GT$$GT$::cascade_primary_style::h94a0a787dc948be0 (.llvm.11320469231753147112) src/servo/components/style/style_resolver.rs:216:19
#22 $LT$style..style_resolver..StyleResolverForElement$LT$$u27$a$C$$u20$$u27$ctx$C$$u20$$u27$le$C$$u20$E$GT$$GT$::cascade_styles_with_default_parents::$u7b$$u7b$closure$u7d$$u7d$::h83ee5f9788fcff5d src/servo/components/style/style_resolver.rs:336:16
#23 style::style_resolver::with_default_parent_styles::hb8d004b311334445 src/servo/components/style/style_resolver.rs:103:4
#24 _$LT$style..style_resolver..StyleResolverForElement$LT$$u27$a$C$$u20$$u27$ctx$C$$u20$$u27$le$C$$u20$E$GT$$GT$::cascade_styles_with_default_parents::h75e2816b9746fd4a src/servo/components/style/style_resolver.rs:334
#25 style::traversal::compute_style::h8250b3b91260ff89 src/servo/components/style/traversal.rs:668:12
#26 style::traversal::recalc_style_at::h109eb807c63b7f92 src/servo/components/style/traversal.rs:438:36
#27 _$LT$style..gecko..traversal..RecalcStyleOnly$LT$$u27$recalc$GT$$u20$as$u20$style..traversal..DomTraversal$LT$style..gecko..wrapper..GeckoElement$LT$$u27$le$GT$$GT$$GT$::process_preorder::h62ed58c66ade45fc src/servo/components/style/gecko/traversal.rs:37
#28 style::driver::traverse_dom::h313f8e6d81297496 src/servo/components/style/driver.rs:111
#29 geckoservo::glue::traverse_subtree::hfc30e8d2a49df7a0 src/servo/ports/geckolib/glue.rs:332:4
#30 Servo_TraverseSubtree src/servo/ports/geckolib/glue.rs:392:4
#31 mozilla::ServoStyleSet::StyleDocument(mozilla::ServoTraversalFlags) src/layout/style/ServoStyleSet.cpp:919:9
#32 mozilla::RestyleManager::DoProcessPendingRestyles(mozilla::ServoTraversalFlags) src/layout/base/RestyleManager.cpp:2942:20
#33 mozilla::PresShell::DoFlushPendingNotifications(mozilla::ChangesToFlush) src/layout/base/PresShell.cpp:4102:39
#34 nsRefreshDriver::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:1817:18
#35 mozilla::RefreshDriverTimer::TickRefreshDrivers(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp, nsTArray<RefPtr<nsRefreshDriver> >&) src/layout/base/nsRefreshDriver.cpp:305:7
#36 mozilla::RefreshDriverTimer::Tick(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:322:5
#37 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::TickRefreshDriver(mozilla::layers::BaseTransactionId<mozilla::VsyncIdType>, mozilla::TimeStamp) src/layout/base/nsRefreshDriver.cpp:647:16
#38 mozilla::VsyncRefreshDriverTimer::RefreshDriverVsyncObserver::NotifyVsync(mozilla::VsyncEvent const&) src/layout/base/nsRefreshDriver.cpp:547:9
#39 mozilla::layout::VsyncChild::RecvNotify(mozilla::VsyncEvent const&) src/layout/ipc/VsyncChild.cpp:65:16
#40 mozilla::layout::PVsyncChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PVsyncChild.cpp:167:20
#41 mozilla::ipc::PBackgroundChild::OnMessageReceived(IPC::Message const&) src/obj-firefox/ipc/ipdl/PBackgroundChild.cpp:2788:28
#42 mozilla::ipc::MessageChannel::DispatchAsyncMessage(IPC::Message const&) src/ipc/glue/MessageChannel.cpp:2159:21
#43 mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&) src/ipc/glue/MessageChannel.cpp:2086:9
#44 mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&) src/ipc/glue/MessageChannel.cpp:1935:3
#45 mozilla::ipc::MessageChannel::MessageTask::Run() src/ipc/glue/MessageChannel.cpp:1966:13
#46 nsThread::ProcessNextEvent(bool, bool*) src/xpcom/threads/nsThread.cpp:1157:14
#47 NS_ProcessNextEvent(nsIThread*, bool) src/xpcom/threads/nsThreadUtils.cpp:468:10
#48 mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:88:21
#49 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:314:10
#50 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:289:3
#51 nsBaseAppShell::Run() src/widget/nsBaseAppShell.cpp:137:27
#52 XRE_RunAppShell() src/toolkit/xre/nsEmbedFunctions.cpp:915:20
#53 mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) src/ipc/glue/MessagePump.cpp:238:9
#54 MessageLoop::RunInternal() src/ipc/chromium/src/base/message_loop.cc:314:10
#55 MessageLoop::Run() src/ipc/chromium/src/base/message_loop.cc:289:3
#56 XRE_InitChildProcess(int, char**, XREChildData const*) src/toolkit/xre/nsEmbedFunctions.cpp:753:34
#57 content_process_main(mozilla::Bootstrap*, int, char**) src/browser/app/../../ipc/contentproc/plugin-container.cpp:49:28
#58 main src/browser/app/nsBrowserApp.cpp:265:18
#59 __libc_start_main /build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:291
#60 _start (firefox+0x349f4)

Flags: in-testsuite?
Assignee: nobody → emilio
Flags: needinfo?(emilio)
This restores the previous behavior of using calc().

Note that background-position / object-position, which test this, weren't
hitting the assertion because they use another codepath.

I didn't add more extensive tests for this because it's well tested for those
two properties, and because this is legacy anyway, see the comment in the test.

I did add the assertion to the codepath those two properties hit.
Flags: needinfo?(emilio)
Pushed by emilio@crisal.io:
https://hg.mozilla.org/integration/mozilla-inbound/rev/472bcde2c2d1
Three-value position syntax uses calc() as its computed value representation. r=heycam
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Blocks: 1517511
Flags: in-testsuite? → in-testsuite-

This landed with a (albeit minimal) test.

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