Closed Bug 1366921 Opened 8 years ago Closed 8 years ago

stylo: Assertion failure: NS_IsMainThread() in test_unicode_range_loading.html

Categories

(Core :: CSS Parsing and Computation, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: xidorn, Assigned: heycam)

References

Details

Attachments

(1 file)

It seems it is something related to font metrics. Assertion failure: NS_IsMainThread(), at /gfx/thebes/gfxUserFontSet.cpp:332 #01: gfxUserFontFamily::`scalar deleting destructor'[\obj-firefox-stylo\dist\bin\xul.dll +0x22c0a74] #02: gfxFontFamily::Release (\gfx\thebes\gfxfontentry.h:594) #03: nsTArray_Impl<gfxFontGroup::FamilyFace,nsTArrayInfallibleAllocator>::RemoveElementsAt (\obj-firefox-stylo\dist\include\nstarray.h:2055) #04: gfxFontGroup::UpdateUserFonts (\gfx\thebes\gfxtextrun.cpp:3304) #05: nsFontCache::GetMetricsFor (\gfx\src\nsdevicecontext.cpp:138) #06: nsDeviceContext::GetMetricsFor (\gfx\src\nsdevicecontext.cpp:228) #07: nsRuleNode::GetMetricsFor (\layout\style\nsrulenode.cpp:391) #08: Gecko_GetFontMetrics (\layout\style\servobindings.cpp:2041) #09: style::gecko::wrapper::{{impl}}::query (\servo\components\style\gecko\wrapper.rs:538) #10: style::values::specified::length::{{impl}}::to_computed_value::query_font_metrics (\servo\components\style\values\specified\length.rs:111) #11: style::values::specified::length::FontRelativeLength::to_computed_value (\servo\components\style\values\specified\length.rs:120) #12: style::values::computed::length::{{impl}}::to_computed_value (\servo\components\style\values\computed\length.rs:28) #13: style::values::computed::length::{{impl}}::to_computed_value (\servo\components\style\values\computed\length.rs:373) #14: style::properties::longhands::width::cascade_property::{{closure}} (\obj-firefox-stylo\toolkit\library\x86_64-pc-windows-msvc\debug\build\style-206ac7d25ce0dc14\out\properties.rs:51266) #15: style::properties::substitute_variables_width<closure> (\obj-firefox-stylo\toolkit\library\x86_64-pc-windows-msvc\debug\build\style-206ac7d25ce0dc14\out\properties.rs:110859) #16: style::properties::longhands::width::cascade_property (\obj-firefox-stylo\toolkit\library\x86_64-pc-windows-msvc\debug\build\style-206ac7d25ce0dc14\out\properties.rs:51295) #17: style::properties::apply_declarations<closure,core::iter::FlatMap<style::rule_tree::SelfAndAncestors, core::iter::FilterMap<core::iter::Rev<core::slice::Iter<(style::properties::PropertyDeclaration, style::properties::declaration_block::Importance)>>, clo (\obj-firefox-stylo\toolkit\library\x86_64-pc-windows-msvc\debug\build\style-206ac7d25ce0dc14\out\properties.rs:153364) #18: style::properties::cascade (\obj-firefox-stylo\toolkit\library\x86_64-pc-windows-msvc\debug\build\style-206ac7d25ce0dc14\out\properties.rs:153072) #19: style::matching::PrivateMatchMethods::cascade_with_rules<style::gecko::wrapper::GeckoElement> (\servo\components\style\matching.rs:226) #20: style::matching::PrivateMatchMethods::cascade_internal<style::gecko::wrapper::GeckoElement> (\servo\components\style\matching.rs:275) #21: style::matching::PrivateMatchMethods::cascade_primary<style::gecko::wrapper::GeckoElement> (\servo\components\style\matching.rs:295) #22: style::matching::MatchMethods::match_and_cascade<style::gecko::wrapper::GeckoElement> (\servo\components\style\matching.rs:618) #23: style::traversal::compute_style<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\traversal.rs:756) #24: style::traversal::recalc_style_at<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\traversal.rs:620) #25: style::gecko::traversal::{{impl}}::process_preorder (\servo\components\style\gecko\traversal.rs:47) #26: style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\parallel.rs:150) #27: style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\parallel.rs:150) #28: style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\parallel.rs:150) #29: style::parallel::traverse_nodes<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\parallel.rs:150) #30: style::parallel::traverse_dom::{{closure}}::{{closure}}<style::gecko::wrapper::GeckoElement,style::gecko::traversal::RecalcStyleOnly> (\servo\components\style\parallel.rs:76) #31: rayon_core::scope::{{impl}}::execute_job_closure::{{closure}}<closure,()> (\third_party\rust\rayon-core\src\scope\mod.rs:354) #32: std::panic::{{impl}}::call_once<(),closure> (C:\projects\rust\src\libstd\panic.rs:297) #33: std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure>,()> (C:\projects\rust\src\libstd\panicking.rs:456) #34: panic_abort::__rust_maybe_catch_panic (C:\projects\rust\src\libpanic_abort\lib.rs:42)
Manish, could you have a look at this?
Flags: needinfo?(manishearth)
Unsure, Cameron did most of the threadsafety work here. Moving over to him. Not sure why we're removing elements there.
Flags: needinfo?(manishearth) → needinfo?(cam)
Assignee: nobody → cam
Status: NEW → ASSIGNED
Flags: needinfo?(cam)
r?bholley for the layout/ bits and r?jfkthame for the gfx/ bits.
Comment on attachment 8870739 [details] Bug 1366921 - stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. https://reviewboard.mozilla.org/r/142234/#review145984
Comment on attachment 8870739 [details] Bug 1366921 - stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. https://reviewboard.mozilla.org/r/142234/#review146870 Sorry, forgot to hit publish a few days ago. :-(
Attachment #8870739 - Flags: review?(bobbyholley) → review+
Comment on attachment 8870739 [details] Bug 1366921 - stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. https://reviewboard.mozilla.org/r/142234/#review146900 ::: gfx/src/nsDeviceContext.cpp:234 (Diff revision 1) > + InitFontCache(); > + mFontCache->UpdateUserFonts(aUserFontSet); Just wondering, do we need to force creation of the font cache here, or would it be sufficient to do if (mFontCache) { mFontCache->UpdateUserFonts(...) } ?
Attachment #8870739 - Flags: review?(jfkthame) → review+
Comment on attachment 8870739 [details] Bug 1366921 - stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. https://reviewboard.mozilla.org/r/142234/#review146900 > Just wondering, do we need to force creation of the font cache here, or would it be sufficient to do > > if (mFontCache) { > mFontCache->UpdateUserFonts(...) > } > > ? Doing that should be fine.
Could you try enabling test_unicode_range_loading.html and see what would happen? Currently this test is only blocked by this bug.
Pushed by cmccormack@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2104bff8e6c1 stylo: Update user fonts in cached font metrics' gfxFontGroups in the pre-traversal step. r=bholley,jfkthame
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: