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 on compressing with interlacing enabled #42

Closed
bpbp-boop opened this issue May 26, 2016 · 2 comments
Closed

Crash on compressing with interlacing enabled #42

bpbp-boop opened this issue May 26, 2016 · 2 comments

Comments

@bpbp-boop
Copy link

1x1

oxipng is crashing with the uploaded file:
https://cloud.githubusercontent.com/assets/322387/15561653/543759a2-233b-11e6-8624-5809f6551000.png

oxipng -o 4 -i 1 --strip safe 1x1.png

Processing: 1x1.png
    1x1 pixels, PNG format
    2x8 bits/pixel, GrayscaleAlpha
    IDAT size = 11 bytes
    File size = 68 bytes
Trying: 48 combinations
thread '<main>' panicked at 'index 2 out of range for slice of length 0', ../src/libcore/slice.rs:527
stack backtrace:
   1:     0x7f1403ffb060 - sys::backtrace::tracing::imp::write::h3675b4f0ca767761Xcv
   2:     0x7f1403ffdf1b - panicking::default_handler::_$u7b$$u7b$closure$u7d$$u7d$::closure.44519
   3:     0x7f1403ffdb88 - panicking::default_handler::h18faf4fbd296d909lSz
   4:     0x7f1403feee4c - sys_common::unwind::begin_unwind_inner::hfb5d07d6e405c6bbg1t
   5:     0x7f1403fef298 - sys_common::unwind::begin_unwind_fmt::h8b491a76ae84af35m0t
   6:     0x7f1403ffa4d1 - rust_begin_unwind
   7:     0x7f140402d4af - panicking::panic_fmt::h98b8cbb286f5298alcM
   8:     0x7f140402d723 - slice::slice_index_len_fail::hc4dead8ea7162edaCWP
   9:     0x7f1403f37959 - png::filter_line::h754e21cc4a65cb1cHWb
  10:     0x7f1403f2576e - png::PngData::filter_image::h279709035897e51bJkb
  11:     0x7f1403f1d9fb - optimize_png::h380f5a051c02ba65L0c
  12:     0x7f1403f195a3 - optimize::ha508f8c49b7cb7eb8Oc
  13:     0x7f1403f138a9 - handle_optimization::h785d9e26eeb741aftja
  14:     0x7f1403f0c8ab - main::h2ac802ddff177ad7yaa
  15:     0x7f1403ffd7e4 - sys_common::unwind::try::try_fn::h14622312129452522850
  16:     0x7f1403ffa45b - __rust_try
  17:     0x7f1403ffd27b - rt::lang_start::h0ba42f7a8c46a626rKz
  18:     0x7f140311aeac - __libc_start_main
  19:     0x7f1403f09e58 - <unknown>

It's OK with just oxipng -o 4 --strip safe 1x1.png though. I've got some other crashes with different images as well, would you like separate bug reports for those as well?

@shssoichiro
Copy link
Owner

Thanks for the bug report! I'll take a look at this image and see where the issue is being thrown. Thanks for the backtrace as well.

If the other images are also crashing with -i 1, you can add them onto this issue (since the crashes are probably related). If the other images are crashing without interlacing, then please open a separate issue for them.

@shssoichiro
Copy link
Owner

I'm pushing a fix for this issue. If you still experience issues on any images with the new version, you can either comment on this issue or open a new issue with the images that are experiencing problems. Thanks!

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

2 participants