Dynamic Surroundings

Dynamic Surroundings

51M Downloads

Crash due to this mod's outdated Java version.

MagmaBro123 opened this issue ยท 28 comments

commented

Mod Version:
DynamicSurroundings-1.16.4-4.0.3.6

Forge Version:
image

Link to client log:
latest.log

Link to crash log:
crash-2021-01-28_10.22.46-client.txt

image

Description:
The game crashes due to some sort of Java version thing. I'm not sure if it's MY Java version or the Java version that Dynamic Surroundings being out-of-date. If it is on Dynamic Surroundings' end, then please update your Java version.

commented

Was just about to report this issue! Thanks!

Though I will still include my client log and crash report here in case it helps the developer:

Client log: https://pastebin.com/jQgU0W33

Crash Report: https://pastebin.com/kCuWeBdW

commented

This is what I am using: https://adoptopenjdk.net/. I picked OpenJDK 15 and OpenJ9 for the JVM.

EDIT: I am not sure how to do this with the Vanilla launcher, but other launchers you may need to specify which JVM to use. This is important if you play packs earlier than 1.16.5 which would require Java 8.

Okay i come here to see why the game crashed. Can i ask why the change to newer java? This is going to mess with everyone who has downloaded the latest version. I donwloaded the build you were using and it still crashes. This seems like a huge mess without any reason behind it, but i think you have a reason.

commented

I desided to change the java to the newer one on multimc, and now others mods dont load on startup.

commented

What java version are you using? This is outside of DS.

commented

@NJL5390 Yeah - you need to be using a later version of Java. The log shows Java 8.

commented

@MagmaBro123 Same for you - you are using Java 8. Need a later version of Java.

commented

And to be clear. Forge 36.x provides a JavaScript engine since Java versions after 8 do not include it. This engine has been compiled with a newer Java version and that is why it will not load. If you want to continue using Java 8 you will need to use DS 4.0.4.5.

commented

Ok, I suspected as much. But where would I download this newer Java from? The main Java website only shows me downloads for Java 8.

commented

This is what I am using: https://adoptopenjdk.net/. I picked OpenJDK 15 and OpenJ9 for the JVM.

EDIT: I am not sure how to do this with the Vanilla launcher, but other launchers you may need to specify which JVM to use. This is important if you play packs earlier than 1.16.5 which would require Java 8.

commented

No rush - get rest. :) I think the combo you were using was Java 8 w/Forge 36.x. Its the combo I am interested in - it's the one that caused you to come to the issue list.

So, I'm testing as to whether the file you posted on here (4.0.3.7) fixed this issue that we were having with our game setups before we reported this issue?

Because if that's what you're testing for I can safely say that it didn't fix it.

commented

The change I made was to use the builtin JavaScript loader rather than constructing the Nashorn JS engine directly thus avoiding the package issue that I was having with newer Java (post 8) versions.

Nashorn was removed from Java versions post Java 8, so Forge had to supply a version so that coremods would work. (Coremods now a days are written in JavaScript.) This particular change shows up in Forge 36.x. It seems that the Nashorn engine that Forge provides is built with a Java version newer than Java 8.

Note that DS 4.0.3.6 will run w/Java 8 or later (I do run Java 8 w/DW20). It appears that the key to all of this is which Forge version you are using.

commented

The change I made was to use the builtin JavaScript loader rather than constructing the Nashorn JS engine directly thus avoiding the package issue that I was having with newer Java (post 8) versions.

Nashorn was removed from Java versions post Java 8, so Forge had to supply a version so that coremods would work. (Coremods now a days are written in JavaScript.) This particular change shows up in Forge 36.x. It seems that the Nashorn engine that Forge provides is built with a Java version newer than Java 8.

Note that DS 4.0.3.6 will run w/Java 8 or later (I do run Java 8 w/DW20). It appears that the key to all of this is which Forge version you are using.

I ran forge 36.0.1, but upgradet to forge 36.0.9. I also downgradet the mod to 4.0.3.5. I can test tomorrow if the issues with other mods persist with java 15.

commented

If you could try this version of the Jar: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.4-4.0.3.7. I changed how I ask for the script engine. Before I was asking for "nashorn". With this change I ask for a script engine with the extension of "js".

commented

If you could try this version of the Jar: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.4-4.0.3.7. I changed how I ask for the script engine. Before I was asking for "nashorn". With this change I ask for a script engine with the extension of "js".

Right now im not at computer since im heading to bed soon. But if this is something you wold prefer to be ungeant then i can hop on to the lapptop and see whats up.

Do i test this with java 8s javaw.exe or java 15s javaw.exe selected as a java version?

commented

No rush - get rest. :) I think the combo you were using was Java 8 w/Forge 36.x. Its the combo I am interested in - it's the one that caused you to come to the issue list.

commented

No rush - get rest. :) I think the combo you were using was Java 8 w/Forge 36.x. Its the combo I am interested in - it's the one that caused you to come to the issue list.

Ah okay. Ill try the version you mentoned above with the combo i came here with. I do need the java 15 you linked in the thread correct?

commented

No rush - get rest. :) I think the combo you were using was Java 8 w/Forge 36.x. Its the combo I am interested in - it's the one that caused you to come to the issue list.

Ah okay. Ill try the version you mentoned above with the combo i came here with. I do need the java 15 you linked in the thread correct?

Or with out it like orginaly when i came to this threat?

I meant to add this to the prewies post but i missclicked the edit button XD

commented

So what do I do.

commented

OK - try this version here. I did some nasty things and it appears to work in my environment: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.5-4.0.3.7

commented

Can confirm. It works without crashing now, and without using or downloading the newest java. But how about in the future, are we still reguired to download Java 15?

commented

OK - try this version here. I did some nasty things and it appears to work in my environment: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.5-4.0.3.7

Can confirm that this works for me as well.

Can confirm. It works without crashing now, and without using or downloading the newest java. But how about in the future, are we still reguired to download Java 15?

I am also curious about this. Do you think many other mods are going to attempt to do a similar thing in the future and thus require us to have a later version of Java? Because I was able to get the other Java working it just caused startup issues with 2 other mods I was using so I'd rather just use Java 8 for the time being.

commented

OK - try this version here. I did some nasty things and it appears to work in my environment: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.5-4.0.3.7

Can confirm that this works for me as well.

Can confirm. It works without crashing now, and without using or downloading the newest java. But how about in the future, are we still reguired to download Java 15?

I am also curious about this. Do you think many other mods are going to attempt to do a similar thing in the future and thus require us to have a later version of Java? Because I was able to get the other Java working it just caused startup issues with 2 other mods I was using so I'd rather just use Java 8 for the time being.

Yeah i had problems with 2 mods aswell on startup. I assume that mods are going to go to new java eventualy, but i think very few are dying it now. Also, for the author, the link says 1.16.5 but the jar file is 1.16.4. Just thought id mention if its not intented.

commented

The problem appears to be a packaging issue with Forge (https://forums.minecraftforge.net/topic/97014-1165-nashorn-script-engine-issue/). Not many mods will use JavaScript directly so this problem will not be common.

MC 1.16.5 is wire compatible with 1.16.4. There were no new features added in 1.16.5 - it is a bug fix release. A 1.16.4 client should be able to talk with a 1.16.5 server and vice versa. Things broke with Forge 36.x because it no only was changed to be compatible with 1.16.5 it introduced a package change to be able to run with Java 15. That is the change that is breaking DS.

Where DS is concerned once I publish this update you will be able to use MC 1.16.5, Forge 36.x, and DS using Java 8. Eventually Forge will make a 36.x release that addresses the packaging issue.

As for the naming of the JAR it will be named 1.16.4 since it will run on 1.16.4 and 1.16.5. DS will not be named 1.16.5 unless there is a Forge change that requires me to take a dependency on Forge 36 which would then only make DS compatible with 1.16.5. At the moment I do not see this happening.

commented

The problem appears to be a packaging issue with Forge (https://forums.minecraftforge.net/topic/97014-1165-nashorn-script-engine-issue/). Not many mods will use JavaScript directly so this problem will not be common.

MC 1.16.5 is wire compatible with 1.16.4. There were no new features added in 1.16.5 - it is a bug fix release. A 1.16.4 client should be able to talk with a 1.16.5 server and vice versa. Things broke with Forge 36.x because it no only was changed to be compatible with 1.16.5 it introduced a package change to be able to run with Java 15. That is the change that is breaking DS.

Where DS is concerned once I publish this update you will be able to use MC 1.16.5, Forge 36.x, and DS using Java 8. Eventually Forge will make a 36.x release that addresses the packaging issue.

As for the naming of the JAR it will be named 1.16.4 since it will run on 1.16.4 and 1.16.5. DS will not be named 1.16.5 unless there is a Forge change that requires me to take a dependency on Forge 36 which would then only make DS compatible with 1.16.5. At the moment I do not see this happening.

Thank you for the glarification! I assume once forge fixes these issues the mod will go to java 15 and work without problems? Or did i get this wrong?

commented

I just pushed the update to CurseForge. With this update you will be able to use DS w/Forge 36 on either Java 8 or Java 15 without waiting for Forge to fix packaging.

commented

OK - try this version here. I did some nasty things and it appears to work in my environment: https://github.com/OreCruncher/DynamicSurroundings2/releases/tag/1.16.5-4.0.3.7

Great .. it's work for me .. thx

commented

No worries. Actually it was a good thing because it revealed an issue in the Forge distribution.

commented

@OreCruncher Sorry about the confusion. I'm not too good with the backbones of mods so uh, ty for fixing this.