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

oxipng corrupts an all transparent png file #60

Closed
bvinc opened this issue Mar 4, 2017 · 1 comment
Closed

oxipng corrupts an all transparent png file #60

bvinc opened this issue Mar 4, 2017 · 1 comment
Labels
I-High Issues that are breaking core functionality for a small number of users

Comments

@bvinc
Copy link

bvinc commented Mar 4, 2017

$ wget -qO space_16x16.png https://image.ibb.co/n9SLyv/space_16x16.png

$ oxipng space_16x16.png 
Processing: space_16x16.png
    16x16 pixels, PNG format
    4x8 bits/pixel, RGBA
    IDAT size = 18 bytes
    File size = 133 bytes
Reducing image to 2x8 bits/pixel, Grayscale + Alpha
Trying: 8 combinations
    IDAT size = 18 bytes (0 bytes decrease)
    file size = 129 bytes (4 bytes = 3.01% decrease)
Output: space_16x16.png

$ oxipng space_16x16.png 
Processing: space_16x16.png
thread 'main' panicked at 'index 1056 out of range for slice of length 1040', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:578
note: Run with `RUST_BACKTRACE=1` for a backtrace.

$ RUST_BACKTRACE=1 oxipng space_16x16.png 
Processing: space_16x16.png
thread 'main' panicked at 'index 1056 out of range for slice of length 1040', /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:578
stack backtrace:
   1:     0x555c7f1be15c - std::sys::imp::backtrace::tracing::imp::write::h1d59ca58eb86a1e2
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x555c7f1c1e6e - std::panicking::default_hook::{{closure}}::hc8550e2dc230bf9b
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:351
   3:     0x555c7f1c1a74 - std::panicking::default_hook::he85ae9e5c9867198
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:367
   4:     0x555c7f1c230b - std::panicking::rust_panic_with_hook::h319375f6b98710b0
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:555
   5:     0x555c7f1c21a4 - std::panicking::begin_panic::hbfd2ece4b73bdca6
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:517
   6:     0x555c7f1c20c9 - std::panicking::begin_panic_fmt::h8409f0145843dd1f
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:501
   7:     0x555c7f1c2057 - rust_begin_unwind
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:477
   8:     0x555c7f1ee2bd - core::panicking::panic_fmt::hfaaf47fca562bd04
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/panicking.rs:69
   9:     0x555c7f1ee3b9 - core::slice::slice_index_len_fail::h1479b49feeda4eb6
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libcore/slice.rs:578
  10:     0x555c7f0c8df8 - <oxipng::png::ScanLines<'a> as core::iter::iterator::Iterator>::next::h0c866b7002f03a5d
  11:     0x555c7f0cab17 - oxipng::png::PngData::unfilter_image::hd29ee8bdcb3c42ba
  12:     0x555c7f0ca124 - oxipng::png::PngData::from_slice::hcb8961728318e794
  13:     0x555c7f0c9018 - oxipng::png::PngData::new::h3d5f02c762088b4b
  14:     0x555c7f0d93ad - oxipng::optimize::h1ce3773fa9751aac
  15:     0x555c7f0b0794 - oxipng::handle_optimization::hf840bd1282ba2ff4
  16:     0x555c7f0ad099 - oxipng::main::h448741f3952fecea
  17:     0x555c7f1c919a - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libpanic_unwind/lib.rs:98
  18:     0x555c7f1c2a76 - std::rt::lang_start::h0637c2e100ff36fc
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panicking.rs:436
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/panic.rs:361
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/rt.rs:57
  19:     0x7f87ebfb53f0 - __libc_start_main
  20:     0x555c7f0a3f19 - _start
  21:                0x0 - <unknown>

@bvinc
Copy link
Author

bvinc commented Mar 4, 2017

This is a good case to add a verification check at the end that verifies that the output png file can be read and that all the pixels are the same.

@shssoichiro shssoichiro added the I-High Issues that are breaking core functionality for a small number of users label Mar 5, 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
Projects
None yet
Development

No branches or pull requests

2 participants