marian-m12l / studio

STUdio - Story Teller Unleashed
https://marian-m12l.github.io/studio-website/
Mozilla Public License 2.0
709 stars 132 forks source link

failed to convert a pack #496

Closed Feverone closed 3 weeks ago

Feverone commented 3 weeks ago

Describe the bug Failed to convert a pack A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior: upload the pack in the library then try to convert it for V1 lunii box. It worked with other packs. see logs below

2024-10-28 21:09:13,703 [INFO ] [s.w.s.LibraryService]: Pack is in ARCHIVE format. Converting to RAW format 2024-10-28 21:09:13,704 [INFO ] [s.w.s.LibraryService]: Reading ARCHIVE format pack 2024-10-28 21:09:13,948 [INFO ] [s.w.s.LibraryService]: Uncompressing pack assets 2024-10-28 21:09:13,950 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 1/18 [pack-converter-0] 2024-10-28 21:09:13,951 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 2/18 [ForkJoinPool.commonPool-worker-1] 2024-10-28 21:09:13,951 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 4/18 [ForkJoinPool.commonPool-worker-2] 2024-10-28 21:09:13,951 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 3/18 [ForkJoinPool.commonPool-worker-4] 2024-10-28 21:09:13,951 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 5/18 [pack-converter-0] 2024-10-28 21:09:13,954 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 8/18 [ForkJoinPool.commonPool-worker-5] 2024-10-28 21:09:13,954 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 9/18 [ForkJoinPool.commonPool-worker-2] 2024-10-28 21:09:13,955 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 11/18 [ForkJoinPool.commonPool-worker-7] 2024-10-28 21:09:13,953 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 7/18 [ForkJoinPool.commonPool-worker-3] 2024-10-28 21:09:13,956 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 12/18 [ForkJoinPool.commonPool-worker-7] 2024-10-28 21:09:13,953 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 6/18 [ForkJoinPool.commonPool-worker-1] 2024-10-28 21:09:13,957 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 14/18 [ForkJoinPool.commonPool-worker-1] 2024-10-28 21:09:13,957 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 13/18 [ForkJoinPool.commonPool-worker-3] 2024-10-28 21:09:13,959 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 15/18 [ForkJoinPool.commonPool-worker-3] 2024-10-28 21:09:13,954 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 10/18 [ForkJoinPool.commonPool-worker-6] 2024-10-28 21:09:13,960 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,961 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,959 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,961 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,961 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,961 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,962 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,962 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:13,986 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 16/18 [ForkJoinPool.commonPool-worker-5] 2024-10-28 21:09:13,988 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:14,058 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 17/18 [pack-converter-0] 2024-10-28 21:09:14,059 [DEBUG] [s.c.v.u.PackAssetsCompression]: Image from node 18/18 [ForkJoinPool.commonPool-worker-7] 2024-10-28 21:09:14,060 [DEBUG] [s.c.v.u.PackAssetsCompression]: Uncompressing 4-bits/RLE BMP image asset into BMP 2024-10-28 21:09:14,066 [ERROR] [s.w.s.LibraryService]: Failed to convert ARCHIVE format pack to RAW format studio.core.v1.utils.exception.StoryTellerException: studio.core.v1.utils.exception.StoryTellerException: java.io.EOFException at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:485) at java.base/java.util.concurrent.ForkJoinTask.getException(ForkJoinTask.java:555) at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:573) at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:663) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:677) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:264) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:636) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:810) at studio.core.v1.utils.PackAssetsCompression.processImageAssets(PackAssetsCompression.java:147) at studio.core.v1.utils.PackAssetsCompression.processUncompressed(PackAssetsCompression.java:73) at studio.webui.service.LibraryService.addConvertedRawPackFile(LibraryService.java:179) at studio.webui.service.LibraryService.addConvertedPack(LibraryService.java:151) at studio.webui.api.LibraryController.lambda$apiRouter$4(LibraryController.java:92) at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159) at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100) at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157) at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:1575) Caused by: studio.core.v1.utils.exception.StoryTellerException: java.io.EOFException at studio.core.v1.utils.stream.ThrowingFunction.lambda$unchecked$0(ThrowingFunction.java:27) at studio.core.v1.utils.PackAssetsCompression.lambda$processImageAssets$6(PackAssetsCompression.java:158) at studio.core.v1.utils.stream.StoppingConsumer.lambda$stopped$0(StoppingConsumer.java:24) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570) at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:759) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189) Caused by: java.io.EOFException at java.desktop/javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:385) at java.desktop/com.sun.imageio.plugins.common.ReaderUtil.staggeredReadByteStream(ReaderUtil.java:239) at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.readRLE4(BMPImageReader.java:1704) at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:947) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1466) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363) at studio.core.v1.utils.ImageConversion.convertImage(ImageConversion.java:59) at studio.core.v1.utils.ImageConversion.anyToBitmap(ImageConversion.java:51) at studio.core.v1.utils.PackAssetsCompression.lambda$processUncompressed$2(PackAssetsCompression.java:78) at studio.core.v1.utils.stream.ThrowingFunction.lambda$unchecked$0(ThrowingFunction.java:24) ... 11 more 2024-10-28 21:09:14,069 [ERROR] [s.w.a.LibraryController]: Failed to read or convert pack 2024-10-28 21:09:14,069 [ERROR] [s.w.MainVerticle]: Exception thrown studio.core.v1.utils.exception.StoryTellerException: Failed to convert ARCHIVE format pack to RAW format at studio.webui.service.LibraryService.addConvertedRawPackFile(LibraryService.java:195) at studio.webui.service.LibraryService.addConvertedPack(LibraryService.java:151) at studio.webui.api.LibraryController.lambda$apiRouter$4(LibraryController.java:92) at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159) at io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100) at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157) at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:1575) Caused by: studio.core.v1.utils.exception.StoryTellerException: studio.core.v1.utils.exception.StoryTellerException: java.io.EOFException at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:501) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:485) at java.base/java.util.concurrent.ForkJoinTask.getException(ForkJoinTask.java:555) at java.base/java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:573) at java.base/java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:663) at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:677) at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:264) at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:636) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:810) at studio.core.v1.utils.PackAssetsCompression.processImageAssets(PackAssetsCompression.java:147) at studio.core.v1.utils.PackAssetsCompression.processUncompressed(PackAssetsCompression.java:73) at studio.webui.service.LibraryService.addConvertedRawPackFile(LibraryService.java:179) ... 10 more Caused by: studio.core.v1.utils.exception.StoryTellerException: java.io.EOFException at studio.core.v1.utils.stream.ThrowingFunction.lambda$unchecked$0(ThrowingFunction.java:27) at studio.core.v1.utils.PackAssetsCompression.lambda$processImageAssets$6(PackAssetsCompression.java:158) at studio.core.v1.utils.stream.StoppingConsumer.lambda$stopped$0(StoppingConsumer.java:24) at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1709) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:570) at java.base/java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291) at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:759) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1458) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2034) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:189) Caused by: java.io.EOFException at java.desktop/javax.imageio.stream.ImageInputStreamImpl.readFully(ImageInputStreamImpl.java:385) at java.desktop/com.sun.imageio.plugins.common.ReaderUtil.staggeredReadByteStream(ReaderUtil.java:239) at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.readRLE4(BMPImageReader.java:1704) at java.desktop/com.sun.imageio.plugins.bmp.BMPImageReader.read(BMPImageReader.java:947) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1466) at java.desktop/javax.imageio.ImageIO.read(ImageIO.java:1363) at studio.core.v1.utils.ImageConversion.convertImage(ImageConversion.java:59) at studio.core.v1.utils.ImageConversion.anyToBitmap(ImageConversion.java:51) at studio.core.v1.utils.PackAssetsCompression.lambda$processUncompressed$2(PackAssetsCompression.java:78) at studio.core.v1.utils.stream.ThrowingFunction.lambda$unchecked$0(ThrowingFunction.java:24) ... 11 more

Expected behavior convert the pack

Internal Server Error: {"error":{"code":500,"message":"Failed to convert ARCHIVE format pack to RAW format"},"stack":["studio.webui.service.LibraryService.addConvertedRawPackFile(LibraryService.java:195)","studio.webui.service.LibraryService.addConvertedPack(LibraryService.java:151)","studio.webui.api.LibraryController.lambda$apiRouter$4(LibraryController.java:92)","io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:159)","io.vertx.core.impl.AbstractContext.dispatch(AbstractContext.java:100)","io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:157)","io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)","java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)","java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)","io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)","java.base/java.lang.Thread.run(Thread.java:1575)"]}

Desktop and environment (please complete the following information):

Additional context Add any other context about the problem here.

Feverone commented 3 weeks ago

Found the issue. The image (bmp file) used at each stage are the problem. Not sure if you can do something to convert them with the right expectation for a lunii V1.

After deleting the images, conversion worked. Other solution was to modify all bmp files in black & white only (saturation -100). All good now. you can close the issue.

attached one bmp file 0b4ca7d640c9168bfffc7c94766be41fa15c1a4d.zip that was KO if you wanna check why Studio is not converting it