You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SrgMcpRenamer, it is possible for the last case in the zip copying function to throw a ZipException: invalid entry compressed size:
zout.putNextEntry(ein);
Utils.copy(zin, zout);
The stack trace might look like this, which is what I get when I try to use the dependency curse.maven:tinkers-tool-leveling-250957:2630860:
Exception in thread "main" java.util.zip.ZipException: invalid entry compressed size (expected 256 but got 257 bytes)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:267)
at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:192)
at net.minecraftforge.installertools.SrgMcpRenamer.process(SrgMcpRenamer.java:155)
at net.minecraftforge.installertools.ConsoleTool.main(ConsoleTool.java:55)
Suppressed: java.util.zip.ZipException: invalid entry compressed size (expected 256 but got 257 bytes)
at java.util.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:267)
at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:360)
at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:238)
at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:377)
at net.minecraftforge.installertools.SrgMcpRenamer.process(SrgMcpRenamer.java:159)
... 1 more
This happens because it's possible for slight discrepancies to arise between the compressed size of a file in the original archive and the mapped one, but since the code just straight up copies over the exact same ZipEntry instance, the discrepancy is noticed by ZipOutputStream, which assumes it's an error and raises this exception. A fix might be simply to create a new ZipEntry (as is done in the other cases) and to populate all the fields manually, so the new compressed size is computed automatically.
The text was updated successfully, but these errors were encountered:
In SrgMcpRenamer, it is possible for the last case in the zip copying function to throw a
ZipException: invalid entry compressed size
:The stack trace might look like this, which is what I get when I try to use the dependency
curse.maven:tinkers-tool-leveling-250957:2630860
:This happens because it's possible for slight discrepancies to arise between the compressed size of a file in the original archive and the mapped one, but since the code just straight up copies over the exact same ZipEntry instance, the discrepancy is noticed by ZipOutputStream, which assumes it's an error and raises this exception. A fix might be simply to create a new ZipEntry (as is done in the other cases) and to populate all the fields manually, so the new compressed size is computed automatically.
The text was updated successfully, but these errors were encountered: