add a nasty global lock, ode.dll requires on multi regions per instance ( also make sure ninjaJoints are disabled
parent
37d7576d67
commit
f59350a1ee
|
@ -125,6 +125,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
/// .../opensim/bin/libode-x86_64.so(_Z12dCollideCCTLP6dxGeomS0_iP12dContactGeomi+0x92) [0x7f03b44bcf82]
|
||||
/// </remarks>
|
||||
internal static Object UniversalColliderSyncObject = new Object();
|
||||
internal static Object SimulationLock = new Object();
|
||||
|
||||
/// <summary>
|
||||
/// Is stats collecting enabled for this ODE scene?
|
||||
|
@ -647,7 +648,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
physics_logging_interval = physicsconfig.GetInt("physics_logging_interval", 0);
|
||||
physics_logging_append_existing_logfile = physicsconfig.GetBoolean("physics_logging_append_existing_logfile", false);
|
||||
|
||||
m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false);
|
||||
// m_NINJA_physics_joints_enabled = physicsconfig.GetBoolean("use_NINJA_physics_joints", false);
|
||||
minimumGroundFlightOffset = physicsconfig.GetFloat("minimum_ground_flight_offset", 3f);
|
||||
maximumMassObject = physicsconfig.GetFloat("maximum_mass_object", 10000.01f);
|
||||
}
|
||||
|
@ -2714,6 +2715,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
CreateRequestedJoints(); // this must be outside of the lock (OdeLock) to avoid deadlocks
|
||||
}
|
||||
|
||||
|
||||
lock (OdeLock)
|
||||
{
|
||||
d.AllocateODEDataForThread(~0U);
|
||||
|
@ -2867,6 +2869,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
tempTick = tempTick2;
|
||||
}
|
||||
|
||||
lock(SimulationLock)
|
||||
d.WorldQuickStep(world, ODE_STEPSIZE);
|
||||
|
||||
if (CollectStats)
|
||||
|
@ -3377,6 +3380,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
[HandleProcessCorruptedStateExceptions]
|
||||
public override void Dispose()
|
||||
{
|
||||
lock(SimulationLock)
|
||||
lock(OdeLock)
|
||||
{
|
||||
if(world == IntPtr.Zero)
|
||||
|
@ -3425,7 +3429,6 @@ namespace OpenSim.Region.PhysicsModule.ODE
|
|||
{
|
||||
m_log.ErrorFormat("[ODE SCENE]: exception {0}", e.Message);
|
||||
}
|
||||
//d.CloseODE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue