Mixin icon indicating copy to clipboard operation
Mixin copied to clipboard

Mixins with DCEVM hang on hotswap.

Open codecnotsupported opened this issue 3 years ago • 8 comments

The fabric wiki Mentions that "When run on JetBrains Runtime's Java 17 fork (with DCEVM), Mixin hotswapping and DCEVM work properly."

There are two ways to use DCEVM with java 17.

  • A: (Able to launch with quilt): Follow the tutorial below and use the hotswap-agent.jar with the latest JetBrainsRuntime

  • B: (Able to launch fabric & quilt): Use a outdated version of JetBrains Runtime's Java (jbrsdk_dcevm-17_0_1) which I presume bundles the hotswap-agent.

Setup: java VM arguments:

-XX:HotswapAgent=fatjar ( Only applicable for option A )
-XX:+AllowEnhancedClassRedefinition  
-javaagent:"path_to/sponge-mixin-0.11.2+mixin.0.8.5.jar"

When hotswapping it prints: [JDWP Transport Listener: dt_socket/INFO]: Redefining mixin com/example/example_mod/mixin/ArrowEntityMixin Then the loading bar in InteliJ Idea just hangs.

Other observations:

Hotswap agent has suppport for plugins But I don't think Mixin takes advantage of that?

codecnotsupported avatar Jul 24 '22 23:07 codecnotsupported

It seems merely using JetBrainsRuntime JDK with -XX:+AllowEnhancedClassRedefinition is enough to make the hotswap task hang, meaning HotswapAgent is probably not the cause.

codecnotsupported avatar Jul 25 '22 00:07 codecnotsupported

This definitely used to work on java 8 dcevm on 1.12.2. On newer versions on modlauncher the only time o tried, it didn't yet work (classloading issue on hotswap attempt).

Niko-sk2x avatar Jul 26 '22 17:07 Niko-sk2x

With or without hotspot agent loaded on jbr_17 -XX:+AllowEnhancedClassRedefinition -javaagent:"sponge-mixin-0.12.5+mixin.0.8.5.jar" hangs for me

MDevVal avatar Aug 21 '23 16:08 MDevVal

Has anyone found a fix for this?

norpie avatar Oct 05 '23 11:10 norpie

Has anyone found a fix for this?

It seems like downgrading JBR works: https://github.com/JetBrains/JetBrainsRuntime/releases/tag/jbr17_0_1b164.8

Floweynt avatar Apr 14 '24 01:04 Floweynt