grav1synth icon indicating copy to clipboard operation
grav1synth copied to clipboard

Crash when trying to remove grain

Open Orum opened this issue 2 years ago • 2 comments

When trying to run grav1synth remove --output nograin.mkv lightgrain.mkv (v0.1.0-beta.5), grav1synth immediately dies with the error: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: CapacityError: insufficient capacity'

Any ideas?

Orum avatar Nov 11 '22 09:11 Orum

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: CapacityError: insufficient capacity', /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayvec-0.7.2/src/arrayvec_impl.rs:39:32
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1107:23
   4: arrayvec::arrayvec_impl::ArrayVecImpl::push
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayvec-0.7.2/src/arrayvec_impl.rs:39:9
   5: arrayvec::arrayvec::ArrayVec<T,_>::push
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/arrayvec-0.7.2/src/arrayvec.rs:176:9
   6: grav1synth::parser::grain::film_grain_params
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/grain.rs:170:9
   7: grav1synth::parser::frame::<impl grav1synth::parser::BitstreamParser<_>>::uncompressed_header::{{closure}}
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/frame.rs:600:53
   8: nom::bits::bits::{{closure}}
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.1/src/bits/mod.rs:47:25
   9: grav1synth::parser::frame::<impl grav1synth::parser::BitstreamParser<_>>::uncompressed_header
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/frame.rs:147:9
  10: grav1synth::parser::frame::<impl grav1synth::parser::BitstreamParser<_>>::parse_frame_header
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/frame.rs:116:31
  11: grav1synth::parser::frame::<impl grav1synth::parser::BitstreamParser<_>>::parse_frame_obu::{{closure}}
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/frame.rs:79:13
  12: <F as nom::internal::Parser<I,O,E>>::parse
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.1/src/internal.rs:325:5
  13: nom::error::context::{{closure}}
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.1/src/error.rs:240:21
  14: grav1synth::parser::frame::<impl grav1synth::parser::BitstreamParser<_>>::parse_frame_obu
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/frame.rs:78:37
  15: grav1synth::parser::obu::<impl grav1synth::parser::BitstreamParser<_>>::parse_obu::{{closure}}
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/obu.rs:121:21
  16: <F as nom::internal::Parser<I,O,E>>::parse
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.1/src/internal.rs:325:5
  17: nom::error::context::{{closure}}
             at /<scrubbed>/.cargo/registry/src/github.com-1ecc6299db9ec823/nom-7.1.1/src/error.rs:240:21
  18: grav1synth::parser::obu::<impl grav1synth::parser::BitstreamParser<_>>::parse_obu
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser/obu.rs:119:43
  19: grav1synth::parser::BitstreamParser<_>::modify_grain_headers
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/parser.rs:210:46
  20: grav1synth::main
             at /<scrubbed>/grav1synth-0.1.0-beta.5/src/main.rs:268:13
  21: core::ops::function::FnOnce::call_once
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.**

shssoichiro avatar Nov 12 '22 00:11 shssoichiro

I am experiencing the same issue when trying to apply, remove or inspect grain. Not sure how to fix this, but it seems to happen because for my file this line eventually reads num_y_points=15, while as NUM_Y_POINTS, used as a vector size allows 14 max.

Any idea what's going on?

dreambottle avatar Nov 27 '22 23:11 dreambottle