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

[1.18.1~ Latest] Forge is not compatible with Openj9 17 #81

Closed
zkitefly opened this issue Aug 4, 2023 · 12 comments
Closed

[1.18.1~ Latest] Forge is not compatible with Openj9 17 #81

zkitefly opened this issue Aug 4, 2023 · 12 comments
Labels
1.20 Targeted at Minecraft 1.20 bug A bug or error loading Related to loading the game

Comments

@zkitefly
Copy link

zkitefly commented Aug 4, 2023

Minecraft Version: 1.18.1~Latest

Forge Version: 39.1.1~Latest :(

Steps to reproduce:

Start from openj9 17 because 1.18 onwards is java17 start
Crash
Problem description: You are trying to run with an unsupported Java Virtual Machine: Eclipse OpenJ9 VM.
Please visit https://adoptopenjdk.net and install the HotSpot variant.
OpenJ9 is not compatible with several of the conversion behaviors we rely on to run.

I don't know if OpenJ9 is supported by NeoForge, but it's very likely that it's not.

Here's some player feedback that was previously dismissed MinecraftForge/MinecraftForge#9408

Solutions for other loaders: e.g. fabric FabricMC/fabric#1019

CaffeineMC/lithium#111

Finally, I don't want NeoForge to make the same mistake, please support openj9, thanks to all the developers!

@zkitefly
Copy link
Author

zkitefly commented Aug 4, 2023

If this resolves please re-migrate back to the affected version

@TheCurle
Copy link
Member

TheCurle commented Aug 4, 2023

I can not speak for the current state of OJ9, but historically, it has not been fully compliant with the JVM spec for classloading behaviour - which means it's a non-standard, arbitrary and moving target, with no hard-and-fast specification for us to be able to know how it behaves and whether it's consistently reliable in the real world.

It was far more effort to be compatible with than our team is ever going to be capable of, and the only way we can ever be compatible with OpenJ9 is if OpenJ9 becomes fully compatible with the JVM classloading spec, which will require a lot of investigation and verification to be sure of, something we also lack the manpower for right now, given the history of OpenJ9 not really caring about breaking spec unless it really affects a major use case.

Basically, "don't make the same mistake, add support for OpenJ9" is incredibly disingenuous. It should be "don't use a JVM that doesn't follow the specifications for JVM behaviour that most systems rely on".

@TheCurle
Copy link
Member

TheCurle commented Aug 4, 2023

To clarify: If it's compatible now, we'll remove the crash check.

That's a big if.

@zkitefly
Copy link
Author

Why attempts to use openj9 in 1.18.1 in 39.1.0 are expected, but fail in higher versions such as 39.1.1, seems very suspicious to me

Similarly, some earlier versions such as 1.7.10 1.12.2 openj9 also work fine.

I don't know if this https://github.com/eclipse-openj9/openj9openj9 repository will help at all with the current problem, but obviously I'm not a developer.

At the end of the day, thank you to anyone who contributed in any way to this project.


为什么在1.18.1的39.1.0中 尝试使用openj9 是在预料之中 而在更高的版本 如 39.1.1 就便是失败了 我觉得这非常可疑

同样的 在一些 早期的版本中如1.7.10 1.12.2 openj9也是正常运行起来

我虽然不知道 这个 https://github.com/eclipse-openj9/openj9openj9 的仓库 会不会对当前的问题 有一点帮助 但显然 我不是一个开发者

在最后 谢谢为这个项目做出任何贡献的人

@sciwhiz12 sciwhiz12 added bug A bug or error 1.20 Targeted at Minecraft 1.20 loading Related to loading the game labels Oct 9, 2023
@lukebemish
Copy link
Contributor

lukebemish commented Oct 24, 2023

This should in theory be resolved by McModLauncher/modlauncher#114. Having tested in production (after some manual version JSON changes to bump to a modlauncher after that change) with 1.20.1 neoforge, the game launches and runs fine with OpenJ9, though I have not extensively tested for any weird edge cases that might come up.

@3TUSK
Copy link

3TUSK commented Nov 3, 2023

Why attempts to use openj9 in 1.18.1 in 39.1.0 are expected, but fail in higher versions such as 39.1.1, seems very suspicious to me

Because some newer OpenJ9 distribution does not have OpenJ9 in java.vendor system property, breaking the old way of OpenJ9 detection, coincidentally proving that modlauncher has already been working fine with OpenJ9 VM.

See McModLauncher/modlauncher#67, McModLauncher/modlauncher#96 for more reference.

Also worth mentioning MinecraftForge/typetools#3.

@TheCurle
Copy link
Member

The OpenJ9 check has been removed and seems to work fine, closing.

@Matyrobbrt
Copy link
Member

This was not actually fixed as ModLauncher wasn't bumped to 10.1 on either branch (latest 10.1 now containing breaking changes)

@Matyrobbrt Matyrobbrt reopened this Feb 7, 2024
@shanoaice
Copy link

Maybe a backport to 10.0 is possible? Looks like the commit on ModLauncher only change a few lines of code.

@shanoaice
Copy link

Is this still being worked on? 1.20.4 still doesn't seem to support OpenJ9.

@lukebemish
Copy link
Contributor

I believe it was just waiting on modlauncher to be bumped, which is a breaking change, so I theory it should work in 1.20.5 if that got bumped?

@Matyrobbrt
Copy link
Member

ModLauncher was bumped in 1.20.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20 Targeted at Minecraft 1.20 bug A bug or error loading Related to loading the game
Projects
None yet
Development

No branches or pull requests

7 participants