Jump to content

Any mod that uses methods in ModLoader.class crashes the server


knarf2011

Recommended Posts

I had a mod(http://www.planetminecraft.com/mod/burning-war-mod-forge/) that I made, and was crashing the server, but not the client. The crash report seemed to point to the cause being related to ModLoader.class, possibly missuse of it.

crash report:

 

---- Minecraft Crash Report ----

// My bad.

 

Time: 2/17/13 9:03 PM

Description: Exception in server tick loop

 

cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: ModLoader.addArmor(Ljava/lang/String;)I

at cpw.mods.fml.common.LoadController.transition(LoadController.java:130)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:677)

at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:94)

at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:356)

at ho.c(DedicatedServer.java:135)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)

at fy.run(SourceFile:849)

Caused by: java.lang.NoSuchMethodError: ModLoader.addArmor(Ljava/lang/String;)I

at BurningWarMod.common.mod_BurningWarMod.load(mod_BurningWarMod.java:159)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:487)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:153)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:86)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:676)

... 5 more

 

 

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

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.4.7

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_03, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 1000901784 bytes (954 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 2 total; -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v7.26a FML v4.7.32.553 Minecraft Forge 6.6.1.527 4 mods loaded, 4 mods active

mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized

FML [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized

Forge [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized

BurningWarMod [burning War Mod] (Burning War Mod 1.1.1.zip) Unloaded->Constructed->Pre-initialized->Errored

Profiler Position: N/A (disabled)

Is Modded: Definitely; Server brand changed to 'forge,fml'

Type: Dedicated Server (map_server.txt)

 

I tried re-wording the code in my main mod class file, but nothing seemed to work. So I tried the same thing with a popular mod that uses ModLoader.class (http://www.planetminecraft.com/mod/146gem-mod-new-armor-new-tools-new-food-new-blocks/), and got a similar crash report, this time when apparently using ModLoader.class to add acheivments.

crash report:

 

---- Minecraft Crash Report ----

// I let you down. Sorry :(

 

Time: 2/17/13 9:44 PM

Description: Exception in server tick loop

 

java.lang.NoSuchMethodError: jg.i()Ljava/lang/String;

at ModLoader.addAchievementDesc(ModLoader.java:97)

at files.mod_AchievementSoulBlock.<init>(mod_AchievementSoulBlock.java:15)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

at java.lang.Class.newInstance0(Class.java:372)

at java.lang.Class.newInstance(Class.java:325)

at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:501)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:153)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:86)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:86)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:351)

at ho.c(DedicatedServer.java:64)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:458)

at fy.run(SourceFile:849)

 

 

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

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.4.7

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_03, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 1004977936 bytes (958 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 2 total; -Xmx1024M -Xms1024M

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v7.26a FML v4.7.32.553 Minecraft Forge 6.6.1.527 66 mods loaded, 66 mods active

mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed

FML [Forge Mod Loader] (coremods) Unloaded->Constructed

Forge [Minecraft Forge] (coremods) Unloaded->Constructed

mod_AchievementSoulBlock [mod_AchievementSoulBlock] (GemMod15.zip) Unloaded

mod_AchievementSoulChunk [mod_AchievementSoulChunk] (GemMod15.zip) Unloaded

mod_AchievementSoulShard [mod_AchievementSoulShard] (GemMod15.zip) Unloaded

mod_Armor [mod_Armor] (GemMod15.zip) Unloaded

mod_Armor2 [mod_Armor2] (GemMod15.zip) Unloaded

mod_Armor3 [mod_Armor3] (GemMod15.zip) Unloaded

mod_Armor4 [mod_Armor4] (GemMod15.zip) Unloaded

mod_Armor5 [mod_Armor5] (GemMod15.zip) Unloaded

mod_Beast [mod_Beast] (GemMod15.zip) Unloaded

mod_Biome2 [mod_Biome2] (GemMod15.zip) Unloaded

mod_Biome3 [mod_Biome3] (GemMod15.zip) Unloaded

mod_Block2 [mod_Block2] (GemMod15.zip) Unloaded

mod_Block3 [mod_Block3] (GemMod15.zip) Unloaded

mod_Block4 [mod_Block4] (GemMod15.zip) Unloaded

mod_Block5 [mod_Block5] (GemMod15.zip) Unloaded

mod_Block6 [mod_Block6] (GemMod15.zip) Unloaded

mod_Block7 [mod_Block7] (GemMod15.zip) Unloaded

mod_Block8 [mod_Block8] (GemMod15.zip) Unloaded

mod_Block9 [mod_Block9] (GemMod15.zip) Unloaded

mod_Boss1 [mod_Boss1] (GemMod15.zip) Unloaded

mod_Food [mod_Food] (GemMod15.zip) Unloaded

mod_Food2 [mod_Food2] (GemMod15.zip) Unloaded

mod_Fuel [mod_Fuel] (GemMod15.zip) Unloaded

mod_Item10 [mod_Item10] (GemMod15.zip) Unloaded

mod_Item11 [mod_Item11] (GemMod15.zip) Unloaded

mod_Item12 [mod_Item12] (GemMod15.zip) Unloaded

mod_Item13 [mod_Item13] (GemMod15.zip) Unloaded

mod_Item14 [mod_Item14] (GemMod15.zip) Unloaded

mod_Item15 [mod_Item15] (GemMod15.zip) Unloaded

mod_Item16 [mod_Item16] (GemMod15.zip) Unloaded

mod_Item17 [mod_Item17] (GemMod15.zip) Unloaded

mod_Item18 [mod_Item18] (GemMod15.zip) Unloaded

mod_Item19 [mod_Item19] (GemMod15.zip) Unloaded

mod_Item2 [mod_Item2] (GemMod15.zip) Unloaded

mod_Item20 [mod_Item20] (GemMod15.zip) Unloaded

mod_Item3 [mod_Item3] (GemMod15.zip) Unloaded

mod_Item4 [mod_Item4] (GemMod15.zip) Unloaded

mod_Item5 [mod_Item5] (GemMod15.zip) Unloaded

mod_Item6 [mod_Item6] (GemMod15.zip) Unloaded

mod_Item7 [mod_Item7] (GemMod15.zip) Unloaded

mod_Item9 [mod_Item9] (GemMod15.zip) Unloaded

 

 

I used the most recent version of forge to write my mod, to test my mod before compiling, to run the server, and to run the client. The other mod did cause the client to crash, but did not output any file to tell me why.

Link to comment
Share on other sites

There are mods out there that are written for ModLoader specifically, these mods usually do not work when you put them on the server as ModLoader does not work on the server, and a modder has to take special care not to invoke any client specific code on the server.

Seems that the mods you've mentioned have not taken that care and are not dedi server compatible.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.