* This fixes mantis 553 (It appears that the exception is thrown when there is a collision with a cylinder that is both hollowed and either tapered or cut. The sequence of actions that reproduce the problem for me are: create a cylinder, hollow to 95%, taper X/Y, then collide it with another object or avatar. Note that the cylinder itself is not marked physical. )

ThreadPoolClientBranch
Teravus Ovares 2008-02-13 19:06:35 +00:00
parent df21da6dec
commit 2e89c01851
2 changed files with 10 additions and 3 deletions

View File

@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin
public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size,
Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical)
{
System.Threading.Thread.Sleep(20);
_velocity = new PhysicsVector();
_position = pos;
m_taintposition = pos;

View File

@ -730,7 +730,16 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
}
try
{
d.GeomDestroy(prim.prim_geom);
}
catch (System.AccessViolationException)
{
m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed.");
}
_prims.Remove(prim);
//If there are no more geometries in the sub-space, we don't need it in the main space anymore
if (d.SpaceGetNumGeoms(prim.m_targetSpace) == 0)
@ -755,9 +764,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
}
d.GeomDestroy(prim.prim_geom);
_prims.Remove(prim);
}
}
/// <summary>