Enigma icon indicating copy to clipboard operation
Enigma copied to clipboard

ArrayIndexOutOfBoundsException when decompiling on CLI with Procyon

Open AlpyneDreams opened this issue 5 years ago • 0 comments

Tested with commit: a76af673ab8951fb709352986d2cb567fc462412 Enigma Command: decompile procyon client.jar src client.mappings client.jar is from Minecraft 1.16.1 client.mappings is generated from convert-mappings proguard client.txt enigma_file client.mappings using 1.16.1 Mojang proguard mappings. For reproduction: Download client.mappings.gz

Reading jar...
Indexing jar
	Progress:  75%
	Progress: 100%
Finished in 7.5 seconds
Reading mappings...
Loading mapping file
	Progress: 100%
Finished in 0.3 seconds
Deobfuscating classes...
Decompiling classes...
Jul 20, 2020 7:32:54 PM com.strobel.assembler.metadata.signatures.Reifier reifyTypeArguments
WARNING: BAD TYPE ARGUMENTS: [TT;]; [null]
Jul 20, 2020 7:32:54 PM com.strobel.assembler.metadata.signatures.Reifier reifyTypeArguments
WARNING: BAD TYPE ARGUMENTS: [TT;]; [null]
	Progress:   2%
java.lang.ArrayIndexOutOfBoundsException
Enigma - 0.21+local
Command decompile has encountered an error! Usage:
		decompile <decompiler> <in jar> <out folder> [<mappings file>]

I believe the Procyon warnings are unrelated and a product of the mappings file I am using.

Full Stacktrace for the ArrayIndexOutOfBoundsException

Possible fixes

I have made a commit on my fork changing the call to jar.decompile in DecompileCommand.java to use EnigmaProject.DecompileErrorStrategy.TRACE_AS_SOURCE instead of the default PROPAGATE, like the GUI does, ~~at least superficially fixes this error~~. However I am not knowledgeable in Java parallel streams or Procyon so I elected not to make a pull request yet.

Edit: Nope, this just outputs the error into the affected exported source files, doesn't stop it from occuring entirely.

AlpyneDreams avatar Jul 21 '20 02:07 AlpyneDreams