emilk / egui

egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
https://www.egui.rs/
Apache License 2.0
22.32k stars 1.61k forks source link

Can't run any of the examples in Windows, error "swap contol extrensions are not supported" #2545

Open expend20 opened 1 year ago

expend20 commented 1 year ago

I tried to build few examples on Windows and was getting the error:

error: `-Csplit-debuginfo=unpacked` is unstable on this platform

Once I commented the line split-debuginfo = "unpacked" in root's Cargo.toml, now I'm getting:

C:\git\egui\examples\hello_world>cargo run
warning: C:\git\egui\crates\eframe\Cargo.toml: unused manifest key: target.cfg(not(target_arch = "wasm32")).dependencies.glutin.es
   Compiling hello_world v0.1.0 (C:\git\egui\examples\hello_world)
    Finished dev [unoptimized + debuginfo] target(s) in 1.84s
     Running `C:\git\egui\target\debug\hello_world.exe`
Error: Glutin(Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") })
error: process didn't exit successfully: `C:\git\egui\target\debug\hello_world.exe` (exit code: 1)

If I run release version the .exe file just exits

C:\git\egui\examples\hello_world>cargo run --release
warning: C:\git\egui\crates\eframe\Cargo.toml: unused manifest key: target.cfg(not(target_arch = "wasm32")).dependencies.glutin.es
    Finished release [optimized] target(s) in 0.40s
     Running `C:\git\egui\target\release\hello_world.exe`
error: process didn't exit successfully: `C:\git\egui\target\release\hello_world.exe` (exit code: 1)

rustc version is fixed in rust-toolchain to 1.65.0-x86_64-pc-windows-msvc, however I tried to remove it and use 1.66.0 as well as nightly with the same result, I also tried on current master branch as well as 0.20.1 without luck. On 0.20.1 however I was able to capture call stack:

Backtrace

``` thread 'main' panicked at 'failed to set vsync swap interval: Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }', crates\eframe\src\native\run.rs:415:18 stack backtrace: 0: 0x7ff691bea6b2 - std::backtrace_rs::backtrace::dbghelp::trace at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98 1: 0x7ff691bea6b2 - std::backtrace_rs::backtrace::trace_unsynchronized at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66 2: 0x7ff691bea6b2 - std::sys_common::backtrace::_print_fmt at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\sys_common\backtrace.rs:65 3: 0x7ff691bea6b2 - std::sys_common::backtrace::_print::impl$0::fmt at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\sys_common\backtrace.rs:44 4: 0x7ff691c021fb - core::fmt::write at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\core\src\fmt\mod.rs:1208 5: 0x7ff691be75ca - std::io::Write::write_fmt at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\io\mod.rs:1682 6: 0x7ff691bea3fb - std::sys_common::backtrace::_print at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\sys_common\backtrace.rs:47 7: 0x7ff691bea3fb - std::sys_common::backtrace::print at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\sys_common\backtrace.rs:34 8: 0x7ff691becd29 - std::panicking::default_hook::closure$1 at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:267 9: 0x7ff691bec9ab - std::panicking::default_hook at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:286 10: 0x7ff691bed5c0 - std::panicking::rust_panic_with_hook at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:688 11: 0x7ff691bed34e - std::panicking::begin_panic_handler::closure$0 at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:579 12: 0x7ff691beb0cf - std::sys_common::backtrace::__rust_end_short_backtrace at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\sys_common\backtrace.rs:137 13: 0x7ff691bed000 - std::panicking::begin_panic_handler at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:575 14: 0x7ff691c145d5 - core::panicking::panic_fmt at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\core\src\panicking.rs:64 15: 0x7ff691c14a86 - core::result::unwrap_failed at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\core\src\result.rs:1790 16: 0x7ff69196a96c - enum2$,glutin::error::Error> >::expect,glutin::error::Error> at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\core\src\result.rs:1069 17: 0x7ff6919393c8 - eframe::native::run::glow_integration::GlutinWindowContext::new at C:\git\egui\crates\eframe\src\native\run.rs:413 18: 0x7ff691939ad1 - eframe::native::run::glow_integration::GlowWinitApp::create_glutin_windowed_context at C:\git\egui\crates\eframe\src\native\run.rs:505 19: 0x7ff691939c96 - eframe::native::run::glow_integration::GlowWinitApp::init_run_state at C:\git\egui\crates\eframe\src\native\run.rs:521 20: 0x7ff69193b5da - eframe::native::run::glow_integration::impl$2::on_event at C:\git\egui\crates\eframe\src\native\run.rs:733 21: 0x7ff6919632ba - eframe::native::run::run_and_return::closure$0 at C:\git\egui\crates\eframe\src\native\run.rs:140 22: 0x7ff691948b27 - winit::platform_impl::platform::event_loop::impl$3::run_return::closure$0,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs:254 23: 0x7ff6919614d4 - alloc::boxed::impl$46::call_mut > >,ref_mut$ > >,dyn$ > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:250 25: 0x7ff691987f34 - core::panic::unwind_safe::impl$23::call_once,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0 > > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\core\src\panic\unwind_safe.rs:271 26: 0x7ff69197d598 - std::panicking::try::do_call > >,tuple$<> > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\panicking.rs:483 27: 0x7ff69197da43 - std::panicking::try::do_catch >,tuple$ 28: 0x7ff69197cd50 - std::panicking::try,core::panic::unwind_safe::AssertUnwindSafe > > > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\panicking.rs:447 29: 0x7ff69195a9f2 - std::panic::catch_unwind > >,tuple$<> > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\panic.rs:140 30: 0x7ff69197219a - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::catch_unwind,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::clos at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:157 31: 0x7ff69197420b - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::call_event_handler > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:242 32: 0x7ff691973af3 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::call_new_events > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:402 33: 0x7ff6919731ec - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::move_state_to > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:312 34: 0x7ff691974cc7 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::poll > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:206 35: 0x7ff691947e22 - winit::platform_impl::platform::event_loop::EventLoop >::run_return,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs:263 36: 0x7ff691967738 - winit::platform::run_return::impl$0::run_return,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\john\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform\run_return.rs:62 37: 0x7ff691962cee - eframe::native::run::run_and_return at C:\git\egui\crates\eframe\src\native\run.rs:107 38: 0x7ff6919473ea - eframe::native::run::glow_integration::run_glow::closure$0 at C:\git\egui\crates\eframe\src\native\run.rs:852 39: 0x7ff691962726 - eframe::native::run::with_event_loop::closure$0 at C:\git\egui\crates\eframe\src\native\run.rs:96 40: 0x7ff69195f5f0 - std::thread::local::LocalKey > > > > >::try_with > > > > >::with at C:\git\egui\crates\eframe\src\native\run.rs:89 43: 0x7ff69193ba3f - eframe::native::run::glow_integration::run_glow at C:\git\egui\crates\eframe\src\native\run.rs:845 44: 0x7ff69192dc21 - eframe::run_native at C:\git\egui\crates\eframe\src\lib.rs:192 45: 0x7ff69191317a - hello_world::main at C:\git\egui\examples\hello_world\src\main.rs:13 46: 0x7ff69191348b - core::ops::function::FnOnce::call_once > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\core\src\ops\function.rs:250 47: 0x7ff691911bde - std::sys_common::backtrace::__rust_begin_short_backtrace > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\sys_common\backtrace.rs:121 48: 0x7ff691911bde - std::sys_common::backtrace::__rust_begin_short_backtrace > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\sys_common\backtrace.rs:121 49: 0x7ff691911b11 - std::rt::lang_start::closure$0 > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\rt.rs:166 50: 0x7ff691be358e - core::ops::function::impls::impl$2::call_once at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\core\src\ops\function.rs:287 51: 0x7ff691be358e - std::panicking::try::do_call at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:483 52: 0x7ff691be358e - std::panicking::try at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:447 53: 0x7ff691be358e - std::panic::catch_unwind at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panic.rs:140 54: 0x7ff691be358e - std::rt::lang_start_internal::closure$2 at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\rt.rs:148 55: 0x7ff691be358e - std::panicking::try::do_call at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:483 56: 0x7ff691be358e - std::panicking::try at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panicking.rs:447 57: 0x7ff691be358e - std::panic::catch_unwind at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\panic.rs:140 58: 0x7ff691be358e - std::rt::lang_start_internal at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1/library\std\src\rt.rs:148 59: 0x7ff691911aea - std::rt::lang_start > at /rustc/659e169d37990b9c730a59a96081f2ef7afbe8f1\library\std\src\rt.rs:165 60: 0x7ff691913329 - main 61: 0x7ff691c0a25c - invoke_main at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78 62: 0x7ff691c0a25c - __scrt_common_main_seh at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 63: 0x7ff8de1f7614 - BaseThreadInitThunk 64: 0x7ff8df9826a1 - RtlUserThreadStart error: process didn't exit successfully: `C:\git\egui\target\debug\hello_world.exe` (exit code: 101) ```

Meta

C:\git\egui\examples\hello_world>rustc --version --verbose
rustc 1.65.0 (897e37553 2022-11-02)
binary: rustc
commit-hash: 897e37553bba8b42751c67658967889d11ecd120
commit-date: 2022-11-02
host: x86_64-pc-windows-msvc
release: 1.65.0
LLVM version: 15.0.0

C:\git\egui\examples\hello_world>rustc --version --verbose
rustc 1.66.0 (69f9c33d7 2022-12-12)
binary: rustc
commit-hash: 69f9c33d71c871fc16ac445211281c6e7a340943
commit-date: 2022-12-12
host: x86_64-pc-windows-msvc
release: 1.66.0
LLVM version: 15.0.2

C:\git\egui\examples\hello_world>rustc +nightly --version --verbose
rustc 1.68.0-nightly (659e169d3 2023-01-04)
binary: rustc
commit-hash: 659e169d37990b9c730a59a96081f2ef7afbe8f1
commit-date: 2023-01-04
host: x86_64-pc-windows-msvc
release: 1.68.0-nightly
LLVM version: 15.0.6

I aslo tried it on windows 10 10.0.19045.2364 and windows 11 10.0.22621.963 all having the same error.

coderedart commented 1 year ago

can you try https://github.com/coderedart/egui fork with glutin_winit branch and see if the issue is fixed.

expend20 commented 1 year ago

Sure, tried next:

coderedart commented 1 year ago

You need to do cargo clean after that split debug info change.

And are you getting the same glutin error ?

expend20 commented 1 year ago

I did, it was a git clone&checkout to new directory. It's just boring to watch 5 minute gif, so I built it before the record. Here is the log with cargo clean before the build if you need it

cargo clean log ``` C:\git\egui_red\examples\hello_world>cargo clean C:\git\egui_red\examples\hello_world>cargo run Compiling cfg-if v1.0.0 Compiling proc-macro2 v1.0.47 Compiling autocfg v1.1.0 Compiling quote v1.0.21 Compiling unicode-ident v1.0.5 Compiling syn v1.0.105 Compiling windows_x86_64_msvc v0.42.0 Compiling once_cell v1.16.0 Compiling ident_case v1.0.1 Compiling smallvec v1.10.0 Compiling lock_api v0.4.9 Compiling parking_lot_core v0.9.5 Compiling fnv v1.0.7 Compiling windows-sys v0.42.0 Compiling scopeguard v1.1.0 Compiling winapi v0.3.9 Compiling darling_core v0.14.2 Compiling log v0.4.17 Compiling khronos_api v3.1.0 Compiling parking_lot v0.12.1 Compiling windows_x86_64_msvc v0.36.1 Compiling xml-rs v0.8.4 Compiling gl_generator v0.14.0 Compiling arrayvec v0.7.2 Compiling kurbo v0.8.3 Compiling version_check v0.9.4 Compiling bitflags v1.3.2 Compiling cty v0.2.2 Compiling ahash v0.8.2 Compiling windows-sys v0.36.1 Compiling tracing-core v0.1.30 Compiling tinyvec_macros v0.1.0 Compiling libc v0.2.138 Compiling ttf-parser v0.17.1 Compiling cfg_aliases v0.1.1 Compiling owned_ttf_parser v0.17.1 Compiling tinyvec v1.6.0 Compiling raw-window-handle v0.5.0 Compiling num-traits v0.2.15 Compiling crc32fast v1.3.2 Compiling ab_glyph_rasterizer v0.1.7 Compiling ab_glyph v0.2.18 Compiling unicode-normalization v0.1.22 Compiling raw-window-handle v0.4.3 Compiling glutin_wgl_sys v0.3.0 Compiling glutin_egl_sys v0.3.1 Compiling num-integer v0.1.45 Compiling instant v0.1.12 Compiling thiserror v1.0.37 Compiling unicode-bidi v0.3.8 Compiling nohash-hasher v0.2.0 Compiling str-buf v1.0.6 Compiling adler v1.0.2 Compiling pin-project-lite v0.2.9 Compiling percent-encoding v2.2.0 Compiling form_urlencoded v1.1.0 Compiling tracing v0.1.37 Compiling miniz_oxide v0.6.2 Compiling error-code v2.3.1 Compiling idna v0.3.0 Compiling winit v0.27.5 Compiling glutin v0.30.3 Compiling num-rational v0.4.1 Compiling memoffset v0.6.5 Compiling paste v1.0.9 Compiling flate2 v1.0.25 Compiling url v2.3.1 Compiling clipboard-win v4.4.2 Compiling glutin-winit v0.2.1 Compiling libloading v0.7.4 Compiling lazy_static v1.4.0 Compiling widestring v1.0.2 Compiling webbrowser v0.8.0 Compiling png v0.17.7 Compiling overload v0.1.1 Compiling color_quant v1.1.0 Compiling glow v0.11.2 Compiling byteorder v1.4.3 Compiling nu-ansi-term v0.46.0 Compiling sharded-slab v0.1.4 Compiling tracing-log v0.1.3 Compiling thread_local v1.1.4 Compiling tracing-subscriber v0.3.16 Compiling darling_macro v0.14.2 Compiling bytemuck_derive v1.3.0 Compiling windows-implement v0.42.0 Compiling thiserror-impl v1.0.37 Compiling bytemuck v1.12.3 Compiling ecolor v0.20.0 (C:\git\egui_red\crates\ecolor) Compiling emath v0.20.0 (C:\git\egui_red\crates\emath) Compiling darling v0.14.2 Compiling enumset_derive v0.6.1 Compiling epaint v0.20.0 (C:\git\egui_red\crates\epaint) Compiling image v0.24.4 Compiling windows v0.42.0 Compiling arboard v3.2.0 Compiling enumset v1.0.12 Compiling accesskit v0.8.1 Compiling accesskit_consumer v0.10.0 Compiling egui v0.20.1 (C:\git\egui_red\crates\egui) Compiling egui_glow v0.20.1 (C:\git\egui_red\crates\egui_glow) Compiling accesskit_windows v0.10.1 Compiling accesskit_winit v0.7.1 Compiling egui-winit v0.20.1 (C:\git\egui_red\crates\egui-winit) Compiling eframe v0.20.1 (C:\git\egui_red\crates\eframe) Compiling hello_world v0.1.0 (C:\git\egui_red\examples\hello_world) Finished dev [unoptimized + debuginfo] target(s) in 2m 41s Running `C:\git\egui_red\target\debug\hello_world.exe` 2023-01-06T09:45:23.390938Z ERROR eframe::native::run: Exiting because of error: Glutin(Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }) on event Resumed Error: Glutin(Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }) error: process didn't exit successfully: `C:\git\egui_red\target\debug\hello_world.exe` (exit code: 1) C:\git\egui_red\examples\hello_world>cargo run --release Compiling proc-macro2 v1.0.47 Compiling autocfg v1.1.0 Compiling unicode-ident v1.0.5 Compiling quote v1.0.21 Compiling syn v1.0.105 Compiling cfg-if v1.0.0 Compiling once_cell v1.16.0 Compiling windows_x86_64_msvc v0.42.0 Compiling lock_api v0.4.9 Compiling ident_case v1.0.1 Compiling smallvec v1.10.0 Compiling fnv v1.0.7 Compiling parking_lot_core v0.9.5 Compiling windows-sys v0.42.0 Compiling log v0.4.17 Compiling winapi v0.3.9 Compiling scopeguard v1.1.0 Compiling khronos_api v3.1.0 Compiling windows_x86_64_msvc v0.36.1 Compiling parking_lot v0.12.1 Compiling xml-rs v0.8.4 Compiling gl_generator v0.14.0 Compiling darling_core v0.14.2 Compiling arrayvec v0.7.2 Compiling kurbo v0.8.3 Compiling version_check v0.9.4 Compiling bitflags v1.3.2 Compiling cty v0.2.2 Compiling ahash v0.8.2 Compiling windows-sys v0.36.1 Compiling tracing-core v0.1.30 Compiling darling_macro v0.14.2 Compiling bytemuck_derive v1.3.0 Compiling darling v0.14.2 Compiling enumset_derive v0.6.1 Compiling ttf-parser v0.17.1 Compiling enumset v1.0.12 Compiling bytemuck v1.12.3 Compiling accesskit v0.8.1 Compiling libc v0.2.138 Compiling tinyvec_macros v0.1.0 Compiling cfg_aliases v0.1.1 Compiling tinyvec v1.6.0 Compiling raw-window-handle v0.5.0 Compiling num-traits v0.2.15 Compiling crc32fast v1.3.2 Compiling owned_ttf_parser v0.17.1 Compiling ab_glyph_rasterizer v0.1.7 Compiling ab_glyph v0.2.18 Compiling unicode-normalization v0.1.22 Compiling emath v0.20.0 (C:\git\egui_red\crates\emath) Compiling ecolor v0.20.0 (C:\git\egui_red\crates\ecolor) Compiling windows-implement v0.42.0 Compiling raw-window-handle v0.4.3 Compiling glutin_wgl_sys v0.3.0 Compiling glutin_egl_sys v0.3.1 Compiling num-integer v0.1.45 Compiling instant v0.1.12 Compiling str-buf v1.0.6 Compiling thiserror v1.0.37 Compiling adler v1.0.2 Compiling unicode-bidi v0.3.8 Compiling percent-encoding v2.2.0 Compiling pin-project-lite v0.2.9 Compiling nohash-hasher v0.2.0 Compiling epaint v0.20.0 (C:\git\egui_red\crates\epaint) Compiling form_urlencoded v1.1.0 Compiling tracing v0.1.37 Compiling idna v0.3.0 Compiling miniz_oxide v0.6.2 Compiling error-code v2.3.1 Compiling winit v0.27.5 Compiling windows v0.42.0 Compiling glutin v0.30.3 Compiling accesskit_consumer v0.10.0 Compiling thiserror-impl v1.0.37 Compiling num-rational v0.4.1 Compiling memoffset v0.6.5 Compiling paste v1.0.9 Compiling flate2 v1.0.25 Compiling clipboard-win v4.4.2 Compiling url v2.3.1 Compiling egui v0.20.1 (C:\git\egui_red\crates\egui) Compiling glutin-winit v0.2.1 Compiling libloading v0.7.4 Compiling widestring v1.0.2 Compiling lazy_static v1.4.0 Compiling webbrowser v0.8.0 Compiling arboard v3.2.0 Compiling accesskit_windows v0.10.1 Compiling accesskit_winit v0.7.1 Compiling png v0.17.7 Compiling overload v0.1.1 Compiling byteorder v1.4.3 Compiling color_quant v1.1.0 Compiling glow v0.11.2 Compiling image v0.24.4 Compiling egui_glow v0.20.1 (C:\git\egui_red\crates\egui_glow) Compiling nu-ansi-term v0.46.0 Compiling egui-winit v0.20.1 (C:\git\egui_red\crates\egui-winit) Compiling sharded-slab v0.1.4 Compiling tracing-log v0.1.3 Compiling thread_local v1.1.4 Compiling eframe v0.20.1 (C:\git\egui_red\crates\eframe) Compiling tracing-subscriber v0.3.16 Compiling hello_world v0.1.0 (C:\git\egui_red\examples\hello_world) Finished release [optimized] target(s) in 1m 21s Running `C:\git\egui_red\target\release\hello_world.exe` error: process didn't exit successfully: `C:\git\egui_red\target\release\hello_world.exe` (exit code: 1) C:\git\egui_red\examples\hello_world> ```
expend20 commented 1 year ago

I'd be happy to provide any additional info to help to resolve the issue.

coderedart commented 1 year ago

try setting log level to debug and backtrace to full. on linux, it would be RUST_BACKTRACE=full RUST_LOG=debug cargo run.

it will provide us with more info.

expend20 commented 1 year ago

hey @coderedart, sorry for being dormant a bit. There is actually a call stack in the first post, is it helpful? Here is your branch: image

cargo run log ``` C:\git\egui_red\examples\hello_world>set RUST_BACKTRACE=full C:\git\egui_red\examples\hello_world>set RUST_LOG=debug C:\git\egui_red\examples\hello_world>cargo run Finished dev [unoptimized + debuginfo] target(s) in 0.75s Running `C:\git\egui_red\target\debug\hello_world.exe` 2023-01-12T20:54:16.397357Z DEBUG eframe: Using the glow renderer 2023-01-12T20:54:16.402777Z DEBUG eframe::native::run: Entering the winit event loop (run_return)… 2023-01-12T20:54:16.404140Z DEBUG eframe::native::run::glow_integration: trying to get gl_config 2023-01-12T20:54:16.425294Z DEBUG eframe::native::run::glow_integration: found gl_config: Wgl(Config { inner: Config { hdc: 2046888663, pixel_format_index: 8 } }) 2023-01-12T20:54:16.425525Z DEBUG eframe::native::run::glow_integration: raw window handle: Some(Win32(Win32WindowHandle { hwnd: 0xe0ad6, hinstance: 0x7ff664570000 })) 2023-01-12T20:54:16.426492Z DEBUG eframe::native::run::glow_integration: received resume event. 2023-01-12T20:54:16.426777Z DEBUG eframe::native::run::glow_integration: creating surface with attributes: SurfaceAttributes { srgb: None, single_buffer: false, width: Some(320), height: Some(240), largest_pbuffer: false, raw_window_handle: Some(Win32(Win32WindowHandle { hwnd: 0xe0ad6, hinstance: 0x7ff664570000 })), native_pixmap: None, _ty: PhantomData } 2023-01-12T20:54:16.429258Z DEBUG eframe::native::run::glow_integration: surface created successfully: Wgl(Surface { config: 8, hwnd: 920278, hdc: -184481207 }).making context current 2023-01-12T20:54:16.429629Z DEBUG eframe::native::run::glow_integration: made context current. setting swap interval for surface 2023-01-12T20:54:16.430107Z ERROR eframe::native::run: Exiting because of error: Glutin(Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }) on event Resumed 2023-01-12T20:54:16.430412Z DEBUG eframe::native::run: Asking to exit event loop… 2023-01-12T20:54:16.432919Z DEBUG eframe::native::run: Received Event::LoopDestroyed - saving app state… 2023-01-12T20:54:16.433137Z DEBUG eframe::native::run: eframe window closed Error: Glutin(Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }) error: process didn't exit successfully: `C:\git\egui_red\target\debug\hello_world.exe` (exit code: 1) ```
coderedart commented 1 year ago

I made setting vsync/swap_interval optional so that it won't panic.

can you pull the latest git commits from glutin_winit branch of my fork and try again?

expend20 commented 1 year ago

Thanks, I updated it to 0e186efb7eff4f4bfcf8001117cadb6a57743221

0e186efb7eff4f4bfcf8001117cadb6a57743221 (HEAD -> glutin_winit, origin/glutin_winit) cranky lint
d5bda4c4af9d8f6f3909f18c81b8d887efdbf0e7 add more logging. ignore vsync option if not supported
c8a130e50dad1bb712faff6cc1fb324cace36402 update pure glow example to use glutin_winit

Now the process is crashing with null passed to strlen it seems. Here is the console log:

C:\git\egui_red\examples\hello_world>cargo run
   Compiling eframe v0.20.1 (C:\git\egui_red\crates\eframe)
   Compiling hello_world v0.1.0 (C:\git\egui_red\examples\hello_world)
    Finished dev [unoptimized + debuginfo] target(s) in 9.13s
     Running `C:\git\egui_red\target\debug\hello_world.exe`
2023-01-13T10:04:11.188040Z DEBUG eframe: Using the glow renderer
2023-01-13T10:04:11.205119Z DEBUG eframe::native::run: Entering the winit event loop (run_return)…
2023-01-13T10:04:11.206341Z DEBUG eframe::native::run::glow_integration: trying to create glutin Display with config: ConfigTemplateBuilder { template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None } }
2023-01-13T10:04:11.233189Z DEBUG eframe::native::run::glow_integration: using the first config from config picker closure. config: Wgl(Config { inner: Config { hdc: -1996422804, pixel_format_index: 8 } })
2023-01-13T10:04:11.233481Z DEBUG eframe::native::run::glow_integration: successfully created GL Display with version: WGL and supported features: (empty)
2023-01-13T10:04:11.233665Z DEBUG eframe::native::run::glow_integration: creating gl context using raw window handle: Some(Win32(Win32WindowHandle { hwnd: 0x80ab6, hinstance: 0x7ff7b3b80000 }))
2023-01-13T10:04:11.234235Z DEBUG eframe::native::run::glow_integration: running on_resume fn.
2023-01-13T10:04:11.234449Z DEBUG eframe::native::run::glow_integration: creating surface with attributes: SurfaceAttributes { srgb: None, single_buffer: false, width: Some(320), height: Some(240), largest_pbuffer: false, raw_window_handle: Some(Win32(Win32WindowHandle { hwnd: 0x80ab6, hinstance: 0x7ff7b3b80000 })), native_pixmap: None, _ty: PhantomData }
2023-01-13T10:04:11.234795Z DEBUG eframe::native::run::glow_integration: surface created successfully: Wgl(Surface { config: 8, hwnd: 527030, hdc: 1577126838 }).making context current
2023-01-13T10:04:11.235079Z DEBUG eframe::native::run::glow_integration: made context current. setting swap interval for surface
2023-01-13T10:04:11.235229Z ERROR eframe::native::run::glow_integration: failed to set swap interval due to error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }

and here is the crash log

(3710.1afc): Access violation - code c0000005 (!!! second chance !!!)
*** WARNING: Unable to verify checksum for C:\git\egui_red\target\debug\hello_world.exe
ucrtbase!strlen+0x31:
00007fff`7249ca21 488b10          mov     rdx,qword ptr [rax] ds:00000000`00000000=????????????????
0:000> k
 # Child-SP          RetAddr               Call Site
00 00000042`5a93d988 00007ff7`b3cb3dde     ucrtbase!strlen+0x31
01 (Inline Function) --------`--------     hello_world!core::ffi::c_str::CStr::from_ptr+0x8 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\ffi\c_str.rs @ 259] 
02 00000042`5a93d990 00007ff7`b3ca0a18     hello_world!glow::native::impl$2::get_parameter_string+0x2e [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\native.rs @ 1082] 
03 00000042`5a93da10 00007ff7`b3c9e4e2     hello_world!egui_glow::shader_version::ShaderVersion::get+0x38 [C:\git\egui_red\crates\egui_glow\src\shader_version.rs @ 25] 
04 00000042`5a93dd70 00007ff7`b3ca040a     hello_world!egui_glow::painter::impl$2::new::closure$0+0x22 [C:\git\egui_red\crates\egui_glow\src\painter.rs @ 110] 
05 00000042`5a93ddb0 00007ff7`b3c9478f     hello_world!enum2$<core::option::Option<egui_glow::shader_version::ShaderVersion> >::unwrap_or_else<egui_glow::shader_version::ShaderVersion,egui_glow::painter::impl$2::new::closure_env$0>+0x3a [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\option.rs @ 825] 
06 00000042`5a93de00 00007ff7`b3bb192e     hello_world!egui_glow::painter::Painter::new+0x11f [C:\git\egui_red\crates\egui_glow\src\painter.rs @ 110] 
07 00000042`5a93efb0 00007ff7`b3bb31cf     hello_world!eframe::native::run::glow_integration::GlowWinitApp::init_run_state+0x3be [C:\git\egui_red\crates\eframe\src\native\run.rs @ 681] 
08 00000042`5a949060 00007ff7`b3be8c86     hello_world!eframe::native::run::glow_integration::impl$2::on_event+0x1ef [C:\git\egui_red\crates\eframe\src\native\run.rs @ 889] 
09 00000042`5a949c60 00007ff7`b3bc3a97     hello_world!eframe::native::run::run_and_return::closure$0<eframe::native::run::glow_integration::GlowWinitApp>+0xe6 [C:\git\egui_red\crates\eframe\src\native\run.rs @ 152] 
0a 00000042`5a94ae00 00007ff7`b3bb5954     hello_world!winit::platform_impl::platform::event_loop::impl$3::run_return::closure$0<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >+0xa7 [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs @ 255] 
0b 00000042`5a94af30 00007ff7`b3bfdb8b     hello_world!alloc::boxed::impl$45::call_mut<tuple$<enum2$<winit::event::Event<enum2$<eframe::native::run::UserEvent> > >,ref_mut$<enum2$<winit::event_loop::ControlFlow> > >,dyn$<core::ops::function::FnMut<tuple$<enum2$<winit::event::Event<enum2$<eframe::native::run::UserEvent> > >,ref_mut$<enum2$<winit::event_loop::ControlFlow> > >,assoc$<Output,tuple$<> > > >,alloc::alloc::Global>+0x84 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\alloc\src\boxed.rs @ 1948] 
0c 00000042`5a94b050 00007ff7`b3c0abb4     hello_world!winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure$0<enum2$<eframe::native::run::UserEvent> >+0x26b [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 250] 
0d 00000042`5a94b370 00007ff7`b3c059a8     hello_world!core::panic::unwind_safe::impl$23::call_once<tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >+0x24 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\panic\unwind_safe.rs @ 272] 
0e 00000042`5a94b410 00007ff7`b3c05d43     hello_world!std::panicking::try::do_call<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,tuple$<> >+0xc8 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panicking.rs @ 494] 
0f 00000042`5a94b680 00007ff7`b3c050d0     hello_world!std::panicking::try::do_catch<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::public_window_callback_inner::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,isize>+0xb3
10 00000042`5a94b6d0 00007ff7`b3bddb84     hello_world!std::panicking::try<tuple$<>,core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > > >+0x90 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panicking.rs @ 456] 
11 00000042`5a94b8e0 00007ff7`b3bfbc0d     hello_world!std::panic::catch_unwind<core::panic::unwind_safe::AssertUnwindSafe<winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >,tuple$<> >+0x24 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panic.rs @ 137] 
12 00000042`5a94b980 00007ff7`b3bfd90c     hello_world!winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::catch_unwind<enum2$<eframe::native::run::UserEvent>,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0<enum2$<eframe::native::run::UserEvent> > >+0x19d [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 157] 
13 00000042`5a94bc30 00007ff7`b3bfd193     hello_world!winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::call_event_handler<enum2$<eframe::native::run::UserEvent> >+0x3c [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 256] 
14 00000042`5a94bcd0 00007ff7`b3bfc861     hello_world!winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::call_new_events<enum2$<eframe::native::run::UserEvent> >+0x373 [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 401] 
15 00000042`5a94bf70 00007ff7`b3bfe467     hello_world!winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::move_state_to<enum2$<eframe::native::run::UserEvent> >+0x701 [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 312] 
16 00000042`5a94c5f0 00007ff7`b3bc31eb     hello_world!winit::platform_impl::platform::event_loop::runner::EventLoopRunner<enum2$<eframe::native::run::UserEvent> >::poll<enum2$<eframe::native::run::UserEvent> >+0x17 [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs @ 207] 
17 00000042`5a94c630 00007ff7`b3bee49d     hello_world!winit::platform_impl::platform::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> >::run_return<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >+0x13b [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs @ 263] 
18 00000042`5a94c910 00007ff7`b3be8644     hello_world!winit::platform::run_return::impl$0::run_return<enum2$<eframe::native::run::UserEvent>,eframe::native::run::run_and_return::closure_env$0<eframe::native::run::glow_integration::GlowWinitApp> >+0x2d [C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform\run_return.rs @ 62] 
19 00000042`5a94c960 00007ff7`b3bbe2b6     hello_world!eframe::native::run::run_and_return<eframe::native::run::glow_integration::GlowWinitApp>+0x4d4 [C:\git\egui_red\crates\eframe\src\native\run.rs @ 115] 
1a 00000042`5a94d4b0 00007ff7`b3be804d     hello_world!eframe::native::run::glow_integration::run_glow::closure$0+0x186 [C:\git\egui_red\crates\eframe\src\native\run.rs @ 1005] 
1b 00000042`5a94e130 00007ff7`b3be5dc8     hello_world!eframe::native::run::with_event_loop::closure$0<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>+0x1ad [C:\git\egui_red\crates\eframe\src\native\run.rs @ 99] 
1c 00000042`5a94e300 00007ff7`b3be59b5     hello_world!std::thread::local::LocalKey<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > > >::try_with<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > >,eframe::native::run::with_event_loop::closure_env$0<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>,enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > >+0x118 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\thread\local.rs @ 445] 
1d 00000042`5a94e4c0 00007ff7`b3be7e90     hello_world!std::thread::local::LocalKey<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > > >::with<core::cell::RefCell<enum2$<core::option::Option<winit::event_loop::EventLoop<enum2$<eframe::native::run::UserEvent> > > > >,eframe::native::run::with_event_loop::closure_env$0<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>,enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > >+0x55 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\thread\local.rs @ 421] 
1e 00000042`5a94e620 00007ff7`b3bb43ad     hello_world!eframe::native::run::with_event_loop<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > >,eframe::native::run::glow_integration::run_glow::closure_env$0>+0x70 [C:\git\egui_red\crates\eframe\src\native\run.rs @ 101] 
1f 00000042`5a94e700 00007ff7`b3b9c6d6     hello_world!eframe::native::run::glow_integration::run_glow+0x12d [C:\git\egui_red\crates\eframe\src\native\run.rs @ 998] 
20 00000042`5a94f4b0 00007ff7`b3b81404     hello_world!eframe::run_native+0x3d6 [C:\git\egui_red\crates\eframe\src\lib.rs @ 199] 
21 00000042`5a94f850 00007ff7`b3b81713     hello_world!hello_world::main+0x254 [C:\git\egui_red\examples\hello_world\src\main.rs @ 13] 
22 00000042`5a94fa50 00007ff7`b3b83746     hello_world!core::ops::function::FnOnce::call_once<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > (*)(),tuple$<> >+0x13 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\ops\function.rs @ 248] 
23 00000042`5a94fa90 00007ff7`b3b81b8c     hello_world!std::sys_common::backtrace::__rust_begin_short_backtrace<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > (*)(),enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > >+0x16 [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\sys_common\backtrace.rs @ 122] 
24 00000042`5a94fad0 00007ff7`b3e8273e     hello_world!std::rt::lang_start::closure$0<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > >+0x1c [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\rt.rs @ 166] 
25 (Inline Function) --------`--------     hello_world!core::ops::function::impls::impl$2::call_once+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\core\src\ops\function.rs @ 283] 
26 (Inline Function) --------`--------     hello_world!std::panicking::try::do_call+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs @ 492] 
27 (Inline Function) --------`--------     hello_world!std::panicking::try+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs @ 456] 
28 (Inline Function) --------`--------     hello_world!std::panic::catch_unwind+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panic.rs @ 137] 
29 (Inline Function) --------`--------     hello_world!std::rt::lang_start_internal::closure$2+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\rt.rs @ 148] 
2a (Inline Function) --------`--------     hello_world!std::panicking::try::do_call+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs @ 492] 
2b (Inline Function) --------`--------     hello_world!std::panicking::try+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs @ 456] 
2c (Inline Function) --------`--------     hello_world!std::panic::catch_unwind+0xb [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panic.rs @ 137] 
2d 00000042`5a94fb80 00007ff7`b3b81b5a     hello_world!std::rt::lang_start_internal+0xbe [/rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\rt.rs @ 148] 
2e 00000042`5a94fcd0 00007ff7`b3b815bc     hello_world!std::rt::lang_start<enum2$<core::result::Result<tuple$<>,enum2$<eframe::Error> > > >+0x3a [/rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\rt.rs @ 165] 
2f 00000042`5a94fd40 00007ff7`b3ea8dc8     hello_world!main+0x1c
30 (Inline Function) --------`--------     hello_world!invoke_main+0x22 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 78] 
31 00000042`5a94fd70 00007fff`73a126bd     hello_world!__scrt_common_main_seh+0x10c [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288] 
32 00000042`5a94fdb0 00007fff`750adfb8     KERNEL32!BaseThreadInitThunk+0x1d
33 00000042`5a94fde0 00000000`00000000     ntdll!RtlUserThreadStart+0x28
coderedart commented 1 year ago

Now the process is crashing with null passed to strlen it seems.

happening inside glow's get_parameter_string when trying to get opengl shader version string. To avoid hitting that codepath, we can provide a fixed shader version using native options. in hello_world/src/main.rs, change native options to

    let options = eframe::NativeOptions {
        initial_window_size: Some(egui::vec2(320.0, 240.0)),
        shader_version: Some(eframe::egui_glow::ShaderVersion::Es300), // explicit shader version so that egui won't query opengl for supported version.
        ..Default::default()
    };

If we get another error soon, we need to debug opengl.

  1. can you provide your platform details using https://github.com/gkv311/wglinfo/releases or a screenshot of www.realtech-vr.com/home/glview or something equivalent.

  2. just to make sure that this error is due to glutin/glow and not driver issues, you can try running the basic example in https://github.com/ArjunNair/egui_sdl2_gl which uses sdl2 and raw opengl bindings.

  3. If sdl2/gl works, then we narrow the problem to glutin. you can try running an older version of eframe like 0.19 which uses older glutin versions.

  4. if older version of eframe works, then it could be recent glutin changes causing problems. in line https://github.com/coderedart/egui/blob/glutin_winit/crates/eframe/src/native/run.rs#L432 change ApiPrefence::FallbackEgl to ApiPrefence::PreferEgl and try again.

  5. If Egl doesn't work, time to ask ping glutin devs for help.

whee commented 1 year ago

I'm also hitting this issue and have followed the same troubleshooting steps up until this point. Here's my wglinfo, I will try to try the rest of these steps to help narrow it down.

wglinfo.txt

2023-01-13T21:54:38.775358Z DEBUG eframe::native::run: Entering the winit event loop (run_return)…
2023-01-13T21:54:38.779719Z DEBUG eframe::native::run::glow_integration: trying to create glutin Display with config: ConfigTemplateBuilder { template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None } }
2023-01-13T21:54:39.140412Z DEBUG eframe::native::run::glow_integration: using the first config from config picker closure. config: Wgl(Config { inner: Config { hdc: 1543573365, pixel_format_index: 8 } })
2023-01-13T21:54:39.141068Z DEBUG eframe::native::run::glow_integration: successfully created GL Display with version: WGL and supported features: (empty)
2023-01-13T21:54:39.141550Z DEBUG eframe::native::run::glow_integration: creating gl context using raw window handle: Some(Win32(Win32WindowHandle { hwnd: 0x1609aa, hinstance: 0x7ff6ea8b0000 }))
2023-01-13T21:54:39.142816Z DEBUG eframe::native::run::glow_integration: running on_resume fn.
2023-01-13T21:54:39.143252Z DEBUG eframe::native::run::glow_integration: creating surface with attributes: SurfaceAttributes { srgb: None, single_buffer: false, width: Some(640), height: Some(480), largest_pbuffer: false, raw_window_handle: Some(Win32(Win32WindowHandle { hwnd: 0x1609aa, hinstance: 0x7ff6ea8b0000 })), native_pixmap: None, _ty: PhantomData<glutin::surface::WindowSurface> }
2023-01-13T21:54:39.143896Z DEBUG eframe::native::run::glow_integration: surface created successfully: Wgl(Surface { config: 8, hwnd: 1444266, hdc: 1073815148 }).making context current
2023-01-13T21:54:39.144371Z DEBUG eframe::native::run::glow_integration: made context current. setting swap interval for surface
2023-01-13T21:54:39.144620Z ERROR eframe::native::run::glow_integration: failed to set swap interval due to error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") }
coderedart commented 1 year ago

your problem could be a driver issue @whee in your wglinfo, there's no opengl hardware device at all. with EGL, only software angle renderer with google vendor (what is happening? :D is this subsystem for linux? or running in a virtual machine?). maybe using PreferEgl fix might work for you.

on my windows, this is the wglinfo output

[WGL] WGL extensions:
    WGL_ARB_create_context_no_error, WGL_ARB_create_context_profile,
    WGL_ARB_extensions_string, WGL_EXT_swap_control, // lots of them

[WGL] OpenGL vendor string: NVIDIA Corporation
[WGL] OpenGL renderer string: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
[WGL] OpenGL version string: 4.6.0 NVIDIA 511.79
[WGL] OpenGL shading language version string: 4.60 NVIDIA
[WGL] OpenGL GPU memory: 8192 MiB
[WGL] OpenGL extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, // lots of them
    WGL_EXT_swap_control.

[WGL] OpenGL (core profile) vendor string: NVIDIA Corporation
[WGL] OpenGL (core profile) renderer string: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2
[WGL] OpenGL (core profile) version string: 4.6.0 NVIDIA 511.79
[WGL] OpenGL (core profile) shading language version string: 4.60 NVIDIA
[WGL] OpenGL (core profile) extensions:
    GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture, // lots of them
    WGL_EXT_swap_control.

[WGL] OpenGL (software) vendor string: Microsoft Corporation
[WGL] OpenGL (software) renderer string: GDI Generic
[WGL] OpenGL (software) version string: 1.1.0
[WGL] OpenGL (software) extensions:
    GL_WIN_swap_hint, GL_EXT_bgra, GL_EXT_paletted_texture. // nothing more though. because software.

using glview image

@kchibisov is it possible to factor in both Egl and Wgl features during display creation? as you can see in the above comment's wglinfo.txt, there's Egl with opengl es 3.0 (using angle) with all sorts of extensions, but glutin-winit will still choose Wgl which doesn't have any display features/extensions at all (swap control or robustness etc..).

If it is possible to query the DisplayFeatures or extensions, i think providing them to the config picker closure in https://docs.rs/glutin-winit/0.2.1/glutin_winit/struct.DisplayBuilder.html#method.build might be a nice way to allow users to choose. preferably without having to match the platform gated variants of the config.

according to https://github.com/emilk/egui/pull/2541#issuecomment-1370767582 , glutin doesn't provide code to destroy the created display connections of egl/wgl/glx... so, we can't create two displays and choose the better one, and it may lead to weird to catch bugs.

whee commented 1 year ago

your problem could be a driver issue @whee in your wglinfo, there's no opengl hardware device at all. with EGL, only software angle renderer with google vendor (what is happening? :D is this subsystem for linux? or running in a virtual machine?). maybe using PreferEgl fix might work for you.

Yes, it's some kind of VMWare virtual machine I use for work. I tried making the PreferEgl fix (by editing the source in ~/.cargo and doing a clean build), but it still was trying Wgl. Perhaps that isn't the right way to make that change.

coderedart commented 1 year ago

(by editing the source in ~/.cargo and doing a clean build)

  1. clone coderedart/egui repo
  2. checkout glutin_winit branch.
  3. edit the preferEgl fix.
  4. add the local eframe as dependency as below (assuming both egui repo and your project are in same folder).
    [dependencies]
    eframe = {path = "../egui"}  
whee commented 1 year ago

Thank you. That makes more sense. I get the same output using my own modified copy.

This line in the logs seems interesting, since it mentions Wgl when I assume it should be Egl with PreferEgl specified:

2023-01-14T03:20:55.713805Z DEBUG eframe::native::run::glow_integration: using the first config from config picker closure. config: Wgl(Config { inner: Config { hd c: 335616728, pixel_format_index: 8 } })

There are no other entries in config_iterator.

kchibisov commented 1 year ago

there's Egl with opengl es 3.0 (using angle)

ANGLE isn't supported by glutin and never was, patches are welcome though(https://github.com/rust-windowing/glutin/issues/1508).

@kchibisov is it possible to factor in both Egl and Wgl features during display creation? as you can see in the above comment's wglinfo.txt, there's Egl with opengl es 3.0 (using angle) with all sorts of extensions, but glutin-winit will still choose Wgl which doesn't have any display features/extensions at all (swap control or robustness etc..).

You'd need to create both displays and ask for features each of it. I think you can do such a thing and then drop the displays, but you'd need to add library unloading into glutin to conserve resources.

expend20 commented 1 year ago

thanks @coderedart,

I first tried this:

To avoid hitting that codepath, we can provide a fixed shader version using native options. in hello_world/src/main.rs, change native options to...

It led to another crash:

Backtrace ``` C:\git\egui_red\examples\hello_world>cargo run Compiling hello_world v0.1.0 (C:\git\egui_red\examples\hello_world) Finished dev [unoptimized + debuginfo] target(s) in 9.03s Running `C:\git\egui_red\target\debug\hello_world.exe` 2023-01-15T11:59:59.139435Z DEBUG eframe: Using the glow renderer 2023-01-15T11:59:59.145050Z DEBUG eframe::native::run: Entering the winit event loop (run_return)… 2023-01-15T11:59:59.145837Z DEBUG eframe::native::run::glow_integration: trying to create glutin Display with config: ConfigTemplateBuilder { template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None } } 2023-01-15T11:59:59.252026Z DEBUG eframe::native::run::glow_integration: using the first config from config picker closure. config: Wgl(Config { inner: Config { hdc: -2046750335, pixel_format_index: 8 } }) 2023-01-15T11:59:59.252426Z DEBUG eframe::native::run::glow_integration: successfully created GL Display with version: WGL and supported features: (empty) 2023-01-15T11:59:59.252703Z DEBUG eframe::native::run::glow_integration: creating gl context using raw window handle: Some(Win32(Win32WindowHandle { hwnd: 0x570070, hinstance: 0x7ff7b5430000 })) 2023-01-15T11:59:59.253409Z DEBUG eframe::native::run::glow_integration: running on_resume fn. 2023-01-15T11:59:59.253626Z DEBUG eframe::native::run::glow_integration: creating surface with attributes: SurfaceAttributes { srgb: None, single_buffer: false, width: Some(320), height: Some(240), largest_pbuffer: false, raw_window_handle: Some(Win32(Win32WindowHandle { hwnd: 0x570070, hinstance: 0x7ff7b5430000 })), native_pixmap: None, _ty: PhantomData } 2023-01-15T11:59:59.254065Z DEBUG eframe::native::run::glow_integration: surface created successfully: Wgl(Surface { config: 8, hwnd: 5701744, hdc: -1828646512 }).making context current 2023-01-15T11:59:59.254679Z DEBUG eframe::native::run::glow_integration: made context current. setting swap interval for surface 2023-01-15T11:59:59.254928Z ERROR eframe::native::run::glow_integration: failed to set swap interval due to error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") } 2023-01-15T11:59:59.258528Z DEBUG egui_glow::painter: Shader header: "#version 300 es\n". 2023-01-15T11:59:59.258789Z DEBUG egui_glow::painter: SRGB texture Support: true thread 'main' panicked at 'called glCreateShader but it was not loaded.', C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\gl46.rs:4232:5 stack backtrace: 0: 0x7ff7b5739282 - std::backtrace_rs::backtrace::dbghelp::trace at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98 1: 0x7ff7b5739282 - std::backtrace_rs::backtrace::trace_unsynchronized at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66 2: 0x7ff7b5739282 - std::sys_common::backtrace::_print_fmt at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\sys_common\backtrace.rs:66 3: 0x7ff7b5739282 - std::sys_common::backtrace::_print::impl$0::fmt at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\sys_common\backtrace.rs:45 4: 0x7ff7b5750d8b - core::fmt::write at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\core\src\fmt\mod.rs:1202 5: 0x7ff7b5735c7a - std::io::Write::write_fmt at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\io\mod.rs:1679 6: 0x7ff7b573b9b4 - std::sys_common::backtrace::_print at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\sys_common\backtrace.rs:48 7: 0x7ff7b573b9b4 - std::sys_common::backtrace::print at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\sys_common\backtrace.rs:35 8: 0x7ff7b573b9b4 - std::panicking::default_hook::closure$1 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:295 9: 0x7ff7b573b5ea - std::panicking::default_hook at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:314 10: 0x7ff7b573c1a1 - std::panicking::rust_panic_with_hook at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:698 11: 0x7ff7b573c0ad - std::panicking::begin_panic_handler::closure$0 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:588 12: 0x7ff7b5739caf - std::sys_common::backtrace::__rust_end_short_backtrace at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\sys_common\backtrace.rs:138 13: 0x7ff7b573bd70 - std::panicking::begin_panic_handler at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:584 14: 0x7ff7b5763205 - core::panicking::panic_fmt at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\core\src\panicking.rs:142 15: 0x7ff7b575e446 - glow::gl46::go_panic_because_fn_not_loaded at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\gl46.rs:4232 16: 0x7ff7b5563261 - glow::gl46::call_atomic_ptr_1arg at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\gl46.rs:4304 17: 0x7ff7b5563261 - glow::gl46::struct_commands::GlFns::CreateShader at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\gl46.rs:9969 18: 0x7ff7b5563261 - glow::native::impl$2::create_shader at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\glow-0.11.2\src\native.rs:204 19: 0x7ff7b5551952 - egui_glow::misc_util::compile_shader at C:\git\egui_red\crates\egui_glow\src\misc_util.rs:10 20: 0x7ff7b554595f - egui_glow::painter::Painter::new at C:\git\egui_red\crates\egui_glow\src\painter.rs:125 21: 0x7ff7b546192e - eframe::native::run::glow_integration::GlowWinitApp::init_run_state at C:\git\egui_red\crates\eframe\src\native\run.rs:681 22: 0x7ff7b54631cf - eframe::native::run::glow_integration::impl$2::on_event at C:\git\egui_red\crates\eframe\src\native\run.rs:889 23: 0x7ff7b5498c86 - eframe::native::run::run_and_return::closure$0 at C:\git\egui_red\crates\eframe\src\native\run.rs:152 24: 0x7ff7b5473a97 - winit::platform_impl::platform::event_loop::impl$3::run_return::closure$0,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs:254 25: 0x7ff7b5465954 - alloc::boxed::impl$45::call_mut > >,ref_mut$ > >,dyn$ > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:250 27: 0x7ff7b54babb4 - core::panic::unwind_safe::impl$23::call_once,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::closure_env$0 > > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\panic\unwind_safe.rs:271 28: 0x7ff7b54b59a8 - std::panicking::try::do_call > >,tuple$<> > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panicking.rs:492 29: 0x7ff7b54b5d43 - std::panicking::try::do_catch > >,isize> 30: 0x7ff7b54b50d0 - std::panicking::try,core::panic::unwind_safe::AssertUnwindSafe > > > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panicking.rs:456 31: 0x7ff7b548db84 - std::panic::catch_unwind > >,tuple$<> > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\panic.rs:137 32: 0x7ff7b54abc0d - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::catch_unwind,tuple$<>,winit::platform_impl::platform::event_loop::runner::impl$3::call_event_handler::clos at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:157 33: 0x7ff7b54ad90c - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::call_event_handler > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:242 34: 0x7ff7b54ad193 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::call_new_events > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:402 35: 0x7ff7b54ac861 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::move_state_to > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:312 36: 0x7ff7b54ae467 - winit::platform_impl::platform::event_loop::runner::EventLoopRunner >::poll > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop\runner.rs:206 37: 0x7ff7b54731eb - winit::platform_impl::platform::event_loop::EventLoop >::run_return,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform_impl\windows\event_loop.rs:263 38: 0x7ff7b549e49d - winit::platform::run_return::impl$0::run_return,eframe::native::run::run_and_return::closure_env$0 > at C:\Users\Name\.cargo\registry\src\github.com-1ecc6299db9ec823\winit-0.27.5\src\platform\run_return.rs:62 39: 0x7ff7b5498644 - eframe::native::run::run_and_return at C:\git\egui_red\crates\eframe\src\native\run.rs:115 40: 0x7ff7b546e2b6 - eframe::native::run::glow_integration::run_glow::closure$0 at C:\git\egui_red\crates\eframe\src\native\run.rs:1005 41: 0x7ff7b549804d - eframe::native::run::with_event_loop::closure$0,enum2$ > >,eframe::native::run::glow_integration::run_glow::closure_env$0> at C:\git\egui_red\crates\eframe\src\native\run.rs:99 42: 0x7ff7b5495dc8 - std::thread::local::LocalKey > > > > >::try_with > > > > >::with,enum2$ > >,eframe::native::run::glow_integration::run_glow::closure_env$0> at C:\git\egui_red\crates\eframe\src\native\run.rs:92 45: 0x7ff7b54643ad - eframe::native::run::glow_integration::run_glow at C:\git\egui_red\crates\eframe\src\native\run.rs:998 46: 0x7ff7b544c6d6 - eframe::run_native at C:\git\egui_red\crates\eframe\src\lib.rs:199 47: 0x7ff7b5431405 - hello_world::main at C:\git\egui_red\examples\hello_world\src\main.rs:14 48: 0x7ff7b5431713 - core::ops::function::FnOnce::call_once,enum2$ > > (*)(),tuple$<> > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\core\src\ops\function.rs:248 49: 0x7ff7b5433746 - std::sys_common::backtrace::__rust_begin_short_backtrace,enum2$ > > (*)(),enum2$,enum2$ > > > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\sys_common\backtrace.rs:122 50: 0x7ff7b5431b8c - std::rt::lang_start::closure$0,enum2$ > > > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\rt.rs:166 51: 0x7ff7b573273e - core::ops::function::impls::impl$2::call_once at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\core\src\ops\function.rs:283 52: 0x7ff7b573273e - std::panicking::try::do_call at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:492 53: 0x7ff7b573273e - std::panicking::try at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:456 54: 0x7ff7b573273e - std::panic::catch_unwind at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panic.rs:137 55: 0x7ff7b573273e - std::rt::lang_start_internal::closure$2 at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\rt.rs:148 56: 0x7ff7b573273e - std::panicking::try::do_call at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:492 57: 0x7ff7b573273e - std::panicking::try at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panicking.rs:456 58: 0x7ff7b573273e - std::panic::catch_unwind at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\panic.rs:137 59: 0x7ff7b573273e - std::rt::lang_start_internal at /rustc/897e37553bba8b42751c67658967889d11ecd120/library\std\src\rt.rs:148 60: 0x7ff7b5431b5a - std::rt::lang_start,enum2$ > > > at /rustc/897e37553bba8b42751c67658967889d11ecd120\library\std\src\rt.rs:165 61: 0x7ff7b54315bc - main 62: 0x7ff7b5758dc8 - invoke_main at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78 63: 0x7ff7b5758dc8 - __scrt_common_main_seh at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 64: 0x7fff73a126bd - BaseThreadInitThunk 65: 0x7fff750adfb8 - RtlUserThreadStart error: process didn't exit successfully: `C:\git\egui_red\target\debug\hello_world.exe` (exit code: 101) ```

can you provide your platform details using https://github.com/gkv311/wglinfo/releases or a screenshot of www.realtech-vr.com/home/glview or something equivalent.

sure:

wglinfo ``` c:\Users\Name\Downloads>wglinfo64.exe [WGL] WGL extensions: NULL. [WGL] OpenGL vendor string: Microsoft Corporation [WGL] OpenGL renderer string: GDI Generic [WGL] OpenGL version string: 1.1.0 [WGL] OpenGL extensions: GL_WIN_swap_hint, GL_EXT_bgra, GL_EXT_paletted_texture. [WGL] 36 WGL Visuals visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ 0x001 32 wn . 32 . r . . 8 8 8 . . 32 8 16 16 16 . . . 0x002 32 wn . 32 . r . . 8 8 8 . . 16 8 16 16 16 . . . 0x003 32 wn . 32 . r y . 8 8 8 . . 32 8 16 16 16 . . . 0x004 32 wn . 32 . r y . 8 8 8 . . 16 8 16 16 16 . . . 0x005 32 wn . 32 . r . . 8 8 8 8 . 32 8 16 16 16 16 . . 0x006 32 wn . 32 . r . . 8 8 8 8 . 16 8 16 16 16 16 . . 0x007 32 wn . 32 . r y . 8 8 8 8 . 32 8 16 16 16 16 . . 0x008 32 wn . 32 . r y . 8 8 8 8 . 16 8 16 16 16 16 . . 0x009 32 wn . 32 . c . . . . . . . 32 8 . . . . . . 0x00a 32 wn . 32 . c . . . . . . . 16 8 . . . . . . 0x00b 32 wn . 32 . c y . . . . . . 32 8 . . . . . . 0x00c 32 wn . 32 . c y . . . . . . 16 8 . . . . . . 0x00d 24 bm . 24 . r . . 8 8 8 . . 32 8 16 16 16 . . . 0x00e 24 bm . 24 . r . . 8 8 8 . . 16 8 16 16 16 . . . 0x00f 24 bm . 24 . r . . 8 8 8 8 . 32 8 16 16 16 16 . . 0x010 24 bm . 24 . r . . 8 8 8 8 . 16 8 16 16 16 16 . . 0x011 24 bm . 24 . c . . . . . . . 32 8 . . . . . . 0x012 24 bm . 24 . c . . . . . . . 16 8 . . . . . . 0x013 16 bm . 16 . r . . 5 5 5 . . 32 8 11 11 10 . . . 0x014 16 bm . 16 . r . . 5 5 5 . . 16 8 11 11 10 . . . 0x015 16 bm . 16 . r . . 5 5 5 8 . 32 8 8 8 8 8 . . 0x016 16 bm . 16 . r . . 5 5 5 8 . 16 8 8 8 8 8 . . 0x017 16 bm . 16 . c . . . . . . . 32 8 . . . . . . 0x018 16 bm . 16 . c . . . . . . . 16 8 . . . . . . 0x019 8 bm . 8 . r . . 3 3 2 . . 32 8 11 11 10 . . . 0x01a 8 bm . 8 . r . . 3 3 2 . . 16 8 11 11 10 . . . 0x01b 8 bm . 8 . r . . 3 3 2 8 . 32 8 8 8 8 8 . . 0x01c 8 bm . 8 . r . . 3 3 2 8 . 16 8 8 8 8 8 . . 0x01d 8 bm . 8 . c . . . . . . . 32 8 . . . . . . 0x01e 8 bm . 8 . c . . . . . . . 16 8 . . . . . . 0x01f 4 bm . 4 . r . . 1 1 1 . . 32 8 5 6 5 . . . 0x020 4 bm . 4 . r . . 1 1 1 . . 16 8 5 6 5 . . . 0x021 4 bm . 4 . r . . 1 1 1 8 . 32 8 4 4 4 4 . . 0x022 4 bm . 4 . r . . 1 1 1 8 . 16 8 4 4 4 4 . . 0x023 4 bm . 4 . c . . . . . . . 32 8 . . . . . . 0x024 4 bm . 4 . c . . . . . . . 16 8 . . . . . . ------------------------------------------------------------------ visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ [EGL] EGLVersion: 1.4 (ANGLE 2.1.0.57ea533f79a7) [EGL] EGLVendor: Google Inc. (adapter LUID: 00000000000057ea) [EGL] EGLClientAPIs: OpenGL_ES [EGL] EGL extensions: EGL_EXT_create_context_robustness, EGL_ANGLE_d3d_share_handle_client_buffer, EGL_ANGLE_d3d_texture_client_buffer, EGL_ANGLE_surface_d3d_texture_2d_share_handle, EGL_ANGLE_query_surface_pointer, EGL_ANGLE_window_fixed_size, EGL_ANGLE_keyed_mutex, EGL_ANGLE_surface_orientation, EGL_ANGLE_direct_composition, EGL_NV_post_sub_buffer, EGL_KHR_create_context, EGL_EXT_device_query, EGL_KHR_image, EGL_KHR_image_base, EGL_KHR_gl_texture_2D_image, EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, EGL_KHR_get_all_proc_addresses, EGL_KHR_stream, EGL_KHR_stream_consumer_gltexture, EGL_NV_stream_consumer_gltexture_yuv, EGL_ANGLE_flexible_surface_compatibility, EGL_ANGLE_stream_producer_d3d_texture_nv12, EGL_ANGLE_create_context_webgl_compatibility, EGL_CHROMIUM_create_context_bind_generates_resource, EGL_CHROMIUM_sync_control, EGL_EXT_pixel_format_float, EGL_KHR_surfaceless_context, EGL_ANGLE_display_texture_share_group, EGL_ANGLE_create_context_client_arrays, EGL_ANGLE_program_cache_control, EGL_ANGLE_robust_resource_initialization. [EGL] OpenGL ES vendor string: Google Inc. [EGL] OpenGL ES renderer string: ANGLE (Microsoft Basic Render Driver Direct3D11 vs_5_0 ps_5_0) [EGL] OpenGL ES version string: OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7) [EGL] OpenGL ES shading language version string: OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7) [EGL] OpenGL ES extensions: GL_ANGLE_client_arrays, GL_ANGLE_depth_texture, GL_ANGLE_framebuffer_blit, GL_ANGLE_framebuffer_multisample, GL_ANGLE_instanced_arrays, GL_ANGLE_lossy_etc_decode, GL_ANGLE_multiview, GL_ANGLE_pack_reverse_row_order, GL_ANGLE_program_cache_control, GL_ANGLE_request_extension, GL_ANGLE_robust_client_memory, GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, GL_ANGLE_texture_usage, GL_ANGLE_translated_shader_source, GL_CHROMIUM_bind_generates_resource, GL_CHROMIUM_bind_uniform_location, GL_CHROMIUM_color_buffer_float_rgb, GL_CHROMIUM_color_buffer_float_rgba, GL_CHROMIUM_copy_compressed_texture, GL_CHROMIUM_copy_texture, GL_CHROMIUM_sync_query, GL_EXT_blend_minmax, GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, GL_EXT_debug_marker, GL_EXT_discard_framebuffer, GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers, GL_EXT_frag_depth, GL_EXT_map_buffer_range, GL_EXT_occlusion_query_boolean, GL_EXT_read_format_bgra, GL_EXT_robustness, GL_EXT_sRGB, GL_EXT_shader_texture_lod, GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_s3tc_srgb, GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888, GL_EXT_texture_norm16, GL_EXT_texture_rg, GL_EXT_texture_storage, GL_EXT_unpack_subimage, GL_KHR_debug, GL_NV_EGL_stream_consumer_external, GL_NV_fence, GL_NV_pack_subimage, GL_NV_pixel_buffer_object, GL_OES_EGL_image, GL_OES_EGL_image_external, GL_OES_EGL_image_external_essl3, GL_OES_compressed_ETC1_RGB8_texture, GL_OES_depth32, GL_OES_element_index_uint, GL_OES_get_program_binary, GL_OES_mapbuffer, GL_OES_packed_depth_stencil, GL_OES_rgb8_rgba8, GL_OES_standard_derivatives, GL_OES_surfaceless_context, GL_OES_texture_float, GL_OES_texture_float_linear, GL_OES_texture_half_float, GL_OES_texture_half_float_linear, GL_OES_texture_npot, GL_OES_vertex_array_object. [EGL] 40 EGL Configs visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ 0x000 16 wn . 16 . r . . 4 4 4 4 . . . . . . . . . 0x001 16 wn . 16 . r . . 5 5 5 1 . . . . . . . . . 0x002 16 wn . 16 . r . . 5 6 5 . . . . . . . . . . 0x003 16 wn . 16 . r . . 4 4 4 4 . . 8 . . . . . . 0x004 16 wn . 16 . r . . 5 5 5 1 . . 8 . . . . . . 0x005 16 wn . 16 . r . . 5 6 5 . . . 8 . . . . . . 0x006 16 wn . 16 . r . . 4 4 4 4 . 16 . . . . . . . 0x007 16 wn . 16 . r . . 5 5 5 1 . 16 . . . . . . . 0x008 16 wn . 16 . r . . 5 6 5 . . 16 . . . . . . . 0x009 16 wn . 16 . r . . 4 4 4 4 . 24 . . . . . . . 0x00a 16 wn . 16 . r . . 5 5 5 1 . 24 . . . . . . . 0x00b 16 wn . 16 . r . . 5 6 5 . . 24 . . . . . . . 0x00c 16 wn . 16 . r . . 4 4 4 4 . 24 8 . . . . . . 0x00d 16 wn . 16 . r . . 5 5 5 1 . 24 8 . . . . . . 0x00e 16 wn . 16 . r . . 5 6 5 . . 24 8 . . . . . . 0x00f 24 wn . 24 . r . . 8 8 8 . . . . . . . . . . 0x010 24 wn . 24 . r . . 8 8 8 . . . 8 . . . . . . 0x011 24 wn . 24 . r . . 8 8 8 . . 16 . . . . . . . 0x012 24 wn . 24 . r . . 8 8 8 . . 24 . . . . . . . 0x013 24 wn . 24 . r . . 8 8 8 . . 24 8 . . . . . . 0x014 32 wn . 32 . r . . 8 8 8 8 . . . . . . . . . 0x015 32 wn . 32 . r . . 8 8 8 8 . . . . . . . . . 0x016 32 wn . 32 . r . . 10 10 10 2 . . . . . . . . . 0x017 32 wn . 32 . r . . 8 8 8 8 . . 8 . . . . . . 0x018 32 wn . 32 . r . . 8 8 8 8 . . 8 . . . . . . 0x019 32 wn . 32 . r . . 10 10 10 2 . . 8 . . . . . . 0x01a 32 wn . 32 . r . . 8 8 8 8 . 16 . . . . . . . 0x01b 32 wn . 32 . r . . 8 8 8 8 . 16 . . . . . . . 0x01c 32 wn . 32 . r . . 10 10 10 2 . 16 . . . . . . . 0x01d 32 wn . 32 . r . . 8 8 8 8 . 24 . . . . . . . 0x01e 32 wn . 32 . r . . 8 8 8 8 . 24 . . . . . . . 0x01f 32 wn . 32 . r . . 10 10 10 2 . 24 . . . . . . . 0x020 32 wn . 32 . r . . 8 8 8 8 . 24 8 . . . . . . 0x021 32 wn . 32 . r . . 8 8 8 8 . 24 8 . . . . . . 0x022 32 wn . 32 . r . . 10 10 10 2 . 24 8 . . . . . . 0x023 64 wn . 64 . r . . 16 16 16 16 . . . . . . . . . 0x024 64 wn . 64 . r . . 16 16 16 16 . . 8 . . . . . . 0x025 64 wn . 64 . r . . 16 16 16 16 . 16 . . . . . . . 0x026 64 wn . 64 . r . . 16 16 16 16 . 24 . . . . . . . 0x027 64 wn . 64 . r . . 16 16 16 16 . 24 8 . . . . . . ------------------------------------------------------------------ visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ ```
glview ![image](https://user-images.githubusercontent.com/36543551/212540749-a356bd04-4456-46ff-b05d-590934507edf.png)

It looks like I have the same issue @whee has? No OpenGL devices? I'm using Hyper-V machine for all the logs in this issue. However I have another PC without Hyper-V which has same issue (that machine doesn't have dedicated GPU card, maybe the problem is that I'm connecting to it via RDP?), here is the info from it:

wglinfo rdp ``` c:\Users\john\Downloads>wglinfo64.exe [WGL] WGL extensions: NULL. [WGL] OpenGL vendor string: Microsoft Corporation [WGL] OpenGL renderer string: GDI Generic [WGL] OpenGL version string: 1.1.0 [WGL] OpenGL extensions: GL_WIN_swap_hint, GL_EXT_bgra, GL_EXT_paletted_texture. [WGL] 36 WGL Visuals visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ 0x001 32 wn . 32 . r . . 8 8 8 . . 32 8 16 16 16 . . . 0x002 32 wn . 32 . r . . 8 8 8 . . 16 8 16 16 16 . . . 0x003 32 wn . 32 . r y . 8 8 8 . . 32 8 16 16 16 . . . 0x004 32 wn . 32 . r y . 8 8 8 . . 16 8 16 16 16 . . . 0x005 32 wn . 32 . r . . 8 8 8 8 . 32 8 16 16 16 16 . . 0x006 32 wn . 32 . r . . 8 8 8 8 . 16 8 16 16 16 16 . . 0x007 32 wn . 32 . r y . 8 8 8 8 . 32 8 16 16 16 16 . . 0x008 32 wn . 32 . r y . 8 8 8 8 . 16 8 16 16 16 16 . . 0x009 32 wn . 32 . c . . . . . . . 32 8 . . . . . . 0x00a 32 wn . 32 . c . . . . . . . 16 8 . . . . . . 0x00b 32 wn . 32 . c y . . . . . . 32 8 . . . . . . 0x00c 32 wn . 32 . c y . . . . . . 16 8 . . . . . . 0x00d 24 bm . 24 . r . . 8 8 8 . . 32 8 16 16 16 . . . 0x00e 24 bm . 24 . r . . 8 8 8 . . 16 8 16 16 16 . . . 0x00f 24 bm . 24 . r . . 8 8 8 8 . 32 8 16 16 16 16 . . 0x010 24 bm . 24 . r . . 8 8 8 8 . 16 8 16 16 16 16 . . 0x011 24 bm . 24 . c . . . . . . . 32 8 . . . . . . 0x012 24 bm . 24 . c . . . . . . . 16 8 . . . . . . 0x013 16 bm . 16 . r . . 5 5 5 . . 32 8 11 11 10 . . . 0x014 16 bm . 16 . r . . 5 5 5 . . 16 8 11 11 10 . . . 0x015 16 bm . 16 . r . . 5 5 5 8 . 32 8 8 8 8 8 . . 0x016 16 bm . 16 . r . . 5 5 5 8 . 16 8 8 8 8 8 . . 0x017 16 bm . 16 . c . . . . . . . 32 8 . . . . . . 0x018 16 bm . 16 . c . . . . . . . 16 8 . . . . . . 0x019 8 bm . 8 . r . . 3 3 2 . . 32 8 11 11 10 . . . 0x01a 8 bm . 8 . r . . 3 3 2 . . 16 8 11 11 10 . . . 0x01b 8 bm . 8 . r . . 3 3 2 8 . 32 8 8 8 8 8 . . 0x01c 8 bm . 8 . r . . 3 3 2 8 . 16 8 8 8 8 8 . . 0x01d 8 bm . 8 . c . . . . . . . 32 8 . . . . . . 0x01e 8 bm . 8 . c . . . . . . . 16 8 . . . . . . 0x01f 4 bm . 4 . r . . 1 1 1 . . 32 8 5 6 5 . . . 0x020 4 bm . 4 . r . . 1 1 1 . . 16 8 5 6 5 . . . 0x021 4 bm . 4 . r . . 1 1 1 8 . 32 8 4 4 4 4 . . 0x022 4 bm . 4 . r . . 1 1 1 8 . 16 8 4 4 4 4 . . 0x023 4 bm . 4 . c . . . . . . . 32 8 . . . . . . 0x024 4 bm . 4 . c . . . . . . . 16 8 . . . . . . ------------------------------------------------------------------ visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ [EGL] EGLVersion: 1.4 (ANGLE 2.1.0.57ea533f79a7) [EGL] EGLVendor: Google Inc. (adapter LUID: 0000000000014fce) [EGL] EGLClientAPIs: OpenGL_ES [EGL] EGL extensions: EGL_EXT_create_context_robustness, EGL_ANGLE_d3d_share_handle_client_buffer, EGL_ANGLE_d3d_texture_client_buffer, EGL_ANGLE_surface_d3d_texture_2d_share_handle, EGL_ANGLE_query_surface_pointer, EGL_ANGLE_window_fixed_size, EGL_ANGLE_keyed_mutex, EGL_ANGLE_surface_orientation, EGL_ANGLE_direct_composition, EGL_NV_post_sub_buffer, EGL_KHR_create_context, EGL_EXT_device_query, EGL_KHR_image, EGL_KHR_image_base, EGL_KHR_gl_texture_2D_image, EGL_KHR_gl_texture_cubemap_image, EGL_KHR_gl_renderbuffer_image, EGL_KHR_get_all_proc_addresses, EGL_KHR_stream, EGL_KHR_stream_consumer_gltexture, EGL_NV_stream_consumer_gltexture_yuv, EGL_ANGLE_flexible_surface_compatibility, EGL_ANGLE_stream_producer_d3d_texture_nv12, EGL_ANGLE_create_context_webgl_compatibility, EGL_CHROMIUM_create_context_bind_generates_resource, EGL_CHROMIUM_sync_control, EGL_EXT_pixel_format_float, EGL_KHR_surfaceless_context, EGL_ANGLE_display_texture_share_group, EGL_ANGLE_create_context_client_arrays, EGL_ANGLE_program_cache_control, EGL_ANGLE_robust_resource_initialization. [EGL] OpenGL ES vendor string: Google Inc. [EGL] OpenGL ES renderer string: ANGLE (Microsoft Basic Render Driver Direct3D11 vs_5_0 ps_5_0) [EGL] OpenGL ES version string: OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7) [EGL] OpenGL ES shading language version string: OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7) [EGL] OpenGL ES extensions: GL_ANGLE_client_arrays, GL_ANGLE_depth_texture, GL_ANGLE_framebuffer_blit, GL_ANGLE_framebuffer_multisample, GL_ANGLE_instanced_arrays, GL_ANGLE_lossy_etc_decode, GL_ANGLE_multiview, GL_ANGLE_pack_reverse_row_order, GL_ANGLE_program_cache_control, GL_ANGLE_request_extension, GL_ANGLE_robust_client_memory, GL_ANGLE_texture_compression_dxt3, GL_ANGLE_texture_compression_dxt5, GL_ANGLE_texture_usage, GL_ANGLE_translated_shader_source, GL_CHROMIUM_bind_generates_resource, GL_CHROMIUM_bind_uniform_location, GL_CHROMIUM_color_buffer_float_rgb, GL_CHROMIUM_color_buffer_float_rgba, GL_CHROMIUM_copy_compressed_texture, GL_CHROMIUM_copy_texture, GL_CHROMIUM_sync_query, GL_EXT_blend_minmax, GL_EXT_color_buffer_float, GL_EXT_color_buffer_half_float, GL_EXT_debug_marker, GL_EXT_discard_framebuffer, GL_EXT_disjoint_timer_query, GL_EXT_draw_buffers, GL_EXT_frag_depth, GL_EXT_map_buffer_range, GL_EXT_occlusion_query_boolean, GL_EXT_read_format_bgra, GL_EXT_robustness, GL_EXT_sRGB, GL_EXT_shader_texture_lod, GL_EXT_texture_compression_dxt1, GL_EXT_texture_compression_s3tc_srgb, GL_EXT_texture_filter_anisotropic, GL_EXT_texture_format_BGRA8888, GL_EXT_texture_norm16, GL_EXT_texture_rg, GL_EXT_texture_storage, GL_EXT_unpack_subimage, GL_KHR_debug, GL_NV_EGL_stream_consumer_external, GL_NV_fence, GL_NV_pack_subimage, GL_NV_pixel_buffer_object, GL_OES_EGL_image, GL_OES_EGL_image_external, GL_OES_EGL_image_external_essl3, GL_OES_compressed_ETC1_RGB8_texture, GL_OES_depth32, GL_OES_element_index_uint, GL_OES_get_program_binary, GL_OES_mapbuffer, GL_OES_packed_depth_stencil, GL_OES_rgb8_rgba8, GL_OES_standard_derivatives, GL_OES_surfaceless_context, GL_OES_texture_float, GL_OES_texture_float_linear, GL_OES_texture_half_float, GL_OES_texture_half_float_linear, GL_OES_texture_npot, GL_OES_vertex_array_object. [EGL] 40 EGL Configs visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ 0x000 16 wn . 16 . r . . 4 4 4 4 . . . . . . . . . 0x001 16 wn . 16 . r . . 5 5 5 1 . . . . . . . . . 0x002 16 wn . 16 . r . . 5 6 5 . . . . . . . . . . 0x003 16 wn . 16 . r . . 4 4 4 4 . . 8 . . . . . . 0x004 16 wn . 16 . r . . 5 5 5 1 . . 8 . . . . . . 0x005 16 wn . 16 . r . . 5 6 5 . . . 8 . . . . . . 0x006 16 wn . 16 . r . . 4 4 4 4 . 16 . . . . . . . 0x007 16 wn . 16 . r . . 5 5 5 1 . 16 . . . . . . . 0x008 16 wn . 16 . r . . 5 6 5 . . 16 . . . . . . . 0x009 16 wn . 16 . r . . 4 4 4 4 . 24 . . . . . . . 0x00a 16 wn . 16 . r . . 5 5 5 1 . 24 . . . . . . . 0x00b 16 wn . 16 . r . . 5 6 5 . . 24 . . . . . . . 0x00c 16 wn . 16 . r . . 4 4 4 4 . 24 8 . . . . . . 0x00d 16 wn . 16 . r . . 5 5 5 1 . 24 8 . . . . . . 0x00e 16 wn . 16 . r . . 5 6 5 . . 24 8 . . . . . . 0x00f 24 wn . 24 . r . . 8 8 8 . . . . . . . . . . 0x010 24 wn . 24 . r . . 8 8 8 . . . 8 . . . . . . 0x011 24 wn . 24 . r . . 8 8 8 . . 16 . . . . . . . 0x012 24 wn . 24 . r . . 8 8 8 . . 24 . . . . . . . 0x013 24 wn . 24 . r . . 8 8 8 . . 24 8 . . . . . . 0x014 32 wn . 32 . r . . 8 8 8 8 . . . . . . . . . 0x015 32 wn . 32 . r . . 8 8 8 8 . . . . . . . . . 0x016 32 wn . 32 . r . . 10 10 10 2 . . . . . . . . . 0x017 32 wn . 32 . r . . 8 8 8 8 . . 8 . . . . . . 0x018 32 wn . 32 . r . . 8 8 8 8 . . 8 . . . . . . 0x019 32 wn . 32 . r . . 10 10 10 2 . . 8 . . . . . . 0x01a 32 wn . 32 . r . . 8 8 8 8 . 16 . . . . . . . 0x01b 32 wn . 32 . r . . 8 8 8 8 . 16 . . . . . . . 0x01c 32 wn . 32 . r . . 10 10 10 2 . 16 . . . . . . . 0x01d 32 wn . 32 . r . . 8 8 8 8 . 24 . . . . . . . 0x01e 32 wn . 32 . r . . 8 8 8 8 . 24 . . . . . . . 0x01f 32 wn . 32 . r . . 10 10 10 2 . 24 . . . . . . . 0x020 32 wn . 32 . r . . 8 8 8 8 . 24 8 . . . . . . 0x021 32 wn . 32 . r . . 8 8 8 8 . 24 8 . . . . . . 0x022 32 wn . 32 . r . . 10 10 10 2 . 24 8 . . . . . . 0x023 64 wn . 64 . r . . 16 16 16 16 . . . . . . . . . 0x024 64 wn . 64 . r . . 16 16 16 16 . . 8 . . . . . . 0x025 64 wn . 64 . r . . 16 16 16 16 . 16 . . . . . . . 0x026 64 wn . 64 . r . . 16 16 16 16 . 24 . . . . . . . 0x027 64 wn . 64 . r . . 16 16 16 16 . 24 8 . . . . . . ------------------------------------------------------------------ visual x bf lv rg d st r g b a ax dp st accum buffs ms id dep cl sp sz l ci b ro sz sz sz sz bf th cl r g b a ns b ------------------------------------------------------------------ ```
glview rdp ![image](https://user-images.githubusercontent.com/36543551/212541237-597f479e-0396-4b68-8447-fa6c78b019cf.png)

It looks like this RDP machine is showing no OpenGL devices as well. So, what would you recommed, how one can develop with egui in such conditions? Rust run the browser to access the GUI?

expend20 commented 1 year ago

maybe it's possible to use WebView2 as a backend for egui?

coderedart commented 1 year ago

I'm using Hyper-V machine

always mention that. would have saved a lot of time :). perhaps, the issue template should probably be updated to prompt that info along with OS.

anyway, its the same issue. we need to wait until glutin gets angle support (as kchibisov said), then use software glow rendering.

same problem for the RDP. it can't find a driver/device with opengl support.

  1. it seems RDP requires some configuration to actually be able to use the host gpu. https://answers.microsoft.com/en-us/windows/forum/all/use-host-gpu-in-remote-desktop-session/34e1fd21-bf52-4f73-9907-3ce7359546d8
  2. another potential solution is a software renderer https://github.com/emilk/egui/issues/1129 . still a WIP.
  3. use a browser, which will take away all complexity of native opengl mess and provide us with a common webgl2 abstraction. eframe-template repo already provides trunk support to serve the files (and recompile them on changes).
expend20 commented 1 year ago

always mention that.

sorry, didn't figure out it could be relevant, thanks for all the help!

bancek commented 1 year ago

I got the same error (swap contol extrensions are not supported) while trying to run my app inside VirtualBox (Windows 10). I've switched the renderer to wgpu and it works without problems.

kchibisov commented 1 year ago

I got the same error (swap contol extrensions are not supported) while trying to run my app inside VirtualBox (Windows 10). I've switched the renderer to wgpu and it works without problems.

Seems like you've either used very old glutin or something forced vsync, but modern glutin doesn't require vsync or any extension in any form.

bancek commented 1 year ago

I've tried eframe 0.22.0 which depends on glutin 0.30.8.

use eframe::egui;

fn main() -> Result<(), eframe::Error> {
    env_logger::init();

    eframe::run_simple_native("Hello world", Default::default(), move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |ui| {
            ui.heading("Hello world");
        });
    })
}

wgpu works because it uses DX12.

// eframe = { version = "0.22.0", features = ["wgpu"] }
use eframe::egui;

fn main() -> Result<(), eframe::Error> {
    env_logger::init();

    let native_options = eframe::NativeOptions {
        renderer: eframe::Renderer::Wgpu,
        ..Default::default()
    };

    eframe::run_simple_native("Hello world", native_options, move |ctx, _frame| {
        egui::CentralPanel::default().show(ctx, |ui| {
            ui.heading("Hello world");
        });
    })
}
Screenshot 2023-06-06 at 22 19 02

I've tried with vsync: false and HardwareAcceleration::Off but it makes no difference.

Debug log ``` [2023-06-06T20:20:11Z DEBUG eframe] Using the glow renderer [2023-06-06T20:20:11Z DEBUG eframe::native::run] Entering the winit event loop (run_return) [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] trying to create glutin Display with config: ConfigTemplateBuilder { template: ConfigTemplate { color_buffer_type: Rgb { r_size: 8, g_size: 8, b_size: 8 }, alpha_size: 8, depth_size: 0, stencil_size: 0, num_samples: None, min_swap_interval: None, max_swap_interval: None, config_surface_types: WINDOW, api: None, transparency: false, single_buffering: false, stereoscopy: None, float_pixels: false, max_pbuffer_width: None, hardware_accelerated: None, max_pbuffer_height: None, native_window: None } } [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] using the first config from config picker closure. config: Wgl(Config { inner: Config { hdc: -2046751771, pixel_format_index: 8 } }) [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] successfully created GL Display with version: WGL and supported features: (empty) [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] creating gl context using raw window handle: Some(Win32(Win32WindowHandle { hwnd: 0x505cc, hinstance: 0x7ff7b9690000 })) [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] running on_resume fn. [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] creating surface with attributes: SurfaceAttributes { srgb: None, single_buffer: false, width: Some(800), height: Some(600), largest_pbuffer: false, raw_window_handle: Some(Win32(Win32WindowHandle { hwnd: 0x505cc, hinstance: 0x7ff7b9690000 })), native_pixmap: None, _ty: PhantomData } [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] surface created successfully: Wgl(Surface { config: 8, hwnd: 329164, hdc: 2013334294 }).making context current [2023-06-06T20:20:11Z DEBUG eframe::native::run::glow_integration] made context current. setting swap interval for surface [2023-06-06T20:20:11Z ERROR eframe::native::run::glow_integration] failed to set swap interval due to error: Error { raw_code: None, raw_os_message: None, kind: NotSupported("swap contol extrensions are not supported") } [2023-06-06T20:20:11Z DEBUG egui_glow::painter] opengl version: 1.1.0 opengl renderer: GDI Generic opengl vendor: Microsoft Corporation thread 'main' panicked at 'some OpenGL error occurred egui_glow requires opengl 2.0+. ```
kchibisov commented 1 year ago

Is example from https://github.com/rust-windowing/glutin/ works? cargo run --example window.

bancek commented 1 year ago

No, it does not.

Picked a config with 0 samples
Running on GDI Generic
OpenGL Version 1.1.0
thread 'main' panicked at 'gles2 function was not loaded', C:\Users\User\Downloads\glutin-master\glutin-master\target\debug\build\glutin_examples-4b2ca402a8c68ecf\out/gl_bindings.rs:779:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\examples\window.exe` (exit code: 101)
kchibisov commented 1 year ago

Sounds like you generally lack OpenGL on your system, because you face GDI Generic even though, the loading should force the icd-loader, OpenGL on anything outside of Linux is a mess, so not that big of surprise.

coderedart commented 1 year ago

This is not a glutin error. virtual box windows only provides opengl 1.1 and that is not enough for egui renderer. So, the crash is explicitly caused by egui_glow.

[2023-06-06T20:20:11Z DEBUG egui_glow::painter] opengl version: 1.1.0 opengl renderer: GDI Generic opengl vendor: Microsoft Corporation thread 'main' panicked at 'some OpenGL error occurred egui_glow requires opengl 2.0+.

Your best option is to go with software rendering https://github.com/emilk/egui/issues/1129

or wgpu if that works.

frett27 commented 1 year ago

Personally, i made some experiments on this, and i used https://github.com/rustytsuki/egui which is a fork of egui, with skia backend, using skia feature instead of glow, seems to work well on windows compilation and using. i had a couple of gui, compiled on github plateform : https://github.com/barrelorgandiscovery/virtualbookplayer and https://github.com/frett27/encrypter

This does not resolve the issue, but probably help users using egui on windows plateform for a first step hope this help,