Hi!
I create a TriangleMesh from 2304 vertices and 12960 indices.
I use save to stream. ( from a content writer )
When I load it( from the content reader ) using load from stream I get an null ptr exeption in BEPUphysics.dll.
I suppose Load/Save is supposed to work? What kind of errors may I have made?
I've written other data to the stream before calling save. That data looks ok when loading.
I've also tried with a smaller mesh ( 1502 vertices and 9072 indice). Same exception.
thanks!
TriangleMesh Load null ptr exception
Re: TriangleMesh Load null ptr exception
Sorry about this, it looks like this known bug slipped through the cracks of v0.10.2. The fix was applied to v0.11.0 internally, but apparently it didn't make it into v0.10.2.
To verify, the stack trace says something like this, correct?
" at System.Threading.Monitor.Enter(Object obj)\r\n at BEPUphysics.DataStructures.TriangleBoundingVolumeHierarchy.reconstructHierarchy()\r\n at BEPUphysics.DataStructures.TriangleBoundingVolumeHierarchy.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(Object sender)\r\n at ..."
I'll try to get a patch out for this quickly.
To verify, the stack trace says something like this, correct?
" at System.Threading.Monitor.Enter(Object obj)\r\n at BEPUphysics.DataStructures.TriangleBoundingVolumeHierarchy.reconstructHierarchy()\r\n at BEPUphysics.DataStructures.TriangleBoundingVolumeHierarchy.System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(Object sender)\r\n at ..."
I'll try to get a patch out for this quickly.
Re: TriangleMesh Load null ptr exception
Ah I forgot to write. I'm using v0.10.1.
I'll upgrade to XNA 3.1 and v0.10.2 and try again.
thanks
I'll upgrade to XNA 3.1 and v0.10.2 and try again.
thanks
Re: TriangleMesh Load null ptr exception
If it's the problem I think it is, v0.10.2 should still have the problem. I've e-mailed you a release candidate for BEPUphysics v0.10.3; give it a try to see if it solves your issue. If it does, I'll put it up for download on the site.