BlockCarpentry

BlockCarpentry

7M Downloads

Random client crashes when breaking Frame Blocks

Tomson124 opened this issue ยท 5 comments

commented

Sometimes the client crashes when breaking a frame block or slab. Did happen with bare ones and ones with a block applied. Weird thing is it doesn't happen all the time but more at random. (At least did not find any "repeatable" cause yet).
Happens to me and everyone else on the server who did use Frame blocks or slabs.
I am using the latest version. We are playing a little modified version of Valhelsia 3.

Crashlog
// I bet Cylons wouldn't have this problem.

Time: 6/3/21 9:16 PM
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
  at mod.pianomanu.blockcarpentry.util.BlockColorHandler.getColor(BlockColorHandler.java:91) ~[?:1.16-0.3.6] {re:classloading}
  at net.minecraft.client.renderer.color.BlockColors.func_228054_a_(BlockColors.java:92) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.DiggingParticle.func_187154_b(DiggingParticle.java:60) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.DiggingParticle.func_174846_a(DiggingParticle.java:44) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.ParticleManager.func_180532_a(ParticleManager.java:443) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:render_particles,pl:mixin:APP:mixins.dsurround.json:MixinParticleManager,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.ParticleManagerAccess,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.ParticleManager.addBlockHitEffects(ParticleManager.java:454) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:render_particles,pl:mixin:APP:mixins.dsurround.json:MixinParticleManager,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.ParticleManagerAccess,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_147115_a(Minecraft.java:1280) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:1657) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1460) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:953) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}
  at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}
  at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.1.23.jar:36.1] {}
  at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$484/404787971.call(Unknown Source) [forge-1.16.5-36.1.23.jar:36.1] {}
  at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}
  at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading}


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

-- Head --
Thread: Render thread
Stacktrace:
  at mod.pianomanu.blockcarpentry.util.BlockColorHandler.getColor(BlockColorHandler.java:91) ~[?:1.16-0.3.6] {re:classloading}
  at net.minecraft.client.renderer.color.BlockColors.func_228054_a_(BlockColors.java:92) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.DiggingParticle.func_187154_b(DiggingParticle.java:60) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.DiggingParticle.func_174846_a(DiggingParticle.java:44) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.ParticleManager.func_180532_a(ParticleManager.java:443) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:render_particles,pl:mixin:APP:mixins.dsurround.json:MixinParticleManager,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.ParticleManagerAccess,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.particle.ParticleManager.addBlockHitEffects(ParticleManager.java:454) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:render_particles,pl:mixin:APP:mixins.dsurround.json:MixinParticleManager,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.ParticleManagerAccess,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_147115_a(Minecraft.java:1280) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_184117_aA(Minecraft.java:1657) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
-- Affected level --
Details:
  All players: 2 total; [ClientPlayerEntity['Kopaka211'/1184806, l='ClientLevel', x=240.02, y=52.00, z=-123.81], RemoteClientPlayerEntity['Tomson124'/1212346, l='ClientLevel', x=181.05, y=65.92, z=-82.36]]
  Chunk stats: Client Chunk Cache: 961, 687
  Level dimension: minecraft:overworld
  Level spawn location: World: (176,92,-16), Chunk: (at 0,5,0 in 11,-1; contains blocks 176,0,-16 to 191,255,-1), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
  Level time: 17610261 game time, 20650281 day time
  Server brand: forge
  Server type: Non-integrated multiplayer server
Stacktrace:
  at net.minecraft.client.world.ClientWorld.func_72914_a(ClientWorld.java:447) ~[?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,xf:fml:astralsorcery:sun_brightness_client,xf:fml:xaerominimap:xaero_clientworldclass,xf:fml:xaeroworldmap:xaero_wm_clientworldclass,pl:mixin:APP:mixins.sndctrl.json:MixinClientWorld,pl:mixin:APP:betterbiomeblend.mixins.json:MixinClientWorld,pl:mixin:APP:architectury.mixins.json:MixinClientLevel,pl:mixin:APP:abnormals_core.mixins.json:client.ClientWorldMixin,pl:mixin:APP:endergetic.mixins.json:ClientWorldMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2029) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:628) [?:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:randompatches.mixins.json:client.MinecraftMixin,pl:mixin:APP:mining_helmet.mixins.json:MinecraftMixin,pl:mixin:APP:kubejs-common.mixins.json:MinecraftMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:valhelsia_tweaks.mixins.json:DisplayMemoryWarningScreenMixin,pl:mixin:APP:valhelsia_tweaks.mixins.json:RemoveExperimentalSettingsWarningMixin,pl:mixin:APP:assets/botania/botania.mixins.json:AccessorMinecraft,pl:mixin:APP:create.mixins.json:ShaderCloseMixin,pl:mixin:A,pl:runtimedistcleaner:A}
  at net.minecraft.client.main.Main.main(Main.java:184) [?:?] {re:classloading,pl:runtimedistcleaner:A}
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] {}
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] {}
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] {}
  at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] {}
  at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.1.23.jar:36.1] {}
  at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$484/404787971.call(Unknown Source) [forge-1.16.5-36.1.23.jar:36.1] {}
  at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.9.jar:?] {}
  at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.9.jar:?] {re:classloading}
  at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.9.jar:?] {re:classloading}


-- System Details --
Details:
  Minecraft Version: 1.16.5
  Minecraft Version ID: 1.16.5
  Operating System: Windows 10 (amd64) version 10.0
  Java Version: 1.8.0_51, Oracle Corporation
  Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
  Memory: 1129614392 bytes (1077 MB) / 5888278528 bytes (5615 MB) up to 7397179392 bytes (7054 MB)
  CPUs: 12
  JVM Flags: 5 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx7936m -Xms256m -XX:PermSize=256m
  ModLauncher: 8.0.9+86+master.3cf110c
  ModLauncher launch target: fmlclient
  ModLauncher naming: srg
  ModLauncher services: 
  	/mixin-0.8.2.jar mixin PLUGINSERVICE 
  	/eventbus-4.0.0.jar eventbus PLUGINSERVICE 
  	/forge-1.16.5-36.1.23.jar object_holder_definalize PLUGINSERVICE 
  	/forge-1.16.5-36.1.23.jar runtime_enum_extender PLUGINSERVICE 
  	/accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
  	/forge-1.16.5-36.1.23.jar capability_inject_definalize PLUGINSERVICE 
  	/forge-1.16.5-36.1.23.jar runtimedistcleaner PLUGINSERVICE 
  	/mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE 
  	/forge-1.16.5-36.1.23.jar fml TRANSFORMATIONSERVICE 
  FML: 36.1
  Forge: net.minecraftforge:36.1.23
  FML Language Providers: 
  	[email protected]... (7 kB verbleibend)
commented

@PianoManu Hey! I am pretty sure this happens because the tile entities are not instantly populated with onDataPacket. The frame blocks are placed in the world first (with CONTAINS_BLOCK set to true). If there is (server?) lag, you are sometimes able to break the frame block while the mimic is still null. Notice how inserting a block in a frame sometimes causes the frame block to disappear for a few frames. It would crash if you weren't checking whether the mimic is null in FrameBakedModel.getQuads. You are not doing it for block colors though, so if "digging" particles are rendered while the mimic is still null, the game crashes. It also happens when my map mod tries to fetch the block color. Basically, you should add a simple null check for containedBlock instead of try-catch.

commented

Alright, I did that, thanks for your help @thexaero :)
I guess, I can close this issue now.
Regards, Manu

commented

Thanks. I am using version 0.3.6.
I did not use a grass block with the frame, there weren't even grassblocks neraby, I only put Smooth Stone into a frame slab, then broke it later and client crashed, but like I said doesn't happen all the time but more in a "ranom" fashion since I tried finding a reproducable scenario.

commented

Hmm... that's weird... I guess, I'll install Valhesia and try it out myself. Anyway, thank you for reporting!

commented

Which version are you using?
Reading from the log, it has something to do with grass blocks (or some kind of grass blocks). I've never seen this one before. The only reason I could imagine is, that you placed a grass block in a frame block and the client crashed, when you removed it. The NullPointerException indicates, that the game tries to get the block from the frame, but it is "null" (since it got removed). This should not happen, because the frame block state and its tile entity are connected, so the game should not try to get the block from the frame if it does not have any. I surrounded the code block in question with a try-catch phrase to prevent these crashes until I find the true reason behind this problem... Thank you very much for reporting!
Regards, Manu