Mythic Upgrades

Mythic Upgrades

7M Downloads

Sapphire armor causes a crash.

CallMeEchoCodes opened this issue ยท 6 comments

commented

Hi! I am currently debugging a server crash that occurs when using Sapphire armor. I had a look at the code but i can't see any issues. The server uses the origins mod which may be related.

crash-2023-11-12_22.30.02-server.txt

commented

@CallMeEchoCodes Can you provide more info pls. What race were your player and were you doing before crash appeared?

commented

@CyberSteve777 Hi! I was playing as Truffle (a custom origin) and the player i killed was a Bee (another custom origin). However this bug appears to happen as any origin to many mobs. I have experienced it in an Enderman farm i made and my origin doesn't modify anything related to potion effects or deflection.

commented

Just realised i really didn't provide that much context here:

  1. This seems to occur when killing something while wearing the armor. The only pattern i have found is that anything with more or less than a vanilla players health causes it more.
  2. The crash specifically mentions the Mixins on the Player, which would seem to imply this bug is in one of those files.
  3. My running theory has been that the non standard health is causing a division by 0 somewhere, causing a crash. Java isn't a language I'm great at so this is probably wrong but ig its a starting point.
commented

@CallMeEchoCodes actually, looking at crash report, it seems that's the problem is in infinite recursion, where some part of code just calls itself infinetly. I think it's bc techincally you can deflect damage to yourself caused by you, but I can't imagine such scenario. Anyway, I hope this is the cause, which I'll try to fix

commented

My friends and i happen to find that out today after i realized one of them had the same armor on and me feeling the urge to hit him. This in turn crashed the server so in our case it 100% is an infinite loop of code.

Sadly i have to change my armor now because we both like to hit each other and i don't want the server to keep crashing because of our stupidity

commented

This issue has been fixed with Update 2.4.0.