Crash after a warning message: "The number of rigid bodies in the simulation now exceed 65535"

There is a limitation in Nvidia PhysX about the number of rigid bodies that can collide with the axis aligned bounding box (AABB) of another rigid body that makes the simulation crash.

Unfortunately, there is no easy way for Golaem to prevent from this crash, so whenever the total number of rigid bodies in the simulation exceed 65535, this warning is displayed:
"The number of rigid bodies in the simulation now exceed 65535. If a single AABB object collides with all of them, the physX simulation will crash. Please contact support@golaem.com if you experience a crash after this message."

The good news is that it is usually totally fine to continue using the simulation with more than 65535 rigid bodies, the only exception is when there is a huge object (usually the environment) that may collide with all the simulated entities at once. If such a thing occurs, the best way to solve this is to divide the objet in several smaller objects that won't collide with as much entities that the whole one.