rerun-io / rerun

Visualize streams of multimodal data. Free, fast, easy to use, and simple to integrate. Built in Rust.
https://rerun.io/
Apache License 2.0
6.68k stars 338 forks source link

Fix deserialization log spam when trying to load old blueprint #4299

Closed emilk closed 1 year ago

emilk commented 1 year ago

I checked out main, cargo run, start dicom, got this.

[2023-11-21T16:48:01Z ERROR re_arrow_store::store_helpers] Couldn't deserialize component at viewport#rerun.blueprint.ViewportLayout: serde-based deserialization (attr.rust.serde_type) failed: invalid type: byte array, expected struct BlueprintId

A) we should probably not log this as an error B) we shouldn't splash the stack trace on the screen C) we shouldn't have this ridiculously long and dense stack trace

Full message:

[2023-11-21T16:48:01Z ERROR re_arrow_store::store_helpers] Couldn't deserialize component at viewport#rerun.blueprint.ViewportLayout: serde-based deserialization (`attr.rust.serde_type`) failed: invalid type: byte array, expected struct BlueprintId
       0:        0x104d86784 - backtrace::backtrace::libunwind::trace::hd9a74a0a8a643f6d
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.67/src/backtrace/libunwind.rs:93:5
                               backtrace::backtrace::trace_unsynchronized::h6474b08fb6b03de3
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.67/src/backtrace/mod.rs:66:5
                               backtrace::backtrace::trace::h0ee9599393088967
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.67/src/backtrace/mod.rs:53:14
       1:        0x104d82728 - backtrace::capture::Backtrace::create::h76d0f4317c7fb32f
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.67/src/capture.rs:176:9
                               backtrace::capture::Backtrace::new_unresolved::h1ceeab4f49b7ffd7
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.67/src/capture.rs:170:9
       2:        0x10435b39c - re_types_core::result::DeserializationError::serde_failure::h3c59c9cd2835cd88
                                   at /Users/emilk/code/rerun/rerun/crates/re_types_core/src/result.rs:284:24
                               <re_viewport::blueprint::viewport_layout::ViewportLayout as re_types_core::loggable::Loggable>::from_arrow_opt::{{closure}}::{{closure}}::{{closure}}::h61424a30a3f78181
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/blueprint/viewport_layout.rs:411:41
                               core::result::Result<T,E>::map_err::hff7a9cf9a001c918
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:828:27
                               <re_viewport::blueprint::viewport_layout::ViewportLayout as re_types_core::loggable::Loggable>::from_arrow_opt::{{closure}}::{{closure}}::h86852ac699a274a5
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/blueprint/viewport_layout.rs:405:48
                               core::option::Option<T>::map::h60fd7baed25222d1
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/option.rs:1075:29
                               <re_viewport::blueprint::viewport_layout::ViewportLayout as re_types_core::loggable::Loggable>::from_arrow_opt::{{closure}}::h76fbfd098e7825a3
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/blueprint/viewport_layout.rs:389:33
                               core::iter::adapters::map::map_try_fold::{{closure}}::hb5eebed7746942c1
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/adapters/map.rs:91:28
                               core::iter::traits::iterator::Iterator::try_fold::he7abe3174b263e23
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/traits/iterator.rs:2303:21
                               <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h051181a05c38ef33
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/adapters/map.rs:117:9
       3:        0x10432c318 - <core::iter::adapters::GenericShunt<I,R> as core::iter::traits::iterator::Iterator>::try_fold::h8280c8605105c38c
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/adapters/mod.rs:195:9
                               core::iter::traits::iterator::Iterator::try_for_each::h4a40c301a9d234a2
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/traits/iterator.rs:2365:9
                               <core::iter::adapters::GenericShunt<I,R> as core::iter::traits::iterator::Iterator>::next::hfd65cbf70c5bce60
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/adapters/mod.rs:178:14
                               <alloc::vec::Vec<T> as alloc::vec::spec_from_iter_nested::SpecFromIterNested<T,I>>::from_iter::hfc381cbcd036fd90
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/vec/spec_from_iter_nested.rs:26:32
       4:        0x104319d28 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h30479acb42bdf107
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/vec/spec_from_iter.rs:33:9
                               <alloc::vec::Vec<T> as core::iter::traits::collect::FromIterator<T>>::from_iter::h03d048087549cfbf
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/vec/mod.rs:2696:9
                               core::iter::traits::iterator::Iterator::collect::h4ac5126f1c417a75
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/traits/iterator.rs:1895:9
                               <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter::{{closure}}::h06c31d7d2a5cc8e3
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1932:51
                               core::iter::adapters::try_process::h32a7d3351bd5822e
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/adapters/mod.rs:164:17
       5:        0x1043527c8 - <core::result::Result<V,E> as core::iter::traits::collect::FromIterator<core::result::Result<A,E>>>::from_iter::h8a07ea181c3da573
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/result.rs:1932:9
                               core::iter::traits::iterator::Iterator::collect::ha15f168c61116734
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/iter/traits/iterator.rs:1895:9
                               <re_viewport::blueprint::viewport_layout::ViewportLayout as re_types_core::loggable::Loggable>::from_arrow_opt::h0be8a984ae49313f
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/blueprint/viewport_layout.rs:384:29
       6:        0x10436b768 - re_log_types::data_cell::DataCell::try_to_native_mono::h678c67a2a6ed5cb8
                                   at /Users/emilk/code/rerun/rerun/crates/re_log_types/src/data_cell.rs:394:29
                               re_arrow_store::store_helpers::<impl re_arrow_store::store::DataStore>::query_latest_component::had720f06d8cf004d
                                   at /Users/emilk/code/rerun/rerun/crates/re_arrow_store/src/store_helpers.rs:56:9
       7:        0x1043711e4 - re_arrow_store::store_helpers::<impl re_arrow_store::store::DataStore>::query_timeless_component::h60454435ae99fc69
                                   at /Users/emilk/code/rerun/rerun/crates/re_arrow_store/src/store_helpers.rs:128:9
       8:        0x10433cd30 - re_viewport::viewport_blueprint::load_viewport_blueprint::h54816520a21db5ab
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/viewport_blueprint.rs:396:43
       9:        0x104387ad8 - re_viewport::viewport::Viewport::from_db::hbe8176a75c831958
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewport/src/viewport.rs:71:25
      10:        0x10409cf14 - re_viewer::app_state::AppState::show::hb3df012448393d4e
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewer/src/app_state.rs:102:28
      11:        0x1040d46dc - re_viewer::app::App::ui::{{closure}}::hf53377826eb27ffa
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewer/src/app.rs:708:25
                               core::ops::function::FnOnce::call_once{{vtable.shim}}::ha5aaaaa32378688a
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/ops/function.rs:250:5
      12:        0x10446a90c - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h68eecaa41d107dd1
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/boxed.rs:1993:9
      13:        0x104475560 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h68eecaa41d107dd1
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/alloc/src/boxed.rs:1993:9
                               egui::containers::frame::Frame::show_dyn::h8b98484e2eeb1329
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/containers/frame.rs:223:19
      14:        0x1040d4a04 - egui::containers::frame::Frame::show::h89ea29e534171414
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/containers/frame.rs:214:9
                               egui::containers::panel::CentralPanel::show_inside_dyn::h9279e82fa21d8937
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/containers/panel.rs:1025:15
      15:        0x1040d4b00 - egui::containers::panel::CentralPanel::show_dyn::h16ebc24e597145c9
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/containers/panel.rs:1053:30
      16:        0x1040dd49c - egui::containers::panel::CentralPanel::show::h9be6db082958f8c5
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/containers/panel.rs:1037:9
                               re_viewer::app::App::ui::hcd49a34e0f679580
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewer/src/app.rs:657:9
                               <re_viewer::app::App as eframe::epi::App>::update::h7373bc66f2ee002d
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewer/src/app.rs:1111:9
      17:        0x10448a8fc - eframe::native::epi_integration::EpiIntegration::update::{{closure}}::hb6ed5aa258bc13a1
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/epi_integration.rs:530:13
                               egui::context::Context::run::h121c6f88d7b70de9
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/egui-0.23.0/src/context.rs:390:9
      18:        0x104491e90 - eframe::native::epi_integration::EpiIntegration::update::h37cbb19bc95a7279
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/epi_integration.rs:528:27
      19:        0x1044bbc04 - <eframe::native::run::wgpu_integration::WgpuWinitApp as eframe::native::run::WinitApp>::run_ui_and_paint::h27041db1fc823c56
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:1372:17
      20:        0x1044c02fc - eframe::native::run::run_and_return::{{closure}}::h4e4ab864066c03e7
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:169:17
      21:        0x1044a7af4 - <winit::platform_impl::platform::app_state::EventLoopHandler<T> as winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event::{{closure}}::h43d312a6940b7fc5
                               winit::platform_impl::platform::app_state::EventLoopHandler<T>::with_callback::hfefd1c6544587e07
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/app_state.rs:70:13
                               <winit::platform_impl::platform::app_state::EventLoopHandler<T> as winit::platform_impl::platform::app_state::EventHandler>::handle_nonuser_event::h5eeeb33dbe7daccc
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/app_state.rs:91:9
      22:        0x10450a2d4 - winit::platform_impl::platform::app_state::Handler::handle_nonuser_event::h77937af1f67062dc
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/app_state.rs:199:21
      23:        0x10450c044 - winit::platform_impl::platform::app_state::AppState::cleared::hf929775580878781
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/app_state.rs:388:13
      24:        0x104514ae4 - winit::platform_impl::platform::observer::control_flow_end_handler::{{closure}}::h957aa3917932845d
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/observer.rs:79:21
                               winit::platform_impl::platform::observer::control_flow_handler::{{closure}}::h5c0b25be0bcc6fc0
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/observer.rs:41:9
                               std::panicking::try::do_call::hc086b26c899f2fa4
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:500:40
                               std::panicking::try::he8f2ca73e249c75e
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:464:19
                               std::panic::catch_unwind::hb515324b6e35556e
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panic.rs:142:14
                               winit::platform_impl::platform::event_loop::stop_app_on_panic::hef2b8de6fa01fb0d
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/event_loop.rs:245:11
                               winit::platform_impl::platform::observer::control_flow_handler::h21ed5e0db27228c6
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/observer.rs:39:5
                               winit::platform_impl::platform::observer::control_flow_end_handler::h7def52f1f57a0439
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/observer.rs:74:9
      25:        0x19c7399f0 - <unknown>
      26:        0x19c7398dc - <unknown>
      27:        0x19c739010 - <unknown>
      28:        0x19c7384b8 - <unknown>
      29:        0x1a5f82c40 - <unknown>
      30:        0x1a5f82a7c - <unknown>
      31:        0x1a5f827d4 - <unknown>
      32:        0x19f959d44 - <unknown>
      33:        0x19f958ee0 - <unknown>
      34:        0x19f94d344 - <unknown>
      35:        0x1044bf3c8 - winit::platform_impl::platform::event_loop::EventLoop<T>::run_return::{{closure}}::h75eef4bd9dcbe181
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/event_loop.rs:220:22
                               objc2::rc::autorelease::autoreleasepool::h1a65839ffacd38d6
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/objc2-0.3.0-beta.3.patch-leaks.3/src/rc/autorelease.rs:313:5
                               winit::platform_impl::platform::event_loop::EventLoop<T>::run_return::h5e8799bda153fc55
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform_impl/macos/event_loop.rs:211:25
      36:        0x1044b1314 - <winit::event_loop::EventLoop<T> as winit::platform::run_return::EventLoopExtRunReturn>::run_return::hd722781a47944b6a
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.7/src/platform/run_return.rs:51:9
                               eframe::native::run::run_and_return::h8b8caf238bb9ab2f
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:147:16
                               eframe::native::run::wgpu_integration::run_wgpu::{{closure}}::h35b3e1343279fbdd
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:1566:17
                               eframe::native::run::with_event_loop::{{closure}}::h3785f40c5db6fbd2
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:130:9
                               std::thread::local::LocalKey<T>::try_with::h5f81574cf2189eb2
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/thread/local.rs:270:16
                               std::thread::local::LocalKey<T>::with::h9f267ad2fbb98809
                                   at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/thread/local.rs:246:9
                               eframe::native::run::with_event_loop::h07672b892dbc6ebd
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:124:16
      37:        0x1044ac280 - eframe::native::run::wgpu_integration::run_wgpu::h7e19c6dafbe36aca
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/native/run.rs:1563:13
                               eframe::run_native::h2a083b9b1c8667cf
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/eframe-0.23.0/src/lib.rs:233:13
      38:        0x1040eca0c - re_viewer::native::run_native_app::hc843f0da7c62a786
                                   at /Users/emilk/code/rerun/rerun/crates/re_viewer/src/native.rs:14:5
      39:        0x1040340b4 - rerun::run::run_impl::{{closure}}::h08ed60506a5cd24d
                                   at /Users/emilk/code/rerun/rerun/crates/rerun/src/run.rs:551:16
                               rerun::run::run::{{closure}}::h9bb26bef3fa379b2
                                   at /Users/emilk/code/rerun/rerun/crates/rerun/src/run.rs:300:49
                               rerun::main::{{closure}}::h6b3a803b46d2e8d4
                                   at /Users/emilk/code/rerun/rerun/crates/rerun-cli/src/bin/rerun.rs:30:10
                               tokio::runtime::park::CachedParkThread::block_on::{{closure}}::h4c70d9a0d282280c
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/park.rs:283:63
                               tokio::runtime::coop::with_budget::h7ea60c5056f23540
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/coop.rs:107:5
                               tokio::runtime::coop::budget::he98aceea9976b4ba
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/coop.rs:73:5
                               tokio::runtime::park::CachedParkThread::block_on::h68d813f912265eb9
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/park.rs:283:31
      40:        0x104035ccc - tokio::runtime::context::BlockingRegionGuard::block_on::h0b257d35e78cc56d
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/context.rs:315:13
                               tokio::runtime::scheduler::multi_thread::MultiThread::block_on::hed8c49bc71b162c0
                                   at /Users/emilk/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.28.1/src/runtime/scheduler/multi_thread/mod.rs:68:14
emilk commented 1 year ago

If we want to log backtraces we should spend some time to clean them up, e.g. only include frames that are in re_ crates, and shorten the file names.

We can follow a similar approach to the one I use in https://github.com/emilk/egui/blob/master/crates/egui/src/callstack.rs

emilk commented 1 year ago

Some discussion here: https://rerunio.slack.com/archives/C033K5VS2KD/p1700578071871599