AppleSkin

AppleSkin

236M Downloads

Freeze when hovering over rotten flesh.

Darkere opened this issue ยท 11 comments

commented

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.
image

Snapshot file:
snapshot.zip

Appleskin 1.16x-2.1.0
Forge-36.2.4
Enimgatica 6 0.5.16

commented

Thank you for your feedback, I'm not very familiar with Visual VM, is that a call to 85ms?

commented

That is a call that ran for 85413 milliseconds or 85 seconds.

commented

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?

commented

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.

commented

I'm sorry, but I can't reproduce the problem.

Without other mods + new single player world + hold rotten flesh in main hand:
image

With Enimgatica 6 0.5.16 + new single player world + hold rotten flesh in main hand:
image

commented

I had a discussion of this user on discord, he said the problem disappeared after AppleSkin was reinstalled.

commented

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.

commented

From a quick glance. Foodlevel 19 and saturation level 0 could loop infinitely

commented

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.

commented

I do some tests to confirm that an infinite loop would occur if saturationLevel or exhaustionLevel is infinite or nan.

commented

Might be fixed in 2.2.0 via #155. Closing for now, please re-open if this occurs again.