Tom's Simple Storage Mod (Fabric)

Tom's Simple Storage Mod (Fabric)

16M Downloads

[1.17.1] (Forge) Console stacktrace spam - [12:43:43] [Server thread/WARN]: Catching java.lang.NullPointerException: Supplier should not return null value

ProsperCraft opened this issue ยท 4 comments

commented

https://gist.github.com/ProsperCraft/c79a21ef225140d88a63f84394d34531

This goes away when the chunks unload, but once a player loads his base with storage we get this continuously on a dedicated server running TownCraft THREE

Here is a complete clean log showing load and the stacktraces.
https://gist.github.com/ProsperCraft/cae59184d30975733af9ef51d88adf68

commented

I went to go upload a log to report a bug and it was 330 megs.....

commented

One of the blocks near the inventory connector has an invalid inventory. Check the blocks touching the inventory connector.

commented

Ok, so if this log spam is so easy to create, on a large server this will be catastrophic.

I am thinking of two ways to solve this-

  1. Make it configurable to not have the adjacent inventory option, and require connections to each storage.
  2. ignore the error and not log it.

I like the early game mass storage and crafting, but my pack needs to handle a lot of players, if we can't get a fix will just have to force players to go straight to AE2.

commented

The issue in not with Tom's Storage. The inventory connector merges all of the touching inventories into one. There is a broken modded block touching these inventories (Vanilla hopper/most other mods crash the server, if they try to interact with such block). The message is logged by forge and should only appear once per placed block (for some reason the mod clears this?), when the block interaction is attempted for the first time.

Why it happens:
The message is logged by forge when the interaction happens and there is no way for me to silence it.
The broken modded block says it has an inventory (returns true for isPresent) then says nope (returns null and forge complains) when accessing it. (Forge also notes that is has logged the warning, so further interactions won't spam the log, but the mod clears this for some reason/doesn't implement inventories properly). The reason Tom's Storage doesn't crash is it drops the inventory for being invalid (I check this for some reason, according to forge you don't need to check this as it should always be valid if isPresent is true).

How to fix it:
Find the broken block and break it. Then report it to the mod author.
Send a screenshot of the suspected setup, and try to break and replace some of the modded blocks that looks like it would have an inventory. Or try placing a hopper with items in it. (Make a world backup, or the hopper will crash the server every time the chunk loads).