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

Mod outright fails to run in varying ways outside of development enviroment #18

Open
cocona20xx opened this issue Apr 6, 2023 · 14 comments

Comments

@cocona20xx
Copy link

Tested on the 0.2.x branch in Prism Launcher. Depending on the loader version, the game crashes at launch in different ways:
On loader 0.17.0 (the version yqh is currently built against):

Exception caught from launcher
java.lang.RuntimeException: Could not find game constructor in net.minecraft.client.main.Main!
	at org.quiltmc.loader.impl.game.minecraft.patch.EntrypointPatch.process(EntrypointPatch.java:146)
	at org.quiltmc.loader.impl.entrypoint.GameTransformer.locateEntrypoints(GameTransformer.java:90)
	at org.quiltmc.loader.impl.game.minecraft.MinecraftGameProvider.initialize(MinecraftGameProvider.java:311)
	at org.quiltmc.loader.impl.launch.knot.Knot.init(Knot.java:135)
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:70)
	at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:24)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Exiting with ERROR

Starting on 0.17.1, this happens:

Agent Attached
Exception caught from launcher
java.lang.ExceptionInInitializerError
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:467)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.setupLanguageAdapters(QuiltLoaderImpl.java:480)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.finishModLoading(QuiltLoaderImpl.java:355)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.freeze(QuiltLoaderImpl.java:124)
	at org.quiltmc.loader.impl.launch.knot.Knot.init(Knot.java:142)
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:70)
	at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:24)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: java.lang.ClassNotFoundException: org.quiltmc.loader.impl.launch.knot.UnsafeKnotClassLoader
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
	at net.cursedmc.yqh.YummyQuiltHacks.<clinit>(YummyQuiltHacks.java:70)
	... 11 more
Exiting with ERROR

The above occurs on all 0.17.x loader versions, seemingly.

Meanwhile, this happens on 0.18.8 (most recent stable loader version) and all other 0.18.x loader versions:

Error opening zip file or JAR manifest missing: /yummy_agent.jar
Exception caught from launcher
java.lang.ExceptionInInitializerError
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:467)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.setupLanguageAdapters(QuiltLoaderImpl.java:1027)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.finishModLoading(QuiltLoaderImpl.java:924)
	at org.quiltmc.loader.impl.QuiltLoaderImpl.freeze(QuiltLoaderImpl.java:170)
	at org.quiltmc.loader.impl.launch.knot.Knot.init(Knot.java:148)
	at org.quiltmc.loader.impl.launch.knot.Knot.launch(Knot.java:76)
	at org.quiltmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:28)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
Caused by: java.lang.IllegalStateException: Could not self-attach to current VM using external process
	at net.bytebuddy.agent.ByteBuddyAgent.installExternal(ByteBuddyAgent.java:701)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:631)
	at net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:298)
	at net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:263)
	at net.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:245)
	at net.cursedmc.yqh.YummyQuiltHacks.<clinit>(YummyQuiltHacks.java:67)
	... 11 more
Exiting with ERROR

TL;DR doing crimes via self-attaching to the VM might not be doable anymore and probably didn't work in production to begin with??

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

What JVM do you use?

@cocona20xx
Copy link
Author

Java 17

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

What type of JVM? Send your logs please

@cocona20xx
Copy link
Author

Zulu JDK ARM64, one sec—will send the log from the 0.18.x loader crash

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

TL;DR doing crimes via self-attaching to the VM might not be doable anymore and probably didn't work in production to begin with??

It's necessary to attach to the VM in order to attach an instrumentation agent. Unfortunately, not all JVMs support this, and some will outright complain about illegal access (for "security reasons"). What we could do is put a warning in the console stating that limited YQH support is provided, and that any errors regarding instrumentation are due to an unsupported JVM.

@cocona20xx
Copy link
Author

https://paste.ee/p/PrIIn

@cocona20xx
Copy link
Author

(yes, this is all it gives us; the latest.log has even less detail)

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

I need the ones on 0.17.0 and 0.17.1 specifically. The 0.18.x loader issue is being fixed in #17.

@cocona20xx
Copy link
Author

Is Adoptium known to not throw a fit due to illegal access? Could dl that to check if it works with that JDK

@cocona20xx
Copy link
Author

I need the ones on 0.17.0 and 0.17.1 specifically. The 0.18.x loader issue is being fixed in #17.

ah, one second then

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

Yes, we* generally use Adoptium or Temurin. I'd just like to know if this can be mitigated somehow. Oracle OpenJDK is guaranteed to work (hence why this shouldn't be a problem for most users).

@cocona20xx
Copy link
Author

https://paste.ee/p/sq8H5 and https://paste.ee/p/3jlN3 are the 0.17.0 and 0.17.1 logs respectively

@cocona20xx
Copy link
Author

Still happens under Temurin in exactly the same way, fyi

@sylv256
Copy link
Member

sylv256 commented Apr 6, 2023

I'll have to look into this either tomorrow or in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants