From 5b6eba968b25dae5c58b760990e1f0969b9c9193 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 9 Mar 2008 16:32:44 +0000 Subject: * Fixed the Link + Duplicate + Unlink both = 'ODE Invalid Argument in Collision Space Crash' * Added: Console comment: [PHYSICS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 58 +++++++++++++++------------ OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 8 +++- 2 files changed, 39 insertions(+), 27 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 8a8a5fb..3adf773 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -696,45 +696,51 @@ namespace OpenSim.Region.Physics.OdePlugin public void ProcessTaints(float timestep) { - + if (m_taintadd) { changeadd(timestep); } + if (prim_geom != (IntPtr)0) + { + if (m_taintposition != _position) + Move(timestep); - if (m_taintposition != _position) - Move(timestep); - - if (m_taintrot != _orientation) - rotate(timestep); - // + if (m_taintrot != _orientation) + rotate(timestep); + // - if (m_taintPhysics != m_isphysical) - changePhysicsStatus(timestep); - // + if (m_taintPhysics != m_isphysical) + changePhysicsStatus(timestep); + // - if (m_taintsize != _size) - changesize(timestep); - // + if (m_taintsize != _size) + changesize(timestep); + // - if (m_taintshape) - changeshape(timestep); - // + if (m_taintshape) + changeshape(timestep); + // - if (m_taintforce) - changeAddForce(timestep); + if (m_taintforce) + changeAddForce(timestep); - if (m_taintdisable) - changedisable(timestep); + if (m_taintdisable) + changedisable(timestep); - if (m_taintselected != m_isSelected) - changeSelectedStatus(timestep); + if (m_taintselected != m_isSelected) + changeSelectedStatus(timestep); - if (m_taintVelocity != PhysicsVector.Zero) - changevelocity(timestep); + if (m_taintVelocity != PhysicsVector.Zero) + changevelocity(timestep); - if (m_taintparent != _parent) - changelink(timestep); + if (m_taintparent != _parent) + changelink(timestep); + } + else + { + m_log.Error("[PHYISCS]: The scene reused a disposed PhysActor! *waves finger*, Don't be evil."); + } } private void changelink(float timestep) diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 5b1fd78..fc71802 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -238,7 +238,8 @@ namespace OpenSim.Region.Physics.OdePlugin internal void waitForSpaceUnlock(IntPtr space) { - while (d.SpaceLockQuery(space)){ } // Wait and do nothing + if (space != (IntPtr)0) + while (d.SpaceLockQuery(space)){ } // Wait and do nothing } /// @@ -1014,6 +1015,11 @@ namespace OpenSim.Region.Physics.OdePlugin System.Threading.Thread.Sleep(20); if (currentspace != space) { + m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString()); + if (currentspace == (IntPtr) 0) + { + int adfadf = 0; + } if (d.SpaceQuery(currentspace, geom) && currentspace != (IntPtr) 0) { if (d.GeomIsSpace(currentspace)) -- cgit v1.1