I am using panda3d to generate different views of an object model. For this, I load the egg file, set the hpr on the object and render its depth image, set a new hpr, render, and so on. However, after a few 10000 rendered frames, I get the following error:
Memory usage overflow for type RenderState.
Any ideas where to look?
I am using panda3d 1.9.1 with python on Ubuntu 14.04
To diagnose the issue, you could also fire up pstats and see if anything is steadily increasing every frame to the point of filling up memory.
This could be a memory leak, or a state cache overflow, or an overallocation attempt. Since it has to do with RenderStates, you could try disabling the render state cache and see if that fixes it:
state-cache #f
Does your program use its own main loop and/or do you avoid ShowBase? Normally, when using base.run(), Panda calls this every frame: