Crash on "Reset Viewer" if map view is present
Played around with nuscenes in a native release build. Opened the command pallete and went "Reset Rerun". Crashed with the following callstack:
thread 'main' panicked at 'Error in Queue::submit: Validation Error
Caused by:
Texture with 'egui_texid_Managed(63)' label has been destroyed
'
wgpu-22.1.0/src/backend/wgpu_core.rs:2314
stack backtrace:
8: core::panicking::panic_fmt
at core/src/panicking.rs:72
9: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_fatal<enum2$<wgpu_core::device::queue::QueueSubmitError> >
at wgpu-22.1.0/src/backend/wgpu_core.rs:317
10: wgpu::context::impl$5::queue_submit<wgpu::backend::wgpu_core::ContextWgpuCore>
at wgpu-22.1.0/src/context.rs:3061
11: wgpu::Queue::submit<core::iter::adapters::chain::Chain<alloc::vec::into_iter::IntoIter<wgpu::CommandBuffer,alloc::alloc::Global>,core::array::iter::IntoIter<wgpu::CommandBuffer,1> > >
at wgpu-22.1.0/src/lib.rs:5537
12: egui_wgpu::winit::Painter::paint_and_update_textures
at egui-wgpu-0.29.1/src/winit.rs:688
13: eframe::native::wgpu_integration::impl$1::run_ui_and_paint
at eframe-0.29.1/src/native/wgpu_integration.rs:372
14: eframe::native::run::impl$1::window_event::closure$0
at eframe-0.29.1/src/native/run.rs:283
eframe::native::event_loop_context::with_event_loop_context<eframe::native::run::impl$1::window_event::closure_env$0<eframe::native::wgpu_integration::WgpuWinitApp> >
at eframe-0.29.1/src/native/event_loop_context.rs:53
15: eframe::native::run::impl$1::window_event<eframe::native::wgpu_integration::WgpuWinitApp>
at eframe-0.29.1/src/native/run.rs:280
16: winit::event_loop::dispatch_event_for_app
at winit-0.30.5/src/event_loop.rs:642
winit::platform::run_on_demand::EventLoopExtRunOnDemand::run_app_on_demand::closure$0
at winit-0.30.5/src/platform/run_on_demand.rs:76
winit::platform_impl::windows::event_loop::impl$3::run_on_demand::closure$0<enum2$<eframe::native::winit_integration::UserEvent>,winit::platform::run_on_demand::EventLoopExtRunOnDemand::run_app_on_demand::closure_env$0<winit::event_loop::EventLoop<enum2$<e
at winit-0.30.5/src/platform_impl/windows/event_loop.rs:253
17: winit::platform_impl::windows::event_loop::runner::impl$3::call_event_handler::closure$0
at winit-0.30.5/src/platform_impl/windows/event_loop/runner.rs:236
core::panic::unwind_safe::impl$25::call_once
at core/src/panic/unwind_safe.rs:272
either way this is primarily a bug in wgpu (edit: This has been fixed in wgpu 23.0.0, see comment) It could also be though that egui is deleting a texture too eagerly. -> This is very likely fixed by https://github.com/emilk/egui/pull/5226 (todo: confirm that!)
Checked on wgpu: This got fixed here https://github.com/gfx-rs/wgpu/pull/6318 which is part of 23.0.0 Corollary: Wgpu would previously incorrectly handle the error in a fatal manner when it should actually be a validation error + failed queue submit (i.e. can be handled by our error subscriber). The egui linked egui fix is very likely what we need.
This happens consistently in presence of a map view.
The map view is needed because that's what adds the custom texture
We landed that fix by now. Confirmed the crash no longer repros