iconmaster5326 / AetherCraft

A fork of Graknol's Energy Manipulator mod. Turn matter into other kinds of matter today!
5 stars 3 forks source link

Client crash when mods is missing on server #13

Closed LemADEC closed 10 years ago

LemADEC commented 10 years ago

When mod isn't installed on your server, client will crash when pressing shift key to display tooltips.

---- Minecraft Crash Report ----
// Would you like a cupcake?

Time: 11/05/14 14:32
Description: Rendering screen

java.lang.NullPointerException
    at com.iconmaster.aec.aether.AVRegistry.getAV(AVRegistry.java:114)
    at com.iconmaster.aec.util.TooltipUtils.displayStandardTooltip(TooltipUtils.java:42)
    at com.iconmaster.aec.nei.TooltipHandler.handleItemTooltip(TooltipHandler.java:42)
    at codechicken.nei.forge.GuiContainerManager.itemDisplayNameMultiline(GuiContainerManager.java:171)
    at codechicken.nei.forge.GuiContainerManager.renderToolTips(GuiContainerManager.java:423)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:229)
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1036)
    at net.minecraft.src.EntityRendererProxy.func_78480_b(EntityRendererProxy.java:39)
    at weather.EntityRendererProxyWeatherMini.func_78480_b(EntityRendererProxyWeatherMini.java:54)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:946)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:838)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

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

-- Head --
Stacktrace:
    at com.iconmaster.aec.aether.AVRegistry.getAV(AVRegistry.java:114)
    at com.iconmaster.aec.util.TooltipUtils.displayStandardTooltip(TooltipUtils.java:42)
    at com.iconmaster.aec.nei.TooltipHandler.handleItemTooltip(TooltipHandler.java:42)
    at codechicken.nei.forge.GuiContainerManager.itemDisplayNameMultiline(GuiContainerManager.java:171)
    at codechicken.nei.forge.GuiContainerManager.renderToolTips(GuiContainerManager.java:423)
    at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:229)

-- Screen render details --
Details:
    Screen name: codechicken.nei.recipe.GuiCraftingRecipe
    Mouse location: Scaled: (429, 191). Absolute: (859, 521)
    Screen size: Scaled: (766, 452). Absolute: (1532, 904). Scale factor of 2
Stacktrace:
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1036)
    at net.minecraft.src.EntityRendererProxy.func_78480_b(EntityRendererProxy.java:39)

-- Affected level --
Details:
    Level name: MpServer
    All players: 1 total; [GCCorePlayerSP['LemADEC'/1826653, l='MpServer', x=-1081,20, y=79,24, z=-444,02]]
    Chunk stats: MultiplayerChunkCache: 441
    Level seed: 0
    Level generator: ID 04 - BIOMESOP, ver 0. Features enabled: false
    Level generator options: 
    Level spawn location: World: (203,105,384), Chunk: (at 11,6,0 in 12,24; contains blocks 192,0,384 to 207,255,399), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 155435233 game time, 251262725 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 9 total; [EntitySkeleton['Skeleton'/1826664, l='MpServer', x=-1067,50, y=23,00, z=-483,50], EntityZombie['Zombie'/1826657, l='MpServer', x=-1045,53, y=54,00, z=-436,97], EntityMinecartChest['entity.MinecartChest.name'/1826675, l='MpServer', x=-1078,50, y=19,50, z=-503,50], EntityPig['Pig'/1826674, l='MpServer', x=-1125,38, y=64,00, z=-462,78], EntityHat['unknown'/589, l='MpServer', x=-1081,20, y=79,24, z=-444,02], GCCorePlayerSP['LemADEC'/1826653, l='MpServer', x=-1081,20, y=79,24, z=-444,02], EntityHat['unknown'/592, l='MpServer', x=-1045,53, y=54,00, z=-436,97], EntityHat['unknown'/595, l='MpServer', x=-1067,50, y=23,00, z=-483,50], EntityHat['unknown'/1325, l='MpServer', x=-1125,38, y=64,00, z=-462,78]]
    Retry entities: 0 total; []
    Server brand: mcpc,craftbukkit,fml,forge
    Server type: Non-integrated multiplayer server
Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:440)
    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2312)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:856)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:27)

-- System Details --
Details:
    Minecraft Version: 1.6.4
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_55, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 696270648 bytes (664 MB) / 1538260992 bytes (1467 MB) up to 1908932608 bytes (1820 MB)
    Mod Pack: Unknown / None
    LiteLoader Mods: 1 loaded mod(s)
          - WorldEditCUI version 1.6.4
    JVM Flags: 3 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2048m -XX:MaxPermSize=256m
    AABB Pool Size: 19273 (1079288 bytes; 1 MB) allocated, 60 (3360 bytes; 0 MB) used
    Suspicious classes: FML and Forge are installed
    IntCache: cache: 0, tcache: 300, allocated: 4, tallocated: 58
    FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 217 mods loaded, 217 mods active
    mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    FML{6.4.49.965} [Forge Mod Loader] (modpack.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
    Forge{9.11.1.965} [Minecraft Forge] (modpack.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
...
    AetherCraft{1.3.3.0} [AetherCraft] (AetherCraft-1.3.3.94__fixed_.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available
...
iconmaster5326 commented 10 years ago

Do you mean when CCC or NEI is missing on the server?

Empty2k12 commented 10 years ago

Hey @iconmaster5326 Forge has a ItemToolTipEvent since some versions. It can be used to append to the tooltip list. Here's the Java-Doc http://alekso.openshell.no/forge/net/minecraftforge/event/entity/player/ItemTooltipEvent.html

LemADEC commented 10 years ago

I meant when AetherCraft isn't installed on the server.

iconmaster5326 commented 10 years ago

AetherCraftt needs to be installed on both client and server to function correctly. Therefore, this bug is not a priority one. I may take your advice @Empty2k12G, however.

LemADEC commented 10 years ago

It's quite frequent for players to have more mods on their client than the server has and that's working just fine for them. The few mods that are incompatible actually shows a proper 'mismatching id' or similar error at login. I don't quite understand how a client crash is acceptable for you, especially considering how it's easy to add a NOT NULL check in the tooltip callback.

skaviouz commented 10 years ago

Well there is a "workaround" for the time being I found for this bug. I've been using it for about a month : Make a superflat world (or any actually) in SSP. Open NEI and just shift and hover over a bunch of items. You only have to do this once per client restart.

Also a side note for a second bug/issue (related to sync issues). If you have different values set server side for AC's AV, it'll be the wrong values if you played SSP or a different server first and looked at AV values.

Empty2k12 commented 10 years ago

@skaviouz As said this issue can be resolved by using different code(the ItemToolTipEvent) at the side of @iconmaster5326. The whole nei depency could be optional with it.

iconmaster5326 commented 10 years ago

Fixed with commit bdcacaf201fdd12796cc620e4c2562fb8684ee77.