Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setupDecompWorkspace fails #451

Closed
dshadowwolf opened this issue Sep 25, 2017 · 46 comments

Comments

Projects
None yet
7 participants
@dshadowwolf
Copy link

commented Sep 25, 2017

Updated the Forge Version and Snapshot version of a project earlier today after a strange error started showing up (unable to find a symbol - never seen that happen before). As I habitually use 'clean' before 'build' I ran a 'cleanCache' to clear the cache and see if the issue was resolved. Afterwards I get an error when trying the 'setupDecompWorkspace' task to get things back on track. (setupDevWorkspace has the code unable to even build thanks to a lot of "missing symbol" errors)

Issue with "setupDecompWorkspace" is:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 24, Size: 9
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.get(ArrayList.java:429)
at org.jetbrains.java.decompiler.struct.consts.ConstantPool.(ConstantPool.java:109)
at org.jetbrains.java.decompiler.struct.StructClass.(StructClass.java:84)
at org.jetbrains.java.decompiler.struct.StructClass.(StructClass.java:72)
at org.jetbrains.java.decompiler.struct.StructContext.addArchive(StructContext.java:159)
at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:100)
at org.jetbrains.java.decompiler.struct.StructContext.addSpace(StructContext.java:78)
at org.jetbrains.java.decompiler.main.Fernflower.addAllClasspath(Fernflower.java:119)
at org.jetbrains.java.decompiler.main.Fernflower.(Fernflower.java:47)
at org.jetbrains.java.decompiler.main.decompiler.BaseDecompiler.(BaseDecompiler.java:32)
at net.minecraftforge.gradle.tasks.fernflower.FernFlowerInvoker.runFernFlower(FernFlowerInvoker.java:64)
at net.minecraftforge.gradle.tasks.fernflower.FernFlowerInvoker.main(FernFlowerInvoker.java:41)
:decompileMc FAILED

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

Testing with the Forge MDK for 1.12 and it is going through, with several months old mappings file. Are the mappings from SEP-2017 broken in some manner ?

@darkhax

This comment has been minimized.

Copy link

commented Sep 25, 2017

@dshadowwolf I have had success using the snapshot_20170919 mappings. So far I have only been able to reproduce this issue when ATs are involved.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

@darkhax I have seen the error in everything I've tried that is past 20170624 (the one in the Forge MDK) and even in projects such as MMD OreSpawn, which has no external dependencies that have AT's and has no AT's itself.

And it has:

minecraft {
    version = "1.12-14.21.1.2443"
    runDir = "run"
    mappings = "snapshot_20170908"
//    coreMod = ""
    makeObfSourceJar = false
}
@darkhax

This comment has been minimized.

Copy link

commented Sep 25, 2017

I've managed to reproduce your error using snapshot_20170624 but only when an AT or dep with an AT is present.

Edit: I have since been able to reproduce without ATs.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

MMD OreSpawn has no external dependencies or AT's and I have seen the issue there. I'm seeing if using the Forge MDK itself as a clean, completely bare of any possible dependencies or other issues base will reproduce.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

And tested with "Additional Loot Tables" - which again, has no external dependencies and no Access Transformers. I have, however, seen that the default environment of the Forge MDK is fine - this is puzzling.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

Does not seem to be related to the snapshot at all - have tried in 'Additional Loot Tables' with snapshot_20170624 that is what the MDK has as a default and get the error, as well - the MDK can be told to use snapshot_20170925 and it works, so in this instance I'm out of ideas as to what the cause might be.

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

I am not able to reproduce this on anything that I try.
Can you provide the /build/taskLogs/decompileJar.log file.
And in that log file should be several "Adding File to context from classpath" lines.
I need the jar file the the last one of those lines points to.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

madman@WolfBoxTwo ~/AdditionalLootTables/build/taskLogs
$ cat decompileMc.log
INFO:  Adding File to context from classpath: D:\gradle\caches\modules-2\files-2.1\net.minecraftforge.gradle\ForgeGradle\2.3-SNAPSHOT\c0ca3511c0c97923a346071b61afd0d9c0e5b411\ForgeGradle-2.3-SNAPSHOT.jar

Let me see if one from BaseMetals has more...

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

...and I have to say... What the hell ?

I wasn't finding the file in BaseMetals, so I ran the process again. Complained about not being able to access a log file - so I killed the entire contents of 'build' manually. Now it works. Lets try that over in OreSpawn - another place it failed before.

Okay, still happened there without removing the 'build' directory completely (shouldn't 'clean' do most of that ?), now lets see what happens when I remove the contents...

Here's a link to that small session: https://hastebin.com/agatomadec.tex

No idea at this point...

@gegy1000

This comment has been minimized.

Copy link

commented Sep 25, 2017

I am also able to reproduce this, and getting the same output as @dshadowwolf. From what I can tell FernFlower is having issues parsing the ForgeGradle jar, which is strange. Could this be a FernFlower / ForgeFlower bug?

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

As seen in the issue I've made, I was also able to reproduce it also

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

...this is strange - the project that first exhibited this issue has now gotten through a setupDecompWorkspace against 2485 with snapshot_20170908 (which it hadn't before) and snapshot_20170917 (randomly selected) after I deleted the entirety of 'build'.

But other projects are still showing this issue, even if I do that. I am somewhat puzzled by this and wondering if the issue might be an edge-case that I've managed to easily trigger.

@darkhax

This comment has been minimized.

Copy link

commented Sep 25, 2017

Adding on to what you asked. There is no decompileJar.log but there is a decompileMc.log file though. The contents of this file in an errored setup is only a few lines, like Dhsadows. Here is my version of the file.

INFO:  Adding File to context from classpath: C:\Users\darkh\.gradle\caches\modules-2\files-2.1\net.minecraftforge.gradle\ForgeGradle\2.3-SNAPSHOT\c0ca3511c0c97923a346071b61afd0d9c0e5b411\ForgeGradle-2.3-SNAPSHOT.jar

As requested, this is the jar file. Renamed it to .zip because GitHub doesn't support Jar files.

ForgeGradle-2.3-SNAPSHOT.zip

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Hm, I'll try what dshadow had done to see if any difference occurs

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

@CDAGaming It only worked for the one project and the others I've tried it on have had the same failure.

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

We have found the issue, it's multi-part. Not the least of which is the fact that Fernflower doesn't support the new J9 constant pool entries. I'm adding support for that right now so it should stop erroring in a bit.
The other part @nallar is looking into, and that's that FG's packaging over-shades things that it shouldn't.

@darkhax

This comment has been minimized.

Copy link

commented Sep 25, 2017

Thanks for looking into it :)

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

Thanks for the hard work, @LexManos, @nallar and the rest of the team!

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

MinecraftForge/ForgeFlower@c88442d
Now its just a matter of it building and propagating to all of yall.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

It's giving off a lot more errors on Travis during build :/
https://travis-ci.org/CDAGaming/MinecraftForge

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

Sounds like a corrupt decompile, clean your gradle cache and try again.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

@CDAGaming there have been quite a few naming changes starting after 20170917 - I'm handling those at this time myself.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Previous comment removed, as i forgot to refresh dependencies for new forgeflower

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

hrm... I am not seeing that, currently - let me do a test in one of the projects that was still erroring.

Okay... Going to head to hastebin again, you're not going to like this, @LexManos...
Lots of failed patching. Have a complete "decompileMC" log for you, but it doesn't seem to show any issues...

https://hastebin.com/ewizuvejiz.coffeescript

@kashike

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

I get the feeling you tried to upgrade to Minecraft 1.12.x without upgrading to ForgeGradle 2.3 earlier.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

For me, im just building forge to test some things :P

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

@kashike Nope - have had these projects working on 1.12 for a few weeks now, this is the first real issue

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

@CDAGaming Please stop the spamming and make sure you preview your posts before committing to make sure they look good. That wall of text is crap.
As for the rest of it, yes, Thats the thing about MCP mappings there IS NO GUARANTEE that they will work with Forge. There may be name conflicts. If you get those issues try a different mapping, or go to mcpbot and fix the mapping yourself.

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

@LexManos as noted, the project I have got working, right now, is in the process of getting those mappings changes integrated - nothing more than some name changes that are, in the end, logical if not, in the one case, entirely precise.

On the other hand... the issue I ran into with the setupDecompWorkspace failing with failed patches....

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Lex, thats why i remove my previous post, because i missed a step to regen dependencies ;)

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 25, 2017

Ah found the issue, fixed in FF, try again after cleaning/refreshing in like 15 mins.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Ok, will do.

Thanks Lex

@P3pp3rF1y

This comment has been minimized.

Copy link

commented Sep 25, 2017

Works correctly after the latest change. (I was getting the same issues that dshadowwolf reported above before the change)

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Build Works now, thanks Lex

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Hm, well it works on some snapshots but for the most recent ones, its giving off 8 errors

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Both in travis and in self build

@nallar nallar referenced this issue Sep 25, 2017

Closed

WIP: Don't shade the entire world #452

2 of 3 tasks complete
@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 25, 2017

Working now - had to clear the cache from an earlier try, but it is working now.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

Unfortunatly, that wasn't the case for me :(

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 25, 2017

3 Errors
error: method getTemperature in class Biome cannot be applied to given types;
error: method does not override or implement a method from a supertype
error: cannot find symbol

Reference to https://travis-ci.org/CDAGaming/MinecraftForge

@LexManos

This comment has been minimized.

Copy link
Member

commented Sep 26, 2017

That's on you for not properly updating the mappings.
You need to know what you're doing when dealing with Forge itself.

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 26, 2017

Well, an Update on this, is that i learned one thing: DO NOT skip past 3 months when updating mappings
right now i have it working on 0908 snapshots

@dshadowwolf

This comment has been minimized.

Copy link
Author

commented Sep 26, 2017

@CDAGaming try "cleancache"

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 26, 2017

Another Update: It is able to build up to September 16th mappings but gives errors past it.(Sadly unable to actually test in MC bc of SpecialSource bug/Forge not launching issue)

@darkhax

This comment has been minimized.

Copy link

commented Sep 26, 2017

@dshadowwolf I believe you can close this issue now?

@CDAGaming

This comment has been minimized.

Copy link

commented Sep 26, 2017

@darkhax Yup this can be closed, as the SpecialSource fix is now fully working for me too

@LexManos LexManos closed this Sep 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.