ray-casting failure in multi-threading
Posted: Mon Dec 07, 2015 2:59 pm
I have a huge task of 100 ray-casting operations (to simulate a lidar sensor).
It hurts the update function response. Then I decided to use a separate thread doing the ray-casting. It works very smoothly during the first a few seconds, then I got a null_pointer_exception during space.RayCast(ray, out rcr), while there is no null variables in the context. I guess there must be something inside the engine that complains. I guess some entities are changed during my thread.
There isn't much information available in IDE's debugger.
It hurts the update function response. Then I decided to use a separate thread doing the ray-casting. It works very smoothly during the first a few seconds, then I got a null_pointer_exception during space.RayCast(ray, out rcr), while there is no null variables in the context. I guess there must be something inside the engine that complains. I guess some entities are changed during my thread.
There isn't much information available in IDE's debugger.