Closed Bug 2032954 Opened 7 months ago Closed 7 months ago

Hit MOZ_CRASH(the color could not be resolved even with a currentcolor specified?) at servo/components/style/color/color_function.rs:421

Categories

(DevTools :: Inspector: Layout, defect)

defect

Tracking

(firefox152 fixed)

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: gerard-majax, Assigned: emilio)

References

(Regressed 1 open bug)

Details

Attachments

(1 external file)

Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:

What were you doing?

Force update notification:

Services.prefs.setStringPref("app.update.compulsory_restart", JSON.stringify({
  NotificationPeriodHours: 0,
  RestartTimeOfDay: {
    Hour: 0,
    Minute: 30,
  },
})); Services.obs.notifyObservers(null, "update-staged");

Please tell us what site you were on, and what steps led to the error you are reporting

  1. Enable remote debugging
  2. Open browser toolbox
  3. Generate a notification for force update restart
  4. Try to select it from browser toolbox

What happened?

620673> [620673] Hit MOZ_CRASH(the color could not be resolved even with a currentcolor specified?) at servo/components/style/color/color_function.rs:421
620673> #01: RustMozCrash (/home/alex/codaz/Mozilla/gecko-cinnabar/mozglue/static/rust/wrappers.cpp:17)
620673> #02: mozglue_static::panic_hook (mozglue/static/rust/lib.rs:82)
620673> #03: ??? (/home/alex/codaz/Mozilla/gecko-cinnabar/obj-felt-dbg/dist/bin/libxul.so + 0xd43287c)
620673> #04: std::panicking::rust_panic_with_hook (library/std/src/panicking.rs:843)
620673> #05: std::panicking::begin_panic_handler::{{closure}} (library/std/src/panicking.rs:707)
620673> #06: ??? (/home/alex/codaz/Mozilla/gecko-cinnabar/obj-felt-dbg/dist/bin/libxul.so + 0xe6ff099)
620673> #07: ??? (/home/alex/codaz/Mozilla/gecko-cinnabar/obj-felt-dbg/dist/bin/libxul.so + 0xe70069d)
620673> #08: core::panicking::panic_nounwind_fmt (library/core/src/panicking.rs:90)
620673> #09: ??? (/home/alex/codaz/Mozilla/gecko-cinnabar/obj-felt-dbg/dist/bin/libxul.so + 0xe30de64)
620673> #10: style::values::computed::color::<impl style::values::generics::color::GenericColor<style::values::computed::percentage::Percentage>>::resolve_to_absolute (servo/components/style/values/computed/color.rs:0)
620673> #11: geckoservo::glue::compute_color (servo/ports/geckolib/glue.rs:9038)
620673> #12: Servo_ComputeColor (servo/ports/geckolib/glue.rs:9056)
620673> #13: mozilla::dom::InspectorUtils::ColorToRGBA(mozilla::dom::GlobalObject&, nsTSubstring<char> const&, mozilla::dom::Nullable<mozilla::dom::InspectorRGBATuple>&) (../../../layout/inspector/InspectorUtils.cpp:0)
620673> #14: mozilla::dom::InspectorUtils_Binding::colorToRGBA(JSContext*, unsigned int, JS::Value*) (InspectorUtilsBinding.cpp:4803)

What should have happened?

No assert hit

Anything else we should know?

Debug build required

See the test added for what's going on. Basically, we hit a color we
can't resolve like light-dark() from inside a relative color, and
map_origin_color will happily swallow that error, causing an assert
afterwards (because of a relative color with no origin color) instead of
the failure that's supposed to occur.

Assignee: nobody → emilio
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/2d64b1186982 https://hg.mozilla.org/integration/autoland/rev/3f17b988195e Make map_origin_color not eat error for unresolvable color. r=firefox-style-system-reviewers,layout-reviewers,gerard-majax,dshin
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Regressions: 2033796
QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: