out of memory.
a-j-smith opened this issue · 2 comments
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:75)
at java.awt.image.Raster.createPackedRaster(Raster.java:467)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
at java.awt.image.BufferedImage.(BufferedImage.java:333)
at backend.createBootZip(backend.java:123)
at gif2bootGUI$9$1.run(gif2bootGUI.java:232)
at java.lang.Thread.run(Thread.java:748)
it preprocesses 203 frames then this.
Exception in thread "Thread-1" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.(DataBufferInt.java:75)
at java.awt.image.Raster.createPackedRaster(Raster.java:467)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
at java.awt.image.BufferedImage.(BufferedImage.java:333)
at backend.createBootZip(backend.java:123)
at gif2bootGUI$9$1.run(gif2bootGUI.java:232)
at java.lang.Thread.run(Thread.java:748)
it preprocesses 203 frames then this.
This project is definitely in need of a rewrite to fix the memory management. However, as a quick fix, you can increase the heap memory available by running it like this:
java -Xmx8G -jar gif2boot.jar
I tested your gif at 1080x2160, and it generates the bootanimation.zip just fine.If 8 doesn't work for you, you may need to try a larger number. If you do not have 8 GB of RAM, then you may have to wait for a proper fix (or you can try 6 GB and maybe that will work instead).
I will leave this this issue open for now.