Freeze when hovering over rotten flesh.
Darkere opened this issue ยท 11 comments
Had a user complain that his game was freezing when selecting rotten flesh on his hotbar.
Using Visual VM we finally figured out that the game was stuck in AppleSkin.
Snapshot file:
snapshot.zip
Appleskin 1.16x-2.1.0
Forge-36.2.4
Enimgatica 6 0.5.16
Thank you for your feedback, I'm not very familiar with Visual VM, is that a call to 85ms?
That looks like "85.413" not "85,413".
But that's not normal, it should end after 4/5 count loops, do you know the specific value of the current player food level/saturation level/exhaustion level?
It is probably visible from this screenshot https://cdn.discordapp.com/attachments/544589452492931076/902939187840434207/unknown.png
You can see on the last line that VisualVm uses "," for the decimal separator and "." for thousands. A quick test confirms this.
I had a discussion of this user on discord, he said the problem disappeared after AppleSkin was reinstalled.
Strange, not sure how this could happen. Doesn't seem like there's any potential for an infinite loop in the current implementation unless I'm missing something.
Don't think so, since exhaustionLevel
is increased each iteration, and exhaustionLevel
is used to decrease foodLevel
whenever it is over a certain threshold.
Could definitely be worth trying to throw some sort of property testing/fuzz testing at it though to ensure that it doesn't hang on any inputs.
I do some tests to confirm that an infinite loop would occur if saturationLevel
or exhaustionLevel
is infinite or nan.
Might be fixed in 2.2.0 via #155. Closing for now, please re-open if this occurs again.