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 while optimizing image, index out of range #82

Closed
matthiaskrgr opened this issue Sep 8, 2017 · 1 comment
Closed

crash while optimizing image, index out of range #82

matthiaskrgr opened this issue Sep 8, 2017 · 1 comment
Assignees
Labels
I-High Issues that are breaking core functionality for a small number of users T-Bug Some piece of the software is not working as intended T-Needs Tests

Comments

@matthiaskrgr
Copy link
Contributor

file:
https://gitlab.com/freedroid/freedroid-src/blob/master/data/gui/level_editor/waypoint_cursor.png

RUST_BACKTRACE=1  /home/matthias/vcs/github/oxipng/target/debug/oxipng -o 6 --zm 1-9 waypoint_cursor.png

Processing: waypoint_cursor.png
    65x35 pixels, PNG format
    4 bits/pixel, 8 colors in palette
    IDAT size = 296 bytes
    File size = 455 bytes
Reducing image to 4 bits/pixel, 7 colors in palette
Trying: 1944 combinations
Found better combination:
    zc = 8  zm = 7  zs = 0  f = 0        291 bytes
    IDAT size = 291 bytes (5 bytes decrease)
    file size = 447 bytes (8 bytes = 1.76% decrease)
thread 'main' panicked at 'index 24 out of range for slice of length 21', /checkout/src/libcore/slice/mod.rs:748:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::slice::slice_index_len_fail
             at /checkout/src/libcore/slice/mod.rs:748
  10: png::decoder::expand_paletted
             at /checkout/src/libcore/ops/arith.rs:0
  11: <png::decoder::Reader<R>>::next_interlaced_row
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/png-0.8.0/src/decoder/mod.rs:273
  12: oxipng::optimize_png
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/png-0.8.0/src/decoder/mod.rs:238
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/png-0.8.0/src/decoder/mod.rs:229
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/image-0.14.0/./src/png.rs:84
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/image-0.14.0/./src/dynimage.rs:470
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/image-0.14.0/./src/dynimage.rs:622
             at /home/matthias/.cargo/registry/src/git.luolix.top-1ecc6299db9ec823/image-0.14.0/./src/dynimage.rs:672
             at src/lib.rs:627
  13: oxipng::optimize
             at src/lib.rs:302
  14: oxipng::handle_optimization
             at src/main.rs:267
  15: oxipng::main
             at src/main.rs:234
  16: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:99
  17: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:59
  18: __libc_start_main
  19: _start

rustc 1.22.0-nightly (d93036a04 2017-09-07)

@shssoichiro
Copy link
Owner

Thanks for reporting this. I'll investigate and post a bugfix hopefully within a few days.

@shssoichiro shssoichiro self-assigned this Sep 9, 2017
@shssoichiro shssoichiro added I-High Issues that are breaking core functionality for a small number of users T-Needs Tests T-Bug Some piece of the software is not working as intended labels Sep 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-High Issues that are breaking core functionality for a small number of users T-Bug Some piece of the software is not working as intended T-Needs Tests
Projects
None yet
Development

No branches or pull requests

2 participants