SuperMartijn642 / SimpleMagnets

3 stars 12 forks source link

[Crash] Exception in server tick loop #55

Closed MrLuxALot closed 6 months ago

MrLuxALot commented 7 months ago

Version Info

Steps to Reproduce Run a server with Simple Magnets and all dependencies needed for Simple Magnets

Crash report (~/logs/latest.log) ---- Minecraft Crash Report ----

WARNING: coremods are present: SuperMartijn642's Core Lib Plugin (_supermartijn642corelib-1.1.17-forge-mc1.12.jar) Contact their authors BEFORE contacting forge

// Don't be sad, have a hug! <3

Time: 3/24/24 4:00 PM Description: Exception in server tick loop

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Simple Magnets (simplemagnets) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/settings/KeyBinding at com.supermartijn642.simplemagnets.SimpleMagnetsClient.registerKeyBindings(SimpleMagnetsClient.java:37) at com.supermartijn642.simplemagnets.SimpleMagnets.init(SimpleMagnets.java:95) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:637) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91) at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150) at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76) at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399) at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71) at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116) at com.google.common.eventbus.EventBus.post(EventBus.java:217) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136) at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:749) at net.minecraftforge.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:108) at net.minecraftforge.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:338) at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:219) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.ClassNotFoundException: net.minecraft.client.settings.KeyBinding at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 38 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4564e94b from coremod FMLCorePlugin at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260) at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279) at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176) ... 40 more Caused by: java.lang.RuntimeException: Attempted to load class bhy for invalid side SERVER at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62) at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256) ... 42 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Linux (amd64) version 5.15.146.1-microsoft-standard-WSL2 Java Version: 1.8.0_312, Temurin Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin Memory: 3317956192 bytes (3164 MB) / 4116185088 bytes (3925 MB) up to 7635730432 bytes (7282 MB) JVM Flags: 2 total; -Xmx8G -Xms4G IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2859 7 mods loaded, 7 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

| State | ID                       | Version      | Source                                          | Signature                                |
|:----- |:------------------------ |:------------ |:----------------------------------------------- |:---------------------------------------- |
| LCHI  | minecraft                | 1.12.2       | minecraft.jar                                   | None                                     |
| LCHI  | mcp                      | 9.42         | minecraft.jar                                   | None                                     |
| LCHI  | FML                      | 8.0.99.99    | forge-1.12.2-14.23.5.2859.jar                   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| LCHI  | forge                    | 14.23.5.2859 | forge-1.12.2-14.23.5.2859.jar                   | e3c3d50c7c986df74c645c0ac54639741c90a557 |
| LCHI  | supermartijn642corelib   | 1.1.17       | _supermartijn642corelib-1.1.17-forge-mc1.12.jar | None                                     |
| LCHI  | supermartijn642configlib | 1.1.6        | supermartijn642configlib-1.1.8-forge-mc1.12.jar | None                                     |
| LCHE  | simplemagnets            | 1.1.10       | simplemagnets-1.1.10-forge-mc1.12.jar           | None                                     |

Loaded coremods (and transformers): 

SuperMartijn642's Core Lib Plugin (_supermartijn642corelib-1.1.17-forge-mc1.12.jar)

Profiler Position: N/A (disabled)
Is Modded: Definitely; Server brand changed to 'fml,forge'
Type: Dedicated Server (map_server.txt)
nat212 commented 6 months ago

Getting this as well. Seems it's trying to call client only code on the server

SuperMartijn642 commented 6 months ago

Yup this issue was filed after a discussion on Discord. The problem is a missing client-side check here: https://github.com/SuperMartijn642/SimpleMagnets/blob/aabc8bc331b361c9c27577a4acf2aa052b91144c/src/main/java/com/supermartijn642/simplemagnets/SimpleMagnets.java#L95 I am currently rather busy with school, so I don't really have time to update the mod for it.

SuperMartijn642 commented 6 months ago

I have fixed it now in version 1.1.11 of Simple Magnets for Forge 1.12. Thank you for reporting the issue!