Off-hand FPS bug with Parcool and "Passive Shield" mod; 1.20.1 Forge
CodeBot101 opened this issue · 0 comments
Summary
With "Passive Shield" installed, it seems the longer you go without using your off-hand, the harder it lags when you finally do.
(Happens with seemingly any off-hand usage though, not just the shield)
Running Environment
- Minecraft Version: 1.20.1
- ParCool Version: 3.3.1.0-1.0
- Forge Version (optional): 1.268.1.21898
Detail
Waiting for ~60+ seconds and then using an item in your off-hand results in a lag-spike equivalent to however long you waited since the last time you used an item in your off-hand. I'm using ALT+F3 to bring up the FPS and TPS graphs, so I can confirm it's FPS, not TPS; and I can see there's a spike even when it's not big enough to freeze/stutter the game
If I were to spam right-click, the game would be fine, because there wouldn't be time for the lag spike to "build up."
- This happens only when something is actually in the off-hand, with and without Parcool enabled (via CTRL+P)
- The ever-growing, impending lag spike also seems to happen when returning into first-person from 3rd-person when Passive Shield and Parcool are installed
- With or without Shoulder Surf, the right-click lag accumulation still occurs.
It seems this lag spike accumulates quicker the longer you play (and maybe the more you use your off-hand too; unsure), which suggests it might be a weird, conditional memory leak that simultaneously rears its ugly head and resets itself the moment the off-hand is used or something.
It will eventually get bad enough that the lag spike can brick the world due to the game being unable to handle the sudden pause. The client will come back, but the TPS will be frozen forever since—according to a prior log—the ticks exceed the waiting limit, and sometimes the game just can't recover.
Notably:
-
The lag spike still accumulates while the game is paused it seems.
-
This issue is MUCH clearer when there are other mods installed to put the game under a somewhat heavy load; otherwise, the FPS spikes aren't super impactful after ~60 or so seconds of buildup, so it's understandable how they'd be missed during testing.
-
I did try this with and without your compatibility add-on; it's the same lag spike issue with and without.
-
I binarily went through all my mods, and ultimately, removing Passive Shield fixed it.
Additional Data
I genuinely—having scoured the logs myself—do not think the logs are going to give you any useful info; it seems to not register my right-click at all, so it doesn't appear in the log. Here's just a small snippet from after I started testing with the shield to prove it: https://pastebin.com/G9zM5ujU
- I'm pretty sure this is like a memory leak, unclosed loop, stack-overflow/etc. issue that's just building up passively and only being cleared when right-click is pressed with something in the off-hand
But I do think my huge mod pack will probably help you to more quickly recreate the issue under a stressed Minecraft world, lol:
https://drive.google.com/file/d/1YrV72V6pmOA8B0drW7CizaYrW8vbzuEP/view?usp=sharing