aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index aa80a84..52a975e 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -389,6 +389,7 @@ namespace OpenSim.Region.Physics.OdePlugin
389 { 389 {
390 disableBody(); 390 disableBody();
391 } 391 }
392 System.Threading.Thread.Sleep(10);
392 float[] vertexList = mesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory 393 float[] vertexList = mesh.getVertexListAsFloatLocked(); // Note, that vertextList is pinned in memory
393 int[] indexList = mesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage 394 int[] indexList = mesh.getIndexListAsIntLocked(); // Also pinned, needs release after usage
394 int VertexCount = vertexList.GetLength(0)/3; 395 int VertexCount = vertexList.GetLength(0)/3;
@@ -400,9 +401,19 @@ namespace OpenSim.Region.Physics.OdePlugin
400 3*sizeof (int)); 401 3*sizeof (int));
401 d.GeomTriMeshDataPreprocess(_triMeshData); 402 d.GeomTriMeshDataPreprocess(_triMeshData);
402 403
404
403 _parent_scene.waitForSpaceUnlock(m_targetSpace); 405 _parent_scene.waitForSpaceUnlock(m_targetSpace);
404 prim_geom = d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null); 406
405 407 try
408 {
409 prim_geom = d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null);
410 }
411 catch (System.AccessViolationException)
412 {
413
414 m_log.Error("MESH LOCKED");
415 return;
416 }
406 if (IsPhysical && Body == (IntPtr) 0) 417 if (IsPhysical && Body == (IntPtr) 0)
407 { 418 {
408 // Recreate the body 419 // Recreate the body