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.7k stars 341 forks source link

Panic on loading a specific video #8093

Closed abey79 closed 2 weeks ago

abey79 commented 2 weeks ago

Drag and dropping this video in the viewer panics:

cargo run --color=always -p rerun-cli --no-default-features --features native_viewer,map_view --profile dev
    Finished `dev` profile [optimized + debuginfo] target(s) in 0.31s
     Running `target/debug/rerun`
[2024-11-12T09:11:50Z DEBUG rerun::commands::entrypoint] Detected 10 cores. Using 8 compute threads.
[2024-11-12T09:11:50Z DEBUG re_memory::memory_limit] Setting memory limit to 48.0 GiB, which is 75% of total available memory (64.0 GiB).
[2024-11-12T09:11:50Z INFO  re_sdk_comms::server] Hosting a SDK server over TCP at 0.0.0.0:9876. Connect with the Rerun logging SDK.
[2024-11-12T09:11:50Z DEBUG eframe] Using the wgpu renderer
[2024-11-12T09:11:50Z DEBUG eframe::native::wgpu_integration] Event::Resumed
[2024-11-12T09:11:50Z DEBUG eframe::native::file_storage] Loading app state from "/Users/hhip/Library/Application Support/rerun/app.ron"…
[2024-11-12T09:11:50Z DEBUG egui_wgpu] Picked the only available wgpu adapter: backend: Metal, device_type: IntegratedGpu, name: "Apple M1 Max"
[2024-11-12T09:11:50Z DEBUG re_renderer::context] wgpu adapter backend: Metal, device_type: IntegratedGpu, name: "Apple M1 Max"
[2024-11-12T09:11:55Z INFO  re_data_loader::load_file] Loading "/Users/hhip/Downloads/twitter-2022-10-30-b4081690ab1c0545a2a8b12238ea6f8e2ae675bd395fd6d94ee5c434a915e723/data/tweets_media/1517176996106838023-vUiO9nkD-I5wwMDD.mp4"…
[2024-11-12T09:11:55Z DEBUG re_data_loader::loader_archetype] Loading video… filepath="/Users/hhip/Downloads/twitter-2022-10-30-b4081690ab1c0545a2a8b12238ea6f8e2ae675bd395fd6d94ee5c434a915e723/data/tweets_media/1517176996106838023-vUiO9nkD-I5wwMDD.mp4" loader="rerun.data_loaders.Archetype"

thread 'rayon-1' panicked at 'attempt to add with overflow'
re_mp4-0.2.0/src/reader.rs:222
stack backtrace:
   7: core::panicking::panic_fmt
             at core/src/panicking.rs:72:14
   8: core::panicking::panic_const::panic_const_add_overflow
             at core/src/panicking.rs:180:21
   9: re_mp4::reader::Mp4::build_tracks
  10: re_mp4::reader::Mp4::read
             at re_mp4-0.2.0/src/reader.rs:107:26
      re_mp4::reader::Mp4::read_bytes
             at re_mp4-0.2.0/src/reader.rs:23:19
  11: re_video::demux::mp4::<impl re_video::demux::VideoData>::load_mp4
             at re_video/src/demux/mp4.rs:12:13
  12: re_video::demux::VideoData::load_from_bytes
             at re_video/src/demux/mod.rs:144:28
  13: re_types::archetypes::_archetypes::asset_video_ext::<impl re_types::archetypes::_archetypes::asset_video::AssetVideo>::read_frame_timestamps_ns
             at re_types/src/archetypes/../archetypes/asset_video_ext.rs:56:13
  14: re_data_loader::loader_archetype::load_video
             at re_data_loader/src/loader_archetype.rs:192:45
      <re_data_loader::loader_archetype::ArchetypeLoader as re_data_loader::DataLoader>::load_from_file_contents
             at re_data_loader/src/loader_archetype.rs:109:25
  15: <re_data_loader::loader_archetype::ArchetypeLoader as re_data_loader::DataLoader>::load_from_path
             at re_data_loader/src/loader_archetype.rs:48:9
  16: re_data_loader::load_file::load::{{closure}}
             at re_data_loader/src/load_file.rs:174:25
      <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at core/src/panic/unwind_safe.rs:272:9
      std::panicking::try::do_call
             at std/src/panicking.rs:559:40
      std::panicking::try
             at std/src/panicking.rs:523:19
  17: std::panic::catch_unwind
             at std/src/panic.rs:149:14
      rayon_core::unwind::halt_unwinding
             at rayon-core-1.12.1/src/unwind.rs:17:5
      rayon_core::registry::Registry::catch_unwind
             at rayon-core-1.12.1/src/registry.rs:367:27
  18: rayon_core::spawn::spawn_job::{{closure}}
             at rayon-core-1.12.1/src/spawn/mod.rs:97:13
      <rayon_core::job::HeapJob<BODY> as rayon_core::job::Job>::execute
             at rayon-core-1.12.1/src/job.rs:169:9
  19: rayon_core::job::JobRef::execute
             at rayon-core-1.12.1/src/job.rs:64:9
      rayon_core::registry::WorkerThread::execute
             at rayon-core-1.12.1/src/registry.rs:860:13
      rayon_core::registry::WorkerThread::wait_until_cold
             at rayon-core-1.12.1/src/registry.rs:794:26
  20: rayon_core::registry::WorkerThread::wait_until
             at rayon-core-1.12.1/src/registry.rs:769:13
      rayon_core::registry::WorkerThread::wait_until_out_of_work
             at rayon-core-1.12.1/src/registry.rs:818:9
      rayon_core::registry::main_loop
             at rayon-core-1.12.1/src/registry.rs:923:5
      rayon_core::registry::ThreadBuilder::run
             at rayon-core-1.12.1/src/registry.rs:53:18
  21: <rayon_core::registry::DefaultSpawn as rayon_core::registry::ThreadSpawn>::spawn::{{closure}}
             at rayon-core-1.12.1/src/registry.rs:98:20

Troubleshooting Rerun: https://www.rerun.io/docs/getting-started/troubleshooting 
Report bugs: https://github.com/rerun-io/rerun/issues

Process finished with exit code 102

1517176996106838023-vUiO9nkD-I5wwMDD.mp4.zip

abey79 commented 2 weeks ago

This may or may not be related, but this other video yields these errors (no panic though).

image

1201427306096582656-9VyylJeMr9gNx7WL.mp4.zip

Note: in both case, this uses ffmpeg 4.4.4 which happens to be what I currently have on my computer.

Edit: this issue is resolved by using ffmpeg 6.1.1