diff options
author | Teravus Ovares | 2008-02-09 04:08:26 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-09 04:08:26 +0000 |
commit | fec65b3c698540fa93e877b365b051f98c277ff7 (patch) | |
tree | 26ef29fe083dc64f82ebbb934058d13557001348 /OpenSim/Region/Physics | |
parent | * Change logger to handle [<entry>] where <entry> contains non alphabetic cha... (diff) | |
download | opensim-SC-fec65b3c698540fa93e877b365b051f98c277ff7.zip opensim-SC-fec65b3c698540fa93e877b365b051f98c277ff7.tar.gz opensim-SC-fec65b3c698540fa93e877b365b051f98c277ff7.tar.bz2 opensim-SC-fec65b3c698540fa93e877b365b051f98c277ff7.tar.xz |
* Tweaked timing of rapid mesh requests. Helps a race condition.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 15 |
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 |