Test failure Assertion `num_trans == 1' failed.
Advanced PNG optimization program
Status: Beta
Brought to you by:
cosmin
Running the 0.7.9 test suite on Linux x86_64 (gcc 12.3.0, glibc 2.36) results in the following test failure:
$ ./configure && make && make test
…
gcc -s -o test/ratio_test \
test/ratio_test.o ratio.o
./optipng -o1 -q img/pngtest.png -out=pngtest.out.png
optipng: opngreduc.c:1047: opng_reduce_to_palette: Assertion `num_trans == 1' failed.
The failure also occurs with clang 15.0.6 and gcc 14.2.0 with glibc 2.41
Acknowledged, thank you. I'm going to call this a big "OOPSIE".
I haven't actually announced this release yet, and that's a good thing. I will recall this release, and then I'll start working on version 0.7.10, which hopefully will be "The Right Thing (tm)".
Is the issue in the test or in the underlying code? Is it safe to just ignore the test failure?
It's a real error. I took on fixing a little defect and I "fixed it" so well that it became a big defect. See Bug #90.
So, that assertion failure was bogus after all. In my previous response, I wanted to be rather safe than sorry.
Please see my follow up in bug #90.
Applying the rediffed https://sourceforge.net/p/optipng/bugs/90/#685a patch to 0.7.9 fixes the tests for me!
Thank you. I just wrote in bug #90: I've just announced the new libpng 1.6.48 release, and the new properly-fixed optipng release is coming up next.
See version 7.9.1. (Not a typo!)
That solves the test problem! Thanks. Looking forward to the next version bump and seeing version 2025.2 soon☺
I haven't considered going that far. Sounds tempting, though. Very tempting ☺