MovingBlocks / Terasology

Terasology - open source voxel world
http://terasology.org
Apache License 2.0
3.69k stars 1.34k forks source link

Crash on trying to use shaping table #5143

Open Miner34dev opened 1 year ago

Miner34dev commented 1 year ago

General Info

Terasology Launcher Version: Linux X64 4.8.0 Terasology Version: 5.3.0 stable Operating System: Garuda linux Onboard / Dedicated Graphics: AMD Ryzen 3 5300U (no dedicated graphics) Java Version: Launcher bundled

What you were trying to do

Using a shaping table in josharias survival.

What actually happened

Terasology crashed, the bug report window opened but i was unable to use it since my mouse pointer disappeared.

How to reproduce

  1. Select Terasology version 5.3.0
  2. Start Terasology
  3. Select gameplay josharias survival
  4. Start game
  5. Get a shaping table
  6. Use it
  7. See error (NullPointerException)

Log details

Here is the world's log (i hope it's the right one) Terasology-Survivalworld.log

Additional Infos / Context

Please note that after restarting and crafting a new shaping table it worked without crashing.

Miner34dev commented 1 year ago

Just happened again. Anybody reproduced it?

jdrueckert commented 1 year ago

Hi @Miner34dev, thanks for reporting this, I can reproduce it based on the steps you shared 👍 NPE seems to come from our ManualLabor module:

java.lang.NullPointerException: null
    at org.terasology.manualLabor.processParts.SymmetricBlockOutputProcessPartCommonSystem.validateToStartExecution(SymmetricBlockOutputProcessPartCommonSystem.java:82)
    at org.terasology.manualLabor.processParts.SymmetricBlockOutputProcessPartCommonSystemMethodAccess.invoke(Unknown Source)
    at org.terasology.engine.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:399)

More precisely, from SymmetricBlockOutputProcessPartCommonSystem#validateToStartExecution. My working theory is that the slotAmountsComponent might not be properly initialized or something... wanted to check in an entity dump (in-game console dumpEntities), but it seems we have another bug there when on windows (see #5144)... I'll need to check on my Linux, but won't get to that today, I'll comment once I have any updates.

jdrueckert commented 1 year ago

I can now confirm that with a shaping table placed in the world in a dump of all entities of the world, a InventoryInputProcessPartSlotAmountsComponent as trying to be fetched in SymmetricBlockOutputProcessPartCommonSystem.java line 81 is no where to be found which results in slotAmountsComponent being null which in turns results in the NPE when it's attempted to be accessed.

Having said that, it's unclear to me when this last worked and when it broke. With our current development capacities bound elsewhere, I don't think we'll fix this anytime soon.