Reproducible client freeze relating to water and Dark Steel Boots Jump III
mobro09 opened this issue · 16 comments
Issue Description:
Delete this line after reading it: If this bug occurs in a modpack, please report this to the modpack author first. If you are using an unreleased version of Ender IO (a.k.a development/nightly version), please don't open an issue for features that have not been announced as "finished" or "working". Expect to be ignored if you ignore this template.
What happens:
Using just the dark steel boots in this mod alone with endercore... we tested plain dark steel boots, dark steel boots with flippers enchant only, and finally the culprits werethe boots which had empowered I and jump III. Passing through a stream of water while jumping (and occasionally while jumping on land), on a self hosted server with a friend of mine. Hard freeze with no crash report, need to end task to exit minecraft. Does not happen/is not reproduced in single player, and the freeze often happens to the player not in the water.
What you expected to happen:
Walk through the water or jump without a freeze.
Steps to reproduce:
1.Use just EnderIo and Endercore
2.Equip Jump III Dark steel boots
3.attempt to jump with another player present in a server hosted game. While in water will occur within seconds.
...
Affected Versions (Do not use "latest"):
- EnderIO: EnderIO-1.12.2-5.0.38.jar
- EnderCore:EnderCore-1.12.2-0.5.43.jar
- Minecraft:1.12.2
- Forge: 14.23.4.2705
- SpongeForge? no
- Optifine? yes and no (tested with both)
- Single Player and/or Server? Server only. with another player present does not occur solo
Your most recent log file where the issue was present:
No log file is presented as the game freezes and has to be ended manually.
[pastebin/gist/etc link here]
I realise this is present in atleast 2 other threads in some shape or form, but me and my friend just spent about 20 hours or so testing to figure out why our game was freezing and narrowed it down to this after a lot of research. If you require any more finer details please feel free to comment
When the game is frozen for a while, crash it by holding F3+C (I think it was C, look it up if it doesn't work) for 5 seconds. Attach that crash log here.
Also, please link in the old tickets if you are aware of them. While I'm not happy with dupes, sometimes shifting to a new clean ticket makes sense.
I have work in the morning but I will attempt after to try and manually crash. While trying f3+c earlier I just kept getting the task manager message javaaw.exe has stopped but I will try it again.
It appears they were relating the crash to the flippers enchant when after isolating and testing seperately it was jump.
Will get that report to you tomorrow good sir. My friend and I worked hard to figure this out because we are enjoying using enderio, hopefully a resolution can come from this! :)
you're right, manually crashing might not work if the game is not going through keyboard handling at all.
In that case you need an external debugger to get a thread dump. As you managed to reproduce this and we never managed that, I'd be grateful if you could do that. The easiest way probably is installing a JDK (Java Development Kit) and using the jvisualvm program that is included with it. Start that while the game is running and attach to the game by double-clicking it in the left pane of visualvm. One of the tabs will have a way to get a thread dump. Get one while the game is frozen, of better, get a couple of them as that will tell us more about which code is being processed.
If you need more help, I can make a couple of screenshots on how to do it tonight.
That would be great man any help is appreciated, I'll check it all out and let you know the results
Three thread dumps, just after the game froze (within about 30 seconds of eachother) all with my friend wearing Dark Steel Boots; Empowered IV, Jump II, Flippers.
EDIT: To clarify, that was just less than 5 seconds after he entered/jumped in moving water stream, I was wearing no boots at the time and running towards our house.
Thread dump 1:https://pastebin.com/q6P02zXZ
Thread dump 2:https://pastebin.com/4D9V9M1M
Thread dump 3:https://pastebin.com/8jyQjnvV
Hopefully this helps
Yes, this is perfect.
Funny thing---we know this freeze, we just never knew how it happened...
Seen this before...somehow a particle is accelerated to insane speeds which causes a collision check across millions or billions of blocks - effectively an infinite loop.
Jump boost spawns extra particles, not just water splash and ground ones. My current guess is those calculating wrong values when spawned for another player. Still that doesn't explain why it only happens in water. Maybe something adds up when they are spawned in water? But then it doesn't happen for the original player...
Oh wow, yeah at first we thought this was relating to our java version, or our forge version, or a mod conflict, or the version of minecraft itself, we eventually stripped it back to vanilla and erased all modded blocks from our world and the water bug wasn't present.
After this we somehow clued that it may be the boots as the freeze began around the time we produced the armour, then it all just became clearer.
So, is it something difficult to fix or not sure just yet?
PS: I can probably remove the freeze in 5 minutes by disabling the jump particles. No idea how long it'll take me to actually fix it without disabling them.
It seems to happen to the player not in water and vice versa, if we are both in the water it's just russian roulette as to who freezes lol. Server goes on unaffected but the players client stays logged in but non-functional
Oh good to know, when you get a chance to do that I'd be happy to confirm it fixed.
The game just doesn't feel the same without the Jump. Once we went there we can't go back haha
Ah yeah I was gonna suggest disabling the jump particles as a fix in the meantime if no real fix is coming soon, currently cant use jump boots cause of the chance of freezing.
Edit: after looking at the code, the only unknown I cant rely on is the player motion values, I suspect that the values might temporarily be insane when a client is doing moving water physics on other players, and then the particles are spawned using those values on the persons client, removing use of player.motionX / Y / Z might be a decent fix, but I can't be certain without more testing.
This line to be specific: https://github.com/SleepyTrousers/EnderIO/blob/release/1.12.2/enderio-base/src/main/java/crazypants/enderio/base/item/darksteel/upgrade/jump/JumpUpgrade.java#L100-L101
Yes, the motion data of other players is not sent to the client, as their movement is not speculative like mobs'. When another player laggs out, they freeze.
But it seems water movement doesn't know about that and puts values into there anyway. And because they are never cleaned up by any other physics (e.g. ground collision) they can get quite insane.
PS: Wasn't there a bug with other players' capes doing weird things in multiplayer? Cape rendering uses those values, too.