First off this is a WindowsGL game using the latest auto built code from today 4/16.
I am building vertex arrays on a separate thread and as they’re done the main thread creates a VertexBuffer passing in the generated array. This frequently ends but not always ends with:
"An unhandled exception of type ‘System.AccessViolationException’ occurred in OpenTK.dll
Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
What could be causing this? Is there a better way of doing this? I’m generating sometimes upwards of 2000 of these at a time when it first starts then re generating based on various changes upwards of 50-100 a minute.
Can VertexBuffers be created on separate threads or should they always be from the main thread?
EDIT: This appears to always happen on the first 1-2 VertexBuffer instantiations. It also appears that if you catch the exception and ignore it that everything will continue on as usual. Is this a good idea to ignore an exception that by the name sounds like a serious issue? My current test generates ~4000 VBO’s on start and this always always fires on the first 1-2 calls if it fires at all…