Artisan Worktables 1.12

Artisan Worktables 1.12

3M Downloads

NPE Crash

KAfable opened this issue ยท 8 comments

commented

Issue Description

Modpack: FTB Interactions dev instance
Log: https://gist.github.com/Vyraal1/506fcaba10365943cc566deab1b8c2c2

What Happens

Shift clicked a thermal hammer into the tool slot and got an NPE

Script

Ore Dict (tool ore dicts are assigned in line 1244 - 1243: https://gist.github.com/Vyraal1/fa0c2678f9fa19ec7136ac3b784aed3c

Recipe Script: (starts on line 879)
https://gist.github.com/Vyraal1/a0b0f4083c526536013e3e6fd2ac0eec

Crash Log

https://gist.github.com/Vyraal1/506fcaba10365943cc566deab1b8c2c2

Affected Versions

  • Minecraft: 1.12.2
  • Forge: 2795
  • CraftTweaker: 4.1.17
  • Artisan Worktables: 1-21
  • Athenaeum: 1.16.0
commented

Also minor note, upon updating Artisan Worktables, I noticed two of my worktables in my dev world had to be broken and then replaced, otherwise right clicking on them did nothing.

commented

So it seems like any tool after this update on FTB Interactions has issues with any non-GTCE tool:
Got the crash with the following

  • Tinkers Hammer (any combo it seems like)
  • Thermal Hammer
  • Microblocks Saw
commented

Does it happen only with shift-clicking the tool or does it also happen when the tool is manually placed in the slot?

commented

I have yet to reproduce this in either the dev environment or a new instance.

Tried:

  • TiC hammer in dev env (shift-click, manual, craft, SP, MP)
  • TF hammer in dev env (shift-click, manual, craft, SP, MP)
  • TiC hammer in new instance (shift-click, manual, craft, SP)
  • TF hammer in new instance (shift-click, manual, craft, SP)
  • Oredict TiC and TF hammers in new instance (shift-click, manual, craft, missing oredict entry, w & w/o fluid, missng fluid, SP)

The crash log doesn't give any information to help identify what is happening.

Details:
	Screen name: com.codetaylor.mc.artisanworktables.modules.worktables.gui.GuiContainerWorktable
Stacktrace:
	at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1764)
...

func_71407_l maps to:

MC 1.12: net/minecraft/client/Minecraft.runTick
Name: t => func_71407_l => runTick
Descriptor: ()V
Comment: Runs the current tick.
Side: CLIENT
AT: public net.minecraft.client.Minecraft func_71407_l()V # runTick

The only clue I can deduce from the crash log is very general: the client crashed while the AW gui was open because a NPE occurred somewhere during the game tick.

Regarding:

[...] upon updating Artisan Worktables, I noticed two of my worktables in my dev world had to be broken and then replaced, otherwise right clicking on them did nothing.

This is indicative of an exception during deserialization of a TileEntity. Usually, the exception occurs because of a mismatch between the serialized data and the code reading it. The exception will be logged, but otherwise ignored, resulting in an inert block that's missing its TE. I am careful to avoid introducing serialization discrepancies that could potentially cause players to lose items / fluids stored in the tables. My best guess at this point is that the deserialization of an item or fluid stored in the table caused an exception because the item or fluid being deserialized was no longer in the game (ie. not registered or registered under a different name). Without logs however, it's just speculation derived from assumptions.

commented

Upon digging deeper, it seems that the NPE is being thrown during the call to GuiScreen#handleInput().

I'm curious to know if the crash persists if you roll back to AW 1.20.

commented

It also happens when the tool is manually placed in the slot. Bit busy tonight, but tomorrow morning I can check if the crash persists in a previous version.

commented

What's the status of this issue?

commented

@Vyraal1 The fix for issue #172 might fix this issue: 1.12.2-1.21.6