From baed19d0688fe03fe8fba233bc6bd8306c71779f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 18 Oct 2009 16:48:44 -0700 Subject: A bit of instrumentation to figure out what's going on with physics actors. --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 9 ++++++++- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 1fff846..ef0e56e 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -139,8 +139,14 @@ namespace OpenSim.Region.Physics.OdePlugin public int m_eventsubscription = 0; private CollisionEventUpdate CollisionEventsThisFrame = new CollisionEventUpdate(); + // unique UUID of this character object + public UUID m_uuid; + public bool bad = false; + public OdeCharacter(String avName, OdeScene parent_scene, PhysicsVector pos, CollisionLocker dode, PhysicsVector size, float pid_d, float pid_p, float capsule_radius, float tensor, float density, float height_fudge_factor, float walk_divisor, float rundivisor) { + m_uuid = UUID.Random(); + // ode = dode; _velocity = new PhysicsVector(); _target_velocity = new PhysicsVector(); @@ -1112,10 +1118,11 @@ namespace OpenSim.Region.Physics.OdePlugin } catch (NullReferenceException) { + bad = true; _parent_scene.BadCharacter(this); vec = new d.Vector3(_position.X, _position.Y, _position.Z); base.RaiseOutOfBounds(_position); // Tells ScenePresence that there's a problem! - m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar: {0}", m_name); + m_log.WarnFormat("[ODEPLUGIN]: Avatar Null reference for Avatar {0}, physical actor {1}", m_name, m_uuid); } diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 0e03e81..7187fbe 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -1664,6 +1664,8 @@ namespace OpenSim.Region.Physics.OdePlugin if (!_characters.Contains(chr)) { _characters.Add(chr); + if (chr.bad) + m_log.DebugFormat("[PHYSICS] Added BAD actor {0} to characters list", chr.m_uuid); } } } @@ -2581,7 +2583,11 @@ namespace OpenSim.Region.Physics.OdePlugin lock (_taintedActors) { if (!(_taintedActors.Contains(taintedchar))) + { _taintedActors.Add(taintedchar); + if (taintedchar.bad) + m_log.DebugFormat("[PHYSICS]: Added BAD actor {0} to tainted actors", taintedchar.m_uuid); + } } } } -- cgit v1.1 From 2dd8a6beaca5a53039d2068db1cebfd7fd095943 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 19 Oct 2009 14:48:17 -0700 Subject: More instrumentation in physics. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 7187fbe..f7f1f69 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -2986,6 +2986,8 @@ namespace OpenSim.Region.Physics.OdePlugin foreach (OdeCharacter actor in _characters) { if (actor != null) + if (actor.bad) + m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid); actor.UpdatePositionAndVelocity(); } } -- cgit v1.1 From 590d91e57251cc35b3ce15bb60784249a1c3b15c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 19 Oct 2009 15:03:55 -0700 Subject: Forgot {} on last commit. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index f7f1f69..aba3667 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -2986,9 +2986,11 @@ namespace OpenSim.Region.Physics.OdePlugin foreach (OdeCharacter actor in _characters) { if (actor != null) + { if (actor.bad) m_log.WarnFormat("[PHYSICS]: BAD Actor {0} in _characters list was not removed?", actor.m_uuid); actor.UpdatePositionAndVelocity(); + } } } -- cgit v1.1 From 8151190a45b98645efb06ea28b1758ffbc75cf7e Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 20 Oct 2009 10:56:15 -0700 Subject: * Removing ODEPrim and ODECharacter GetHashCode() overrides since they were based on something that could change * Tweaked a few other GetHashCode() overrides to bring them in line with MSDN recommendations --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 5 ----- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 5 ----- 2 files changed, 10 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index ef0e56e..71ace16 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -231,11 +231,6 @@ namespace OpenSim.Region.Physics.OdePlugin set { m_localID = value; } } - public override int GetHashCode() - { - return (int)m_localID; - } - public override bool Grabbed { set { return; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 63bfc90..4581d22 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -259,11 +259,6 @@ namespace OpenSim.Region.Physics.OdePlugin m_localID = value; } } - public override int GetHashCode() - { - return (int)m_localID; - } - public override bool Grabbed { set { return; } -- cgit v1.1