valadaptive / ntsc-rs

Free, open-source analog TV + VHS effect. Standalone application + plugin (After Effects, Premiere, and OpenFX).
Other
237 stars 4 forks source link

Out of bounds error in yiq_fielding.rs:376 #79

Closed CD10h closed 2 months ago

CD10h commented 2 months ago

I get an out-of-bounds error when trying to use the ntscrs crate as a library and the same crash can be reproduced when running cargo -p ntscrs --bench filter_profile. Also, the standalone GUI works from same build. Tested on win+linux - got same issue.

In testing I used RAYON_NUM_THREADS=1 to make the output legible. Also attaching a RUST_BACKTRACE=full as a file dump.txt Here is some less verbose output ( compilation messages snipped ) - my system has 24 hyperthreads.

Running benches\filter_profile.rs (target\release\deps\filter_profile-81cccd9459a513e9.exe)
Gnuplot not found, using plotters backend
Benchmarking full effect: Warming up for 3.0000 sthread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 921600
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 222105600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 277401600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 290304000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 293990400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 295833600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 297676800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 299520000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 301363200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 303206400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 305049600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 310579200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 312422400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 314265600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 316108800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 317952000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 321638400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 323481600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 325324800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 327168000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 329011200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 330854400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 332697600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 360345600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 365875200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 367718400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 369561600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 371404800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 373248000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 376934400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 378777600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 380620800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 382464000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 384307200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 386150400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 387993600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 400896000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 404582400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 406425600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 408268800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 410112000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 411955200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 413798400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 415641600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 421171200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 423014400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 424857600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 426700800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 428544000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 432230400
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 434073600
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 435916800
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 437760000
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 439603200
thread '<unnamed>' panicked at crates\ntscrs\src\yiq_fielding.rs:376:25:
index out of bounds: the len is 921600 but the index is 441446400
CD10h commented 2 months ago

I think it might be it this line ( bad multiplication )

I changed it to this and it looks like it's working

BlitInfo::from_full_frame(width, height, width * 3),
valadaptive commented 2 months ago

Pushed a fix to latest main; let me know if it works

CD10h commented 2 months ago

yep. it seems alright for now, thank you