Client-side player occasionally null in Minecraft instance when processing Invalidate Container packet
DrTasslehoff opened this issue ยท 5 comments
General Information
Describe the bug:
When trying to edit modifiers on any Roots spell when the staff has any spell with additional modifiers in any slot results in a crash. I've gotten this to happen with "Augment" and "Growth Infusion" spells, when they had only a few modifiers unlocked. Not sure the full list of spells this may impact, but using all possible modifiers on a spell seems to alleviate the crashing
To Reproduce:
- Place a staff into the Imposer
- Right click with a knife to open the interface
- Open a spell and add any number of modifiers to a spell, this works fine
- Attempt to repeat steps 1-3 and you will see a crash on step 3
Expected behavior:
opening of the spell modifier editor
Environment Versions
Roots 1.12.2-3.1.1
Mystic Mods Versions
- MysticalLib: 1.12.2-1.11
- Mystical World 1.12.2-1.10.0
Other Versions:
- Conflicting mod (if regarding mod integration):
- Other mods you think could cause issues:
- Forge: 14.23.5.2855
- Minecraft: 12.2
- Modpack (if available): Divine Journey 2 v2.2
Logging Information
Please Use gist, paste.ee, pastebin or some other log sharing service
Crash Report (if available):
https://pastebin.com/f4sSupYz
Additional Information
Additional context (optional):
This seems to happen with "Growth Infusion" and "Augment" and after applying all modifiers to another spell the issue seems to not happen anymore? I can't say I've tested all spells, but those are the two I've encountered crashing with
trying to shift-click herbs without opening the interface results in errors as well, though not a full crash.
Oh, that's very interesting. Thank you so much for that crash report, it finally fills in some blanks. I'm going to make a new issue out of it.
It's incredibly weird because at some point the crashes just stopped completely. The last thing I did was take a staff/spell with no modifiers on it and applied all possible modifiers to a spell. After that I've never run into the crashes again. What's even weirder is this persisted across all worlds I created afterwards.
A different crash log behaving exactly the same way (disappears after first use). Happens when you add spell to your book, apply it to staff
- Switching to new Spell will crash
- Casting the new spell will also result in the same crash
It's a minor inconvenience having to reboot up the game everytime it crashes. But yea.
This appears to be a mod conflict of some kind, as I'm unable to reproduce it in a development environment.
The relevant line of code:
EntityPlayer player = Minecraft.getMinecraft().player;
if (player.openContainer instanceof IInvalidatingContainer) {
((IInvalidatingContainer) player.openContainer).invalidate();
}
The only thing being dereferenced here is the player... which implies that, for whatever reason, the Minecraft instance has a null player. Which should never happen.
I can add in a null check but it won't really resolve the issue...
It's incredibly weird because at some point the crashes just stopped completely. The last thing I did was take a staff/spell with no modifiers on it and applied all possible modifiers to a spell. After that I've never run into the crashes again. What's even weirder is this persisted across all worlds I created afterwards.
I suspect this is a side-effect of another mod doing stuff. Yes, there is a chance for the player
in Minecraft to be null, but usually that's only during the initialisation phase. There do appear to be other bugs, especially with runed wood, so I'll merge a "fix" anyway that just does nothing when the player is null.