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

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException #12

Open
ebremer opened this issue Aug 16, 2017 · 3 comments
Open

Comments

@ebremer
Copy link

ebremer commented Aug 16, 2017

I'm running the optimizer on numerous files. One file in particular crashes each time with the following code:

optimizer.setCompressor("zopfli", 32);
optimizer.optimize(pi, ofn, false, null);

With debug mode, I can the following:
=== OPTIMIZING ===
Applying filter: NONE
Applying filter: SUB
Applying filter: UP
Applying filter: AVERAGE
Applying filter: PAETH
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 8388609
at com.googlecode.pngtastic.core.processing.zopfli.Squeeze.optimalRun(Squeeze.java:76)
at com.googlecode.pngtastic.core.processing.zopfli.Squeeze.optimal(Squeeze.java:44)
at com.googlecode.pngtastic.core.processing.zopfli.Deflate.deflateDynamicBlock(Deflate.java:245)
at com.googlecode.pngtastic.core.processing.zopfli.Deflate.deflateSplittingFirst(Deflate.java:288)
at com.googlecode.pngtastic.core.processing.zopfli.Deflate.deflatePart(Deflate.java:225)
at com.googlecode.pngtastic.core.processing.zopfli.Deflate.compress(Deflate.java:397)
at com.googlecode.pngtastic.core.processing.zopfli.Zopfli.compressZlib(Zopfli.java:60)
at com.googlecode.pngtastic.core.processing.zopfli.Zopfli.compress(Zopfli.java:51)
at com.googlecode.pngtastic.core.processing.ZopfliCompressionHandler.deflate(ZopfliCompressionHandler.java:40)
at com.googlecode.pngtastic.core.PngOptimizer.optimize(PngOptimizer.java:124)
at com.googlecode.pngtastic.core.PngOptimizer.optimize(PngOptimizer.java:48)
at io.haylyn.util.CustomTiler.readWriteTiles(CustomTiler.java:205)
at io.haylyn.util.CustomTiler.main(CustomTiler.java:336)

Here is the problem image:
saved-0-102-13

@eustas
Copy link

eustas commented May 15, 2018

This was recently fixed in mainstream CafeUndZopfli repo.

@abique
Copy link

abique commented Oct 4, 2018

So this issue is closed now?

@eustas
Copy link

eustas commented Oct 11, 2018

According to repo state - no. Author have to pull the fresh CafeUndZopfli sources...

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

3 participants