TerraFirmaCraft

TerraFirmaCraft

2M Downloads

Crash with null capability instance during Minecraft#populateSearchTreeManager

Mrthomas20121 opened this issue ยท 5 comments

commented

Describe the bug
It crashed during startup

To Reproduce
I don't know how to reproduce it because when i restarted, the crash was gone.

Meta Info

  • TFC Version: 0.31.1.126
  • Were any other mods included? Yes Building Gadgets version 2.8.2

crash report : https://paste.dimdev.org/suvivubuxe.mccrash
i got more info from one of Building Gadgets dev :
image

commented

This issue does not apply, or has been fixed in the current MC 1.18 versions of TFC, and as MC 1.12 is receiving no more development, it will be closed. If this issue arises again in 1.18, please file a new issue report.

commented

A number of things:

  1. I can't reproduce this crash, whatsoever. Nor can I reproduce or identify any instance in which we call getCapability before capabilities are injected.
  2. Looking at the call path for this very crash, this has happened after capabilities are injected. That said:
  • Minecraft#init first calls FMLClientHandler#beginMinecraftLoading, which, among other things, calls CapabilityManager#injectCapabilities.
  • Then Minecraft#populateSearchTreeManager is called as part of the stack trace of this crash.

So I'm not sure where we're doing the described capability check before they are injected. I would believe that is the case, and I can add a if capability != null before every capability access, but I don't see how this would help given that (from running this in dev) I can't reproduce any call with a null capability.

Also, "this is a crash that magically fixed itself and I can't reproduce it" begs the obvious solution ;)

commented

2020-04-06-2.log
there is the full log. error is at line 3139

commented

Looks like terrafirmacraft sort of modified the entity renderer to something incompatible with other mods.

commented

After much investigation and no conclusive results, I'm going to close this and #188. It seems to be not reproducible, nor is there anything (short of some absolutely dumb preventative stuff like wrapping every capability call in a try-catch) that we can do here to prevent this.