Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when trying to remove grain #1

Open
Orum opened this issue Nov 11, 2022 · 2 comments
Open

Crash when trying to remove grain #1

Orum opened this issue Nov 11, 2022 · 2 comments

Comments

@Orum
Copy link

Orum commented Nov 11, 2022

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?

@shssoichiro
Copy link
Collaborator

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.**

@dreambottle
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants