Closed q2p closed 4 months ago
Hi, this was promoted to an error in https://github.com/etemesi254/zune-image/commit/efb4cb094a0ba27616c9d4a0909cd7b052e2a72a.
With the assumption that a legitimate image doesn't exist with the said sampling factors, but seems that's not the case.
I should dedicate some time to fix it
Hi, I'm glad to hear that you plan on addressing it. Thank you for a quick response :)
Fixed correctly by ac18d0bf2a672a8ee57653bbae1c4c2d8fafbba0.
Exposed another bug, hence the delay.
I have also added a test for it via https://github.com/etemesi254/zune-image/commit/69139b4502c0901976213f2e8d5fd07b3f8d1287 using the reference image you provided, hence pinging you to ask if it's okay or I should remove it
Thank you! I don't remember from where the image came from, but I guess it's okay
zune-jpeg panics when trying to parse a valid JPEG image. The assertion fails at: https://github.com/etemesi254/zune-image/blob/ba38f3fd50294ed68df5ee382898ea1af185555f/crates/zune-jpeg/src/worker.rs#L412
Image that produced the crash: https://github.com/etemesi254/zune-image/assets/11664429/ae728232-9be8-4314-8518-9ecaa57d3ac3
Cargo.toml:
main.rs:
Stack trace
``` thread 'main' panicked at C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\zune-jpeg-0.4.11\src\worker.rs:411:13: assertion `left == right` failed left: 6400 right: 3200 stack backtrace: 0: rust_begin_unwind at /rustc/c67326b063bd27ed04f306ba2e372cd92e0a8751/library\std\src/panicking.rs:645:5 1: core::panicking::panic_fmt at /rustc/c67326b063bd27ed04f306ba2e372cd92e0a8751/library\core\src/panicking.rs:72:14 2: core::panicking::assert_failed_inner at /rustc/c67326b063bd27ed04f306ba2e372cd92e0a8751/library\core\src/panicking.rs:343:17 3: core::panicking::assert_failed at /rustc/c67326b063bd27ed04f306ba2e372cd92e0a8751\library\core\src/panicking.rs:298:5 4: zune_jpeg::worker::upsample at C:\Users\user\.cargo\registry\src\index.crates.io-6f17d22bba15001f\zune-jpeg-0.4.11\src\worker.rs:411:13 5: zune_jpeg::mcu::