servo / webrender

A GPU-based renderer for the web
https://doc.servo.org/webrender/
Mozilla Public License 2.0
3.11k stars 276 forks source link

panic in device.rs - "gleam only detects bgra on gles" #3509

Open fschutt opened 5 years ago

fschutt commented 5 years ago

I've gotten an error report that I think is related to webrender. I couldn't contact the user about GPU / driver information, but still wanted to report the bug, in case it is useful:

~\.cargo\git\checkouts\webrender-c3596abe1cf4f320\92235d1\webrender\src\device\gl.rs 
at line 1109 in thread main

Error information:
assertion failed: `(left == right)`
  left: `Gl`,
 right: `Gles`: gleam only detects bgra on gles

Backtrace:

azul::logging::set_up_panic_hooks @ logging.rs:87
core::ops::function::Fn::call<fn(core::panic::PanicInfo*),(core::panic @ function.rs:69
std::panicking @ panicking.rs:485
std::panicking @ panicking.rs:385
std::panicking @ panicking.rs:340
webrender::device::gl::Device @ gl.rs:1109
webrender::renderer::Renderer @ renderer.rs:1649
azul::window::Window<test_azul::DataModel>::new<test_azul @ window.rs:832
test_azul @ test_azul.rs:30
std::rt::lang_start @ rt.rs:64
std::panicking::try @ panicking.rs:297
panic_unwind @ lib.rs:92
std::rt @ rt.rs:48
std::rt @ rt.rs:64
 @ exe_common.inl:288

The failure seems to be here: https://github.com/servo/webrender/blob/04fb963d8310f0d94388a740c9f22d46701af6da/webrender/src/device/gl.rs#L1107

Webrender version: https://github.com/servo/webrender/commit/92235d1fc4ff4c4fb4e1ed709eb3136e96c786b5

Again, not sure what to make from this, but I just wanted to report it in case it is useful to anyone.

Ray-V commented 5 years ago

I've cross compiled servo for the Raspberry Pi3 and get the same error.

The window appears momentarily and then crashes.

Stepping through gdb, I get:

# LIBGL_ALWAYS_SOFTWARE=1 gdb ./servo
...
Reading symbols from ./servo...done.
(gdb) start
Temporary breakpoint 1 at 0x19c664
Starting program: /Servo-2/servo
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".

Temporary breakpoint 1, 0x54c46664 in main ()
(gdb) step
Single stepping until exit from function main,
which has no line number information.
[New Thread 0x719bde60 (LWP 1259)]
[New Thread 0x711bce60 (LWP 1260)]
[New Thread 0x705fee60 (LWP 1261)]
[New Thread 0x6fdfde60 (LWP 1262)]
[New Thread 0x6ee18e60 (LWP 1263)]
[New Thread 0x6e7fee60 (LWP 1264)]
[New Thread 0x6e5fde60 (LWP 1265)]
assertion failed: `(left == right)`
  left: `Gl`,
 right: `Gles`: gleam only detects bgra on gles (thread main, at
 /root/.cargo/git/checkouts/webrender-c3596abe1cf4f320/2ff8da0/webrender/src/device/gl.rs:1107)
[Thread 0x6e7fee60 (LWP 1264) exited]
[Thread 0x6ee18e60 (LWP 1263) exited]
0x766a56f0 in __libc_start_main () from /lib/libc.so.6
(gdb)               #### window displays at this point ... ####
Single stepping until exit from function __libc_start_main,
which has no line number information.
[Thread 0x6e5fde60 (LWP 1265) exited]
[Thread 0x6fdfde60 (LWP 1262) exited]
[Thread 0x705fee60 (LWP 1261) exited]
[Thread 0x711bce60 (LWP 1260) exited]
[Thread 0x76fee020 (LWP 1256) exited]
[Inferior 1 (process 1256) exited with code 0145]
(gdb)               #### ... and now it's gone ####

The tail end of strace output is:

write(1, "assertion failed: `(left == righ"..., 50assertion failed: `(left == right)`
  left: `Gl`,
) = 50
write(1, " right: `Gles`: gleam only detec"..., 160 right: `Gles`: gleam only detects bgra on gles (thread main, at
 /root/.cargo/git/checkouts/webrender-c3596abe1cf4f320/2ff8da0/webrender/src/device/gl.rs:1107)
) = 160
close(18)                               = 0
close(17)                               = 0
close(16)                               = 0
close(6)                                = 0
close(8)                                = 0
close(4)                                = 0
munmap(0x75b1c000, 356352)              = 0
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x76f14000, 8192)                = 0
exit_group(101)                         = ?
+++ exited with 101 +++
jrmuizel commented 5 years ago

WebRender requires OpenGL ES 3 so it won't work on a RaspberryPi. Perhaps this error is just a bad way of reporting the lack of ES 3