Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find glyph key cache after recent text transform changes #2093

Closed
mrobinson opened this issue Nov 23, 2017 · 8 comments
Closed

Unable to find glyph key cache after recent text transform changes #2093

mrobinson opened this issue Nov 23, 2017 · 8 comments

Comments

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Nov 23, 2017

After #2058, when I try to run the recorded yaml from #1817. I see this error:

thread 'WRRenderBackend#0' panicked at 'BUG: Unable to find glyph key cache!', /checkout/src/libcore/option.rs:819:4

when I run

cargo run --release -- -p 1 show ~/Downloads/w3/w3.yaml
@mrobinson
Copy link
Member Author

@mrobinson mrobinson commented Nov 23, 2017

@mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2017

I also see this crash when I open that page (https://www.w3.org/conf/2013sf/) in Firefox in a Firefox build that includes the webrender update that includes #2058.

@mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2017

* thread #51, name = 'WRRenderBackend#1', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x0000000102685235 libmozglue.dylib`mozalloc_abort(char const*) + 53
    frame #1: 0x0000000102685260 libmozglue.dylib`abort + 16
    frame #2: 0x000000010712e7c9 XUL`rust_panic + 9
    frame #3: 0x000000010712e19e XUL`std::panicking::rust_panic_with_hook::he7ea255c9426c7e7 + 366
    frame #4: 0x000000010712dfdc XUL`std::panicking::begin_panic::hb2bff8bfb74238d7 + 124
    frame #5: 0x000000010712df53 XUL`std::panicking::begin_panic_fmt::h7d0fd00c38594036 + 147
    frame #6: 0x000000010713b4eb XUL`core::panicking::panic_fmt::h584b3a57b69b22f9 + 91
    frame #7: 0x0000000107140c2e XUL`core::option::expect_failed::hc8bc355caf9b01a5 + 94
    frame #8: 0x0000000106db3dad XUL`webrender::glyph_cache::GlyphCache::get_glyph_key_cache_for_font::h2b7a4c398e37666f + 221
    frame #9: 0x0000000106db10e5 XUL`_$LT$webrender..tiling..ColorRenderTarget$u20$as$u20$webrender..tiling..RenderTarget$GT$::add_task::h0427ac6b858f4dbf + 693
    frame #10: 0x0000000106da655c XUL`webrender::render_backend::Document::render::h6c52c7947dada65c + 8972
    frame #11: 0x0000000106d96298 XUL`webrender::render_backend::RenderBackend::process_document::hd5b54f38adb3a524 + 7368
    frame #12: 0x0000000106d874d1 XUL`webrender::render_backend::RenderBackend::run::h0c1f5adcd5360569 + 4769
    frame #13: 0x0000000106d85801 XUL`std::sys_common::backtrace::__rust_begin_short_backtrace::h65c8f8387fc11000 + 2545
    frame #14: 0x0000000106d84da0 XUL`_$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::hf8796a6b388fc3f4 + 160
    frame #15: 0x0000000107138ab4 XUL`std::sys::imp::thread::Thread::new::thread_start::h48c72bb09587cbc3 + 132
    frame #16: 0x00007fffc763993b libsystem_pthread.dylib`_pthread_body + 180
    frame #17: 0x00007fffc7639887 libsystem_pthread.dylib`_pthread_start + 286
    frame #18: 0x00007fffc763908d libsystem_pthread.dylib`thread_start + 13
@mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2017

Reduced testcase: data:text/html,<div style="transform:rotate(-20deg);text-shadow:0 0 1px blue">Test

transformed text shadows seem to be busted

@staktrace
Copy link
Contributor

@staktrace staktrace commented Nov 23, 2017

We should add a gecko reftest for this; presumably the crash would have shown up in my try pushes if we had one

@lsalzman
Copy link
Contributor

@lsalzman lsalzman commented Nov 23, 2017

Markus is working on a yaml testcase for wrench

@mstange
Copy link
Contributor

@mstange mstange commented Nov 23, 2017

possible YAML testcase, haven't tested it yet:

root:
  items:
    - type: stacking-context
      bounds: [0, 0, 430, 330]
      transform: rotate(30)
      items:
      - type: "shadow"
        bounds: [0, 0, 430, 330]
        blur-radius: 1
        offset: [0, 1]
        color: blue
      - text: "a Bcd Efgh Ijklm Nopqrs Tuvwxyz"
        origin: 50 200
        size: 20
        font: "FreeSans.ttf"
      - type: "pop-all-shadows"
bors-servo added a commit that referenced this issue Nov 23, 2017
ensure that we request glyphs without a transform for text shadows

This passes down the rasterization space information into TextRunPrimitiveCpu::prepare_for_render, so that we can ensure glyph requests are kicked off with no transform for text shadows (as discussed with gw). Text shadows do not supply a any transform when calling fetch_glyphs, so if we don't make sure to request the glyphs without a transform, this will cause the crash in issue #2093. Crashtest supplied courtesy of mstange.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2094)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 23, 2017
ensure that we request glyphs without a transform for text shadows

This passes down the rasterization space information into TextRunPrimitiveCpu::prepare_for_render, so that we can ensure glyph requests are kicked off with no transform for text shadows (as discussed with gw). Text shadows do not supply a any transform when calling fetch_glyphs, so if we don't make sure to request the glyphs without a transform, this will cause the crash in issue #2093. Crashtest supplied courtesy of mstange.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2094)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Nov 24, 2017
ensure that we request glyphs without a transform for text shadows

This passes down the rasterization space information into TextRunPrimitiveCpu::prepare_for_render, so that we can ensure glyph requests are kicked off with no transform for text shadows (as discussed with gw). Text shadows do not supply a any transform when calling fetch_glyphs, so if we don't make sure to request the glyphs without a transform, this will cause the crash in issue #2093. Crashtest supplied courtesy of mstange.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/2094)
<!-- Reviewable:end -->
@glennw
Copy link
Member

@glennw glennw commented Dec 14, 2017

This got fixed.

@glennw glennw closed this Dec 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.