-
Bug
-
Resolution: Fixed
-
24w18a
-
None
-
Confirmed
-
Crash
-
Important
-
Platform
Summary
fraction enchantment value provider allows division by zero. If the numerator is not zero, the result is Infinity. If it is also zero, the result is NaN. Feeding these values to the game causes various unexpected effects, such as deadlocking the internal server.
Steps to Reproduce
- Create a world with attached data pack. It adds a boots enchantment, test:boom, which has a knockback multiplier of 1 / 0 or Infinity.
- Give yourself a pair of boots with the test:boom enchantment.
- Summon another entity (e.g. a pig).
- Wear the boots.
- Walk. (This causes infinite-knockback explosions.)
- Interact with the game (e.g. punching pigs).
- Try to exit the game.
Expected Result
Game works normally; the world can be interacted with, and it can be closed.
Actual Result
Internal server stops responding. (Because my testing was done on integrated server, this does not log anything of interest; dedicated server might produce a watchdog crash.)
I'm sure there are many other interesting effects achievable by feeding NaN or Infinity, but just reporting a simple example here.