Game grinds to a hault / bug in physics / crash in parry2d qbvh
MaxCWhitehead opened this issue · 3 comments
Description
I was having some issues crashing in parry2d QBVH, sometimes a crash and sometimes game grinding to hault or hanging. Did some research and not the only ones hitting this - updated parry2d for a fix. Some additional context here: #960
Thought that fixed it but I repro'd the slowdown again. I saw thousands of move_vertical and other operations update_kinematics inside a frame in puffin data. Not totally sure if should read too much into puffin in an error state, but just taking note. Going to try to repro with debugger attached and gather more info.
To Reproduce
(May be able to repro in local play, but these are the conditions I encountered it in).
- Start two jumpy clients
- Start online game
- Play game as normal on one client, kill other player, interact with items, etc.
- Observe either a crash, or FPS slowing down rapidly until totally frozen.
Expected Behavior
No response
Additional Context
No response
Log Messages
No response
Sounds like the fix upstream was actually to just rebuild the BVH after it gets unbalanced enough, instead of crashing. So there is still a bug at large in parry2d causing degenerate tree, which makes sense why the issue moved from a crash to just being slow...
EDIT: But this is still much worse than rebuilding BVH every frame, as if it doesn't degenerate far enough to trigger rebuild, perf tanks.
Mitigated by #962, will keep an eye on upstream to see if we can remove this down the line. Will open an issue describing this problem in parry2d, as the other handful of issues were closed with recent fix, but it still seems to be a big problem.