WTHIT Forge Edition

WTHIT Forge Edition

3M Downloads

Unusual crash when looking at blocks: `Cannot invoke "ToolTier.isEqualTo(ToolTier)" because the return value of "ToolTier.get(Tier)" is null`

unilock opened this issue · 7 comments

commented

Describe the issue

Sometimes, when looking at a certain type of block (I'm not sure which yet), the game crashes.

Log output and crash report

https://gist.github.com/unilock/c112c888c32269a959dc8f6c95870c06

Additional context

I could not upload debug.log as it was 55.6 MB in size.

I am aware that I have far too many mods (over 700?) to efficiently diagnose the issue... I'm hoping this is just a missing null check somewhere, before I start a dreadful binary search.

I suspect the issue is related to WTHIT's new "built-in harvestability plugin". Funnily enough, this didn't happen with the previous separate "WTHIT Harvestability" mod (specifically, my fork of it).

commented

@deirn

Please do check with these versions, I added a debug print that prints the id for every TieredItem. It should show what item that has null tier.

Here's (what I believe to be) the relevant part of debug.log with the debug build installed: https://gist.github.com/unilock/6d61b5c574fd07da5d2e44728eca0434

Looks like the problematic TieredItem is techreborn:bronze_pickaxe. Notably, Tech Reborn is a Fabric mod that I have running via Sinytra Connector. I wonder if that has anything to do with it?

commented

Looks like the problematic TieredItem is techreborn:bronze_pickaxe. Notably, Tech Reborn is a Fabric mod that I have running via Sinytra Connector. I wonder if that has anything to do with it?

It might be, on Forge WTHIT uses TierSortingRegistry to get all the tiers instead of looping through all the items. It makes sense if Fabric tiers are not registered there.

commented

Thanks for a quick response, and for the alt. version to try. I'm guessing that if the issue is a null tier, then a null check should fix the issue. I'll respond if there are still issues with the debug version, but otherwise no news is good news and I'll look forward to the formal release.

Cheers,

Slack

commented

I have the same issue, but on Forge.

https://pastebin.com/LfrKLHh4

commented

Can confirm the same issue on Quilt.

https://pastebin.com/FUCygCRf

commented

It's helpful that there are multiple log files, using the script from here here are the same mod present:

almostunified
architectury
badpackets
bookshelf
chefsdelight
clumps
connectivity
controlling
create
createdeco
create_dragon_lib
sliceanddice
railways
cupboard
everycomp
farmersdelight
flywheel
frame
framework
kubejs
liquidburner
memoryleakfix
mixinextras
moonlight
mousetweaks
nethersdelight
oceansdelight
byg
patchouli
polymorph
puzzleslib
spectrelib
supermartijn642configlib
supermartijn642corelib
supplementaries
terrablender
wits
wthit
yungsapi
betterdungeons
bettermineshafts
betteroceanmonuments
commented

Not actually that helpful lol, I can't reproduce with that list.

While it might be fixed with a null check (I'll probably add it regardless), it is sidestepping the issue, some mod seems to be having a TieredItem that returns a null tier...

Please do check with these versions, I added a debug print that prints the id for every TieredItem. It should show what item that has null tier.
1.20.1
1.19.2