Mekanism Tools

Mekanism Tools

77M Downloads

Cannot launch data generators

shartte opened this issue ยท 4 comments

commented

This is a development issue.

Steps:

  • Checked out Mekanism (see attached log for revision)
  • Clear gradle and maven caches
  • Run gradlew clean runData
  • Crashes with the following exception

https://gist.github.com/shartte/2fe7ae0dcee9531d149b0a165abdfa04

Since the CI/CD appears to work, this must be something local to my system, but I cannot for the life of me figure out what it is:

[11:55:26] [pool-2-thread-1/ERROR] [ne.mi.fm.lo.mo.BackgroundScanHandler/SCAN]: An error occurred scanning file Mod File: D:\Mekanism\build\resources\main
java.util.concurrent.CompletionException: java.lang.ArrayIndexOutOfBoundsException: 57
        at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_121] {}
        at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) [?:1.8.0_121] {}
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) [?:1.8.0_121] {}
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121] {}
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121] {}
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121] {}
Caused by: java.lang.ArrayIndexOutOfBoundsException: 57
        at org.objectweb.asm.ClassReader.readLabel(ClassReader.java:2446) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.createLabel(ClassReader.java:2462) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.readTypeAnnotations(ClassReader.java:2527) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1695) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1284) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:688) ~[asm-7.2.jar:7.2] {}
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:400) ~[asm-7.2.jar:7.2] {}
        at net.minecraftforge.fml.loading.moddiscovery.Scanner.fileVisitor(Scanner.java:60) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at net.minecraftforge.fml.loading.moddiscovery.Scanner.lambda$scan$0(Scanner.java:46) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:1.8.0_121] {}
        at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[?:1.8.0_121] {}
        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_121] {}
        at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_121] {}
        at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_121] {}
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[?:1.8.0_121] {}
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[?:1.8.0_121] {}
        at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:1.8.0_121] {}
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:1.8.0_121] {}
        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_121] {}
        at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[?:1.8.0_121] {}
        at net.minecraftforge.fml.loading.moddiscovery.ExplodedDirectoryLocator.scanIndividualPath(ExplodedDirectoryLocator.java:97) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at net.minecraftforge.fml.loading.moddiscovery.ExplodedDirectoryLocator.lambda$scanFile$3(ExplodedDirectoryLocator.java:90) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at java.lang.Iterable.forEach(Iterable.java:75) ~[?:1.8.0_121] {}
        at net.minecraftforge.fml.loading.moddiscovery.ExplodedDirectoryLocator.scanFile(ExplodedDirectoryLocator.java:90) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at net.minecraftforge.fml.loading.moddiscovery.ModFile.scanFile(ModFile.java:135) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at net.minecraftforge.fml.loading.moddiscovery.Scanner.scan(Scanner.java:46) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at net.minecraftforge.fml.loading.moddiscovery.ModFile.compileContent(ModFile.java:131) ~[forge-1.16.1-32.0.108_mapped_snapshot_20200723-1.16.1-launcher.jar:?] {}
        at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) ~[?:1.8.0_121] {}
commented

try delete your build folder and/or gradle cache and try again. You either have a corrupted jar or your java compiler is producing invalid code.

Or CI doesn't run the datagen btw

commented

I had hoped that running rd /s /q %USERPROFILE%\.gradle %USERPROFILE%\.m2 to remove any shared cache and then running the clean goal would be sufficient.

I'll try again with a different JDK and will also explicitly remove the project's build and .gradle folder in addition to the shared ones.

commented

Alright, doing all these things lead to runData to finally finish.
I also added --no-daemon --max-workers 1 to the gradlew command line, because I think this might be (once again) a concurrency issue in ForgeGradle like the dependency download is :-|

commented

because I think this might be (once again) a concurrency issue in ForgeGradle like the dependency download is :-|

it would not surprise me tbh