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

assertion failed: !needs_clipping || batch.key.blend_mode == BlendMode::Alpha || batch.key.blend_mode == BlendMode::PremultipliedAlpha #16777

Closed
behnam opened this issue May 9, 2017 · 7 comments
Labels
A-webrender C-reproduced I-panic Servo encounters a panic.

Comments

@behnam
Copy link
Contributor

behnam commented May 9, 2017

On a dev build on master (81f273b), I get the following failed assertion:

$ ./mach run https://www.google.com?hl=ar
assertion failed: !needs_clipping || batch.key.blend_mode == BlendMode::Alpha ||
    batch.key.blend_mode == BlendMode::PremultipliedAlpha (thread main, at /Users/behnam/code/rust/servo/.cargo/git/checkouts/webrender-c3596abe1cf4f320/005eb39/webrender/src/renderer.rs:1506)
stack backtrace:
   0:        0x1092c0bb4 - backtrace::backtrace::trace::hc04eef90157d46bd
   1:        0x1092b932f - backtrace::capture::Backtrace::new::h5e598cddffa26117
   2:        0x1057f2296 - servo::main::_$u7b$$u7b$closure$u7d$$u7d$::hdae71a2e43b7d51b
   3:        0x10aba0e96 - std::panicking::rust_panic_with_hook::h2bd2f0b446f0face
                        at src/libstd/panicking.rs:550
   4:        0x1097010a5 - std::panicking::begin_panic::haf2b6374444f377d
   5:        0x109908b82 - webrender::renderer::Renderer::submit_batch::h65aed72e2f129087
   6:        0x10990b357 - webrender::renderer::Renderer::draw_color_target::h4a7df30d0748463e
   7:        0x10990d3ff - webrender::renderer::Renderer::draw_tile_frame::h23c3f6eb38d120fc
   8:        0x109905eb2 - webrender::renderer::Renderer::render::_$u7b$$u7b$closure$u7d$$u7d$::he5d9d628762261da
   9:        0x1098dd755 - webrender::profiler::TimeProfileCounter::profile::h75b84045babc7abe
  10:        0x10990587b - webrender::renderer::Renderer::render::h774b8d7d420477a3
  11:        0x10585584d - _$LT$compositing..compositor..IOCompositor$LT$Window$GT$$GT$::composite_specific_target::_$u7b$$u7b$closure$u7d$$u7d$::h4fea5509359fd135
  12:        0x105832512 - profile_traits::time::profile::h854a098829aaea4b
  13:        0x10579bbee - compositing::compositor::{{impl}}::composite_specific_target<glutin_app::window::Window>
                        at /Users/behnam/code/rust/servo/components/compositing/compositor.rs:1522
  14:        0x1057a1b0f - compositing::compositor::{{impl}}::composite<glutin_app::window::Window>
                        at /Users/behnam/code/rust/servo/components/compositing/compositor.rs:1466
  15:        0x105792f91 - compositing::compositor::{{impl}}::handle_events<glutin_app::window::Window>
                        at /Users/behnam/code/rust/servo/components/compositing/compositor.rs:1681
  16:        0x1057b3a3a - _$LT$servo..Browser$LT$Window$GT$$GT$::handle_events::h357f2c928362d20f
  17:        0x1057f198a - servo::main::h50470fc599e5d400
  18:        0x10aba1ffa - __rust_maybe_catch_panic
                        at src/libpanic_unwind/lib.rs:98
  19:        0x10aba12c1 - std::rt::lang_start::hbda94898b2b88ae4
                        at src/libstd/rt.rs:57
  20:        0x1057f2829 - main
ERROR:servo: assertion failed: !needs_clipping || batch.key.blend_mode == BlendMode::Alpha ||
    batch.key.blend_mode == BlendMode::PremultipliedAlpha
Servo exited with return value 101

System: macOS/MacPorts
rustc 1.17.0 (56124baa9 2017-04-24)
cargo 0.18.0 (fe7b0cdcf 2017-04-24)

@jdm jdm added A-webrender I-panic Servo encounters a panic. labels May 9, 2017
@jdm
Copy link
Member

jdm commented May 9, 2017

cc @glennw

@cbrewster
Copy link
Contributor

I am also hitting this panic whenever running browser.html ./mach run -d -b

@jdm
Copy link
Member

jdm commented May 18, 2017

I reproduce this on reddit.com.

@jdm
Copy link
Member

jdm commented May 18, 2017

(lldb) p batch.key
(webrender::tiling::AlphaBatchKey) $0 = AlphaBatchKey {
kind: TextRun,
flags: AlphaBatchKeyFlags {
bits: '\x03'
},
blend_mode: Subpixel(ColorF {
r: 0,
g: 0,
b: 0,
a: 1
}),
textures: BatchTextures {
colors: [TextureCache(CacheTextureId(0)), Invalid, Invalid]
}
}

@jdm
Copy link
Member

jdm commented May 18, 2017

(lldb) p *batch
(webrender::tiling::PrimitiveBatch) $2 = PrimitiveBatch {
key: AlphaBatchKey {
kind: TextRun,
flags: AlphaBatchKeyFlags {
bits: '\x03'
},
blend_mode: Subpixel(ColorF {
r: 0,
g: 0,
b: 0,
a: 1
}),
textures: BatchTextures {
colors: [TextureCache(CacheTextureId(0)), Invalid, Invalid]
}
},
instances: vec![PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6524,
z_sort_index: 164,
user_data: [6012, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6525,
z_sort_index: 164,
user_data: [6013, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6526,
z_sort_index: 164,
user_data: [6014, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6527,
z_sort_index: 164,
user_data: [6015, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6528,
z_sort_index: 164,
user_data: [6016, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6529,
z_sort_index: 164,
user_data: [6017, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6530,
z_sort_index: 164,
user_data: [6018, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6531,
z_sort_index: 164,
user_data: [6019, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6532,
z_sort_index: 164,
user_data: [6020, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6533,
z_sort_index: 164,
user_data: [6021, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6534,
z_sort_index: 164,
user_data: [6022, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6535,
z_sort_index: 164,
user_data: [6023, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6536,
z_sort_index: 164,
user_data: [6024, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6537,
z_sort_index: 164,
user_data: [6025, 0]
}, PrimitiveInstance {
global_prim_id: 555,
prim_address: GpuStoreAddress(6523),
task_index: 0,
clip_task_index: 41,
layer_index: 15,
sub_index: 6538,
z_sort_index: 164,
user_data: [6026, 0]
}],
item_rects: vec![TypedRect<i32, webrender_traits::units::DevicePixel> {
origin: TypedPoint2D<i32, webrender_traits::units::DevicePixel> {
x: 1479,
y: 1426,
_unit: PhantomData<webrender_traits::units::DevicePixel> {

}
},
size: TypedSize2D<i32, webrender_traits::units::DevicePixel> {
width: 199,
height: 17,
_unit: PhantomData<webrender_traits::units::DevicePixel> {

}
}
}]
}

@glennw
Copy link
Member

glennw commented May 18, 2017

@jdm I'll fix this today - the assert is incorrect.

@glennw
Copy link
Member

glennw commented May 18, 2017

In the interim, until this lands in Servo - you should be able to prevent the assertion by running with an extra option - -Z disable-subpixel-aa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-webrender C-reproduced I-panic Servo encounters a panic.
Projects
None yet
Development

No branches or pull requests

4 participants