According to the code above https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L623 the closestPt will be equal to relCentre if the center of the sphere is inside the box, which leads to a normal with zero length. Then you make a coordinate system with the zero normal and get a degenerated matrix with NaNs. The NaNs spread into every single part of the simulation and mess it up entirely.
According to the code above https://github.com/idmillington/cyclone-physics/blob/master/src/collide_fine.cpp#L623 the closestPt will be equal to relCentre if the center of the sphere is inside the box, which leads to a normal with zero length. Then you make a coordinate system with the zero normal and get a degenerated matrix with NaNs. The NaNs spread into every single part of the simulation and mess it up entirely.