Rigidbody high acceleration freeze up game/editor. Unity should cap acceleration or show error

So in Unity 2021.3.13. I’m working with rigidbody and AddForce function. I found out my game would randomly freeze up when triggering “explosion” in my game.

Turns out it was the explosion force accidentally applied to some very small, very light objects. The acceleration was too high and it freeze up my game.

More specifically, it was the bullet casing drooped on the floor. I do have object pool will recycle casing after some time. But if an explosion occurs nearby before the casing got recycled, it will put the entire game into a freeze.

Edit: I just found that it only happens if the RigidBody collision detection is set to “continuous speculative” mode. I must’ve turned that option by accident.

No errors, no warnings, and even the System.Diagnostics.Stopwatch will freeze so it won’t give you the correct timing of function exception. This problem is very difficult to debug if you don’t have prior knowledge and didn’t pay attention to such a detail.

I suggest that Unity should cap the max acceleration of an object and/or show an error message if a rigidbody’s acceleration is too high.

Looks like a serious issue to me. I’d recommend you to file a bug report with a minimal repro case.

OK will do.
Would you suggest reporting here on the forum as new bug post? Or report to their support services?

Use the bug reporter. Prepare a minimal project where the issue can be clearly reproduced (like pressing Play and Unity freezes), then submit it via Help menu > Report a Bug.

When you receive a case number, you may post it here so devs can refer to it.

Roger that! ∠(°-°)

1 Like

Just submitted the bug report, got an email with a number “IN-24501” that’s the case number right?
BTW I just found out that it only happens if the collision detection mode is set to “Continuous Speculative”. I must’ve accidentally chose that option by mistake. :stuck_out_tongue:

Yes, that’s the case number. Unity stuff can now test the issue, determine the Unity versions affected, and take the steps to resolve it.

The information about Continuous Speculative is great, ensure it’s added to the case information if you hadn’t included it earlier.