According to Heapdump taken with VisualVM, Apotheosis causes some form of Softlock on the server thread
cocona20xx opened this issue ยท 12 comments
Mod version: 4.6.1
Forge version: 35.1.37
Minecraft version: 1.16.4
Other things of note: modpack is Permafrost which contains Performant version 3.56m
It appears that on occasion, Apotheosis causes some form of softlock when attempting to spawn a boss mob via the deadly module. This softlock creates no logs and so had to be caught using the VirualVM debugging tool. The heapdump pictured and attached to this issue was generated using said tool.
Zip file containing the full heap is here (google docs):
https://drive.google.com/file/d/1cdppxcJhqtO3ILH3lJ8Qu5SHPHDCKH5B/view?usp=sharing
Note that the uncompressed version is nearly 3gb large!
Another update! Blame gets us an actual error to throw, but still locks up the server thread.
https://paste.ee/p/iiL28
Relevant heap thread thingie (again):
Going to see if running a JVM higher than 8 makes any change next.
Do you happen to have custom boss files loaded in via datapack? That code path from the actual crash points towards this line of code entity.getAttribute(this.attribute).applyPersistentModifier(modif);
which can only NPE if entity is null. Only way that's null is if the MobEntity returned by the EntityType held in a BossItem creates nothing at this line MobEntity entity = (MobEntity) this.entity.create(world.getWorld());
Sure looks like it.
There's probably something wrong with them, then? Ill post the global datapack folder in a zip real quick if you want to check it over for reference.
Here it is:
apo-permafrost-stuff.zip
Also, should I make an issue pertaining to having a better failure state for broken .json?
You've probably picked a modded entity that is returning null to EntityType#create, for whatever reason. No clue why an entity type would do that, but it's not actually a failure in the json, rather in the selected entity type.
I think I know why: the game gets stuck if it tries to spawn a boss mob with no item slots; as it can't put an item in any of the slots. This seems to be what is happening each time this sort of error occurs so far?
No, that would have nothing to do with it (though that would also be unsupported behavior, you cannot create a boss that is not a MobEntity, which guarantees the slot exists). You are selecting an entity for boss-creation that is returning null when an attempt to actually "create" that entity occurs.
I gtg to bed might do some more digging in the morning.
it's for sure some sort of bad json, but idk what since i didnt author the files
Going to close this for now, suspect its bad json of some sort.
likely culprits are mobs that aren't valid (the error) and bad boss items of some sort (softlock)
Replicated by spam-spawning boss mobs with the Boss Spawner item
relevant heap stack data here:
According to another person playing the pack, Blame causes this bug to throw an error instead of softlocking.