[osg-users] Heap Corruption

David Heitbrink david-heitbrink at uiowa.edu
Tue Jan 10 12:58:19 PST 2017


What threading model are you using?

One thing you need to be conscious of is when you update/modify your scenegraph and who is using it at that time. Some operations might better be served using different callback mechanisms, such as using viewer->addUpdateOperation.

You might try switching your threading model to single threaded, and see if that improves/ or changes the situation. This may or may be related to the issue, heap corruption errors are notoriously difficult to debug.

Also keep in mind when you get a heap corruption exception, what is happening behind the scenes is typically for debug builds every X number of heap operations, the CRT will check the consistency of the heap. If it fails then, it throws a exception. Often the location of what corrupts the memory is not related to where it is detected. You can use:

_CrtSetDbgFlag
_CrtCheckMemory

To have some control over when and how often the CRT checks the heap. If you are really aggressive about this, this will totally kill performance.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=69952#69952








More information about the osg-users mailing list