-
-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
bugsomething isn't workingsomething isn't working
Description
a simple mod consisting of two classes (shown below) won't be able to load new classes if the current thread is interrupted. this does NOT happen on fabric. an interrupted thread should not do anything by design, but additional class-loading may still occur in rare cases. tested on quilt loader 0.25.0, 0.26.0-beta.1 (where the bug exists) and fabric 0.15.11 (where the bug does not exist). a -Dloader.workaround.jar_copy_all_mods=true
JVM flag makes everything work once again.
Main class:
package test.test;
import net.fabricmc.api.ModInitializer;
public class TestMod implements ModInitializer {
@Override
public void onInitialize() {
new Thread(() -> {
try {
System.out.println("Interrupting...");
Thread.currentThread().interrupt();
System.out.println("Loading...");
ExampleClass object = new ExampleClass();
System.out.println("Success.");
} catch (Throwable t) {
t.printStackTrace();
System.exit(-1);
}
}).start();
}
}
Additional stub class:
package test.test;
public class ExampleClass {
// Stub
}
(P.S. Yes, this issue was edited, because I've deleted my old repository with the code)
Metadata
Metadata
Assignees
Labels
bugsomething isn't workingsomething isn't working