rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.18k stars 282 forks source link

rerun crashes with "Parent device is lost" when system goes to sleep #6312

Open Danvil opened 3 months ago

Danvil commented 3 months ago

Describe the bug

Launch rerun on Linux. Put system to sleep. Wake system up again. Rerun is crashed with error "Parent device is lost"

Expected behavior Rerun does not crash when system is put to sleep.

Backtrace

thread 'main' panicked at 'Error in Device::poll: Validation Error

Caused by:
    Parent device is lost
'
wgpu-0.19.4/src/backend/wgpu_core.rs:1420
stack backtrace:
   6: core::panicking::panic_fmt
             at core/src/panicking.rs:72:14
   7: wgpu::backend::wgpu_core::ContextWgpuCore::handle_error_fatal
   8: <wgpu::backend::wgpu_core::ContextWgpuCore as wgpu::context::Context>::device_poll
   9: <T as wgpu::context::DynContext>::device_poll
  10: wgpu::Device::poll
  11: re_renderer::context::RenderContext::begin_frame
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
  14: egui::containers::frame::Frame::show_dyn
  15: egui::containers::panel::CentralPanel::show_inside_dyn
  16: egui::containers::panel::CentralPanel::show_dyn
  17: <re_viewer::app::App as eframe::epi::App>::update
  18: egui::context::Context::run
  19: eframe::native::epi_integration::EpiIntegration::update
  20: <eframe::native::wgpu_integration::WgpuWinitApp as eframe::native::winit_integration::WinitApp>::run_ui_and_paint
  21: core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut
  22: winit::platform_impl::platform::EventLoop<T>::run_on_demand
  23: eframe::run_native

Desktop (please complete the following information): Linux Mint 21 Vanessa

Rerun version

rerun-cli 0.15.1 [rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball), LLVM 17.0.6] x86_64-unknown-linux-gnu
emilk commented 3 months ago

It's likely this will require a fix in eframe and/or egui-wgpu