Open Athlon64 opened 3 years ago
Sounds like a bug. Are you able to provide an example image and a code snippet that causes the crash?
Thanks for replying.
The code snippet is as follows:
extern crate jpeg_decoder as jpeg;
use std::fs::File;
use std::io::BufReader;
fn main() {
let file = File::open("test.jpg").expect("failed to open file");
let mut decoder = jpeg::Decoder::new(BufReader::new(file));
let pixels = decoder.decode().expect("failed to decode image");
let metadata = decoder.info().unwrap();
}
I just copied the example and changed the name of the image to mine. The image was downloaded from the Internet and attached below.
P.S. My OS is Archlinux, rust compiler version is 1.54.0
Hm, I was unable to replicate this on Ubuntu or Arch
I was just trying this crate with the simple example on the main webpage. When running it with
cargo run
, everything was perfect as expected. But when I ran it withcargo run --release
, it panicked:and I tried a lot of different jpgs, always the same result.
I am wondering is this a bug or something?