glutin icon indicating copy to clipboard operation
glutin copied to clipboard

ESG_BAD_ACCESS in eglInitialize

Open jean-airoldie opened this issue 2 years ago • 1 comments

When running any glutin example on master (988b070a6378533d7c296cfcd64dae0c3f162fc9) with rustc 1.60 on ubuntu 21.10, linux kernel version 5.13.0, sometimes I get this error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: CreationErrors([OsError("eglInitialize failed"), OsError("GL context creation failed")])', glutin_examples/examples/damage.rs:32:74
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/panicking.rs:143:14
   2: core::result::unwrap_failed
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1749:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/result.rs:1065:23
   4: damage::main
             at ./glutin_examples/examples/damage.rs:32:28
   5: core::ops::function::FnOnce::call_once
             at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

When I look at the actual error code that is returned using eglGetError after the eglInitialize call, I get error 12290 which corresponds to BAD_ACCESS when I check in the generated egl_bindings.rs file.

jean-airoldie avatar May 19 '22 20:05 jean-airoldie

I can't find any documentation on the fact that eglInitialize can even return EGL_BAD_ACCESS.

jean-airoldie avatar May 19 '22 21:05 jean-airoldie

I'm not sure why it happened, but try the latest master.

kchibisov avatar Sep 03 '22 06:09 kchibisov

No longer using ubuntu, so can't reproduce the issue. Unsure what this was about.

jean-airoldie avatar Sep 05 '22 21:09 jean-airoldie