Vera-Firefly / Pojav-Glow-Worm

PojavLauncher with more practical functions,A modified Launcher from the PojavLauncher team
GNU General Public License v3.0
175 stars 22 forks source link

[BUG] JDK 21.0.4 is cropped #228

Closed xboct02 closed 3 months ago

xboct02 commented 4 months ago

Describe the bug

headless JDK 21.0.4 in the new release is a cropped bad version, which causes crashes.

The log file and images/videos

---- Crashed! ---- Date/Time: 2024/05/26 10:46:07.2966 Quilt Loader Version: 0.25.0

-- Crash --

org.quiltmc.loader.impl.FormattedException: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'faster-random'! at org.quiltmc.loader.impl.QuiltLoaderImpl.invokePreLaunch(QuiltLoaderImpl.java:1231) at org.quiltmc.loader.impl.launch.knot.Knot.init(Knot.java:175) at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:78) at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28) Caused by: java.lang.RuntimeException: Could not execute entrypoint stage 'preLaunch' due to errors, provided by 'faster-random'! at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke0$2(EntrypointUtils.java:66) at org.quiltmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:34) at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:64) at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invokeContainer(EntrypointUtils.java:49) at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke(EntrypointUtils.java:36) at org.quiltmc.loader.impl.QuiltLoaderImpl.invokePreLaunch(QuiltLoaderImpl.java:1229) ... 3 more Caused by: java.lang.ExceptionInInitializerError at com.github.anopensaucedev.fasterrandom.FasterRandomPrelaunch.onPreLaunch(FasterRandomPrelaunch.java:18) at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.lambda$invoke$0(EntrypointUtils.java:36) at org.quiltmc.loader.impl.entrypoint.EntrypointUtils.invoke0(EntrypointUtils.java:62) ... 6 more Caused by: java.lang.IllegalArgumentException: No implementation of the random number generator algorithm "L64X128MixRandom" is available at java.base/java.util.random.RandomGeneratorFactory.findProvider(RandomGeneratorFactory.java:229) at java.base/java.util.random.RandomGeneratorFactory.factoryOf(RandomGeneratorFactory.java:275) at java.base/java.util.random.RandomGeneratorFactory.of(RandomGeneratorFactory.java:360) at com.github.anopensaucedev.fasterrandom.FasterRandom.(FasterRandom.java:21) ... 9 more

Steps To Reproduce

Launching minecraft with JDK internal 21 21.0.4

Expected Behavior

Running the game without crashing.

Platform

- Device model:Xiaomi Redmi 10C
- CPU architecture:4x Qualcomm Kryo 265 LP @ 1900 МГц
4x ARM Cortex-A73 @ 2400 МГц
- Android version:13 (Tiramisu)
- PojavLauncher version:edelweiss-20240525-36bee5f-exp_v3

Anything else?

No response

Vera-Firefly commented 4 months ago

Confirm that your version of QuiltMC is compatible with the Minecraft version Recommend reloading your Quilt loader

AnOpenSauceDev commented 4 months ago

Creator of Faster Random here (i lurk for these bugs), Quilt is not the problem here. I'm not sure if your launcher auto-downloads JRE's, but using a "headless" JRE makes Minecraft crash with this mod. If you can, use a non-headless JRE which exposes Faster Random to the much faster new random systems that it requires access to.

xboct02 commented 4 months ago

I remember that headless flashed in the crash log, but it doesn't matter, it's just that faster random can't find a random number generator in this newest version.

AnOpenSauceDev commented 4 months ago

Headless tends to be the most common reason that a JDK doesn't work with Faster Random, but it could also just be due to a poor JDK.

Vera-Firefly commented 4 months ago

Okay, I think I know something. I'll work it out later

xboct02 commented 4 months ago

Victory

Vera-Firefly commented 3 months ago

Screenshot_2024-06-08-16-43-51-241_com huawei browser Now I want to know one thing, how did you come up with this question?

Vera-Firefly commented 3 months ago

Attribute -Djava.awt.headless=false has already been added here

AnOpenSauceDev commented 3 months ago

Whether java has the property of headless or not is not the problem. There is a variant of JDK that is usually called "headless" that causes this crash. Either that, or the JDK used is too old/doesn't support the feature.

Vera-Firefly commented 3 months ago

Whether java has the property of headless or not is not the problem. There is a variant of JDK that is usually called "headless" that causes this crash. Either that, or the JDK used is too old/doesn't support the feature.

The JRE I'm using here is always up to date, which is probably why

Vera-Firefly commented 3 months ago

You can wait a week before taking the test.

Vera-Firefly commented 3 months ago

Or fork my repository and build a general release of my own, like 21.0.3 https://github.com/Vera-Firefly/android-openjdk-build

AnOpenSauceDev commented 3 months ago

Using the latest JDK should be fine, in that case this feature might just not exist for android.

Vera-Firefly commented 3 months ago

Using the latest JDK should be fine, in that case this feature might just not exist for android.

I can't fix it if it doesn't exist in android

AnOpenSauceDev commented 3 months ago

Again, no clue if it is or isn't. It should be included, but recently that has become painfully obvious that it's mostly not for most JVM's.

xboct02 commented 3 months ago

Conclusion: the jvm is working, but not full-fledged, this leads to some incompatibility problems, but since everything runs in the emulator, android does not affect its stable operation. Most likely, some components have been changed for certain needs of the publisher.

xboct02 commented 3 months ago

The headless parameter does not affect this and the problem lies elsewhere, just someone cut out part of the code (optimized).

aaaapai commented 3 months ago

Now that the issue is resolved, an update will be pushed to jdk17, 21 soon. https://github.com/aaaapai/android-openjdk-build/actions/runs/9817708888