Carry On

Carry On

112M Downloads

[1.12.2] NPE After Saving with Riding Entity

naqaden opened this issue ยท 2 comments

commented

Expected Behavior

The world loads with the player carrying the entity.

Actual Behavior

NPE crash

Steps to Reproduce

  1. Install Carry On
  2. Install Animania Base & Extra.
  3. Install Name Pain.
  4. Get a hamster on your shoulder.
  5. Save and exit that world.
  6. Load that world.

Doing these same steps without Carry On installed will not cause a crash.

While removing Name Pain dodges the crash, it's because it listens to RenderLivingEvent.Specials.Pre where entities should not be null, but they are when saved and loaded while riding players with Carry On. Related issues can be found here and here.

As the author of Name Pain, I will start catching null entities to avoid this, but I figured it should be patched here too.

Version of Minecraft, Carry On, Forge

MC v1.12.2
Forge v14.24.5.2854
Carry On v1.12.3.15
Animania Base v2.0.3.28 v1.7.3
Animania Extra v1.0.2.28
Name Pain v1.3.1 v1.2.1

commented

I'm not able to recreate this. Was the hamster named or something? Also, I'm not sure why/how a RenderLivingEvent could even be fired for a null entity. Could I see the code for your handling of RenderLivingEvent.Specials.Pre?

commented

Ugh, very sorry to have wasted your time. I guess the crash had something to do with starting tests on older versions of Name Pain and Animania (as per one of the related issues). Fresh tests with these current versions indeed does not crash!