Andrew2070 / Empires-Mod

The Empires Mod is designed to provide fun and reliable protection to modded Minecraft servers.
GNU Lesser General Public License v2.1
3 stars 2 forks source link

[BUG] [CRASH] Sign Breaking #1

Closed Andrew2070 closed 6 years ago

Andrew2070 commented 7 years ago

Breaking any sign whether it is in or out of an empire crashes the game.

Andrew2070 commented 6 years ago

Something to do with ASM code.

Also keeping me from building a stable release.

Andrew2070 commented 6 years ago

MC Crash Report when i break a sign:

// There are four lights!

Time: 5/12/18 3:32 PM
Description: Ticking memory connection

java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NoSuchFieldException: Empires
    at EmpiresMod.Transformers.SignClassTransformer.getEmpiresDataValue(SignClassTransformer.java:102)
    at EmpiresMod.entities.Managers.SignManager.loadSign(SignManager.java:32)
    at EmpiresMod.entities.Managers.SignManager.onPlayerBreaksBlock(SignManager.java:63)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_17_SignManager_onPlayerBreaksBlock_BreakEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)
    at net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(ForgeHooks.java:469)
    at net.minecraft.server.management.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:285)
    at net.minecraft.server.management.ItemInWorldManager.onBlockClicked(ItemInWorldManager.java:168)
    at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:523)
    at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:61)
    at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:94)
    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)
Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: Empires
    at EmpiresMod.Transformers.SignClassTransformer.getEmpiresDataField(SignClassTransformer.java:81)
    at EmpiresMod.Transformers.SignClassTransformer.getEmpiresDataValue(SignClassTransformer.java:100)
    ... 18 more
Caused by: java.lang.NoSuchFieldException: Empires
    at java.lang.Class.getField(Class.java:1703)
    at EmpiresMod.Transformers.SignClassTransformer.getEmpiresDataField(SignClassTransformer.java:78)
    ... 19 more

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

-- Head --
Stacktrace:
    at EmpiresMod.Transformers.SignClassTransformer.getEmpiresDataValue(SignClassTransformer.java:102)
    at EmpiresMod.entities.Managers.SignManager.loadSign(SignManager.java:32)
    at EmpiresMod.entities.Managers.SignManager.onPlayerBreaksBlock(SignManager.java:63)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_17_SignManager_onPlayerBreaksBlock_BreakEvent.invoke(.dynamic)
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54)
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140)
    at net.minecraftforge.common.ForgeHooks.onBlockBreakEvent(ForgeHooks.java:469)
    at net.minecraft.server.management.ItemInWorldManager.tryHarvestBlock(ItemInWorldManager.java:285)
    at net.minecraft.server.management.ItemInWorldManager.onBlockClicked(ItemInWorldManager.java:168)
    at net.minecraft.network.NetHandlerPlayServer.processPlayerDigging(NetHandlerPlayServer.java:523)
    at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:61)
    at net.minecraft.network.play.client.C07PacketPlayerDigging.processPacket(C07PacketPlayerDigging.java:94)
    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
    Connection: net.minecraft.network.NetworkManager@256560f7
Stacktrace:
    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
    Minecraft Version: 1.7.10
    Operating System: Mac OS X (x86_64) version 10.11.3
    Java Version: 1.8.0_73, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 848649544 bytes (809 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
    JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
    AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
    FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 4 mods loaded, 4 mods active
    States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
    UCHIJAAAA   mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
    UCHIJAAAA   FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHIJAAAA   Forge{10.13.4.1614} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1614-1.7.10.jar) 
    UCHIJAAAA   EmpiresMod{1.0.0} [EmpiresMod] (bin) 
    GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
    Empires|Datasource: ~~ERROR~~ NullPointerException: null
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
    Player Count: 1 / 8; [EntityPlayerMP['Player767'/23, l='New World', x=600.67, y=56.00, z=-1549.14]]
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'fml,forge'

Build Error:


                        super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Transformers/AE2NetworkToolTransformer",
                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/AE2PlaceTransformer.java:61: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/AE2PartPlaceEvent", "fireEvent",
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFarmlandTransformer.java:71: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/BlockTrampleEvent", "fireEvent",
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:41: error: method does not override or implement a method from a supertype
                @Override
                ^
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:47: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                        super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ModifyBlockEvent",
                                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:52: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                        super.visitMethodInsn(opcode, owner, name, desc, itf);
                                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:57: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                        super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ModifyBlockEvent",
                                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:65: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                        super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ModifyBlockEvent",
                                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:70: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                        super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ModifyBlockEvent",
                                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockFireTransformer.java:76: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                        super.visitMethodInsn(opcode, owner, name, desc, itf);
                             ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/BlockTaintFibersTransformer.java:37: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ModifyBiomeEvent", "checkBiome",
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityFireballTransformer.java:50: error: method does not override or implement a method from a supertype
                @Override
                ^
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityFireballTransformer.java:55: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ProjectileImpactEvent", "fireEvent",
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityFireballTransformer.java:62: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(opcode, owner, name, desc, itf);
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityFireballTransformer.java:66: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(opcode, owner, name, desc, itf);
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityThrowableTransformer.java:50: error: method does not override or implement a method from a supertype
                @Override
                ^
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityThrowableTransformer.java:55: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Events/ProjectileImpactEvent", "fireEvent",
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityThrowableTransformer.java:62: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(opcode, owner, name, desc, itf);
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/EntityThrowableTransformer.java:66: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(opcode, owner, name, desc, itf);
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
/Users/Andrew/Desktop/Eclipse/WorkSpace/Minecraft/Mods/1.7.10/Empires-Mod May 7 2018/Empires-Mod/build/sources/java/EmpiresMod/Transformers/SignClassTransformer.java:213: error: method visitMethodInsn in class MethodVisitor cannot be applied to given types;
                                super.visitMethodInsn(Opcodes.INVOKESTATIC, "EmpiresMod/Transformers/SignClassTransformer", localMethodName,
                                     ^
  required: int,String,String,String
  found: int,String,String,String,boolean
  reason: actual and formal argument lists differ in length
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
20 errors
:compileJava FAILED
:compileJava (Thread[main,5,main]) completed. Took 1 mins 4.278 secs.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 2 mins 1.774 secs
Stopped 0 compiler daemon(s).```
Andrew2070 commented 6 years ago

Fixed.