Apotheosis

Apotheosis

79M Downloads

According to Heapdump taken with VisualVM, Apotheosis causes some form of Softlock on the server thread

cocona20xx opened this issue ยท 12 comments

commented

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.

Screen Shot 2021-06-02 at 11 16 22 PM

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!

commented

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):
Screen Shot 2021-06-02 at 11 46 39 PM

Going to see if running a JVM higher than 8 makes any change next.

commented

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());

commented

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.

commented

Here it is:
apo-permafrost-stuff.zip

Also, should I make an issue pertaining to having a better failure state for broken .json?

commented

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.

commented

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?

commented

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.

commented

alright, time to figure out which one it is ig

commented

That's not what's causing the softlock in this case?
As shown here, the game is trying to spawn a vindicator and getting stuck, despite having previously spawned such a mob?

Screen Shot 2021-06-03 at 1 17 37 AM

going to dig though the heap stack trace some more for this specific softlock

commented

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

commented

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)

commented

Replicated by spam-spawning boss mobs with the Boss Spawner item
relevant heap stack data here:
Screen Shot 2021-06-02 at 11 35 04 PM
According to another person playing the pack, Blame causes this bug to throw an error instead of softlocking.