From 2f4a729d408acfd311c8b7bc53d2cbff9d2ddfad Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 29 Jun 2013 06:42:38 -0700 Subject: BulletSim: add inTaintTime parameter to collision cache clear function. --- OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 6437b04..d17c8e7 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs @@ -706,7 +706,7 @@ public static class BSParam new ParameterDefn("ResetBroadphasePool", "Setting this is any value resets the broadphase collision pool", 0f, (s) => { return 0f; }, - (s,v) => { BSParam.ResetBroadphasePoolTainted(s, v); } ), + (s,v) => { BSParam.ResetBroadphasePoolTainted(s, v, false /* inTaintTime */); } ), new ParameterDefn("ResetConstraintSolver", "Setting this is any value resets the constraint solver", 0f, (s) => { return 0f; }, @@ -792,10 +792,10 @@ public static class BSParam // ===================================================================== // There are parameters that, when set, cause things to happen in the physics engine. // This causes the broadphase collision cache to be cleared. - private static void ResetBroadphasePoolTainted(BSScene pPhysScene, float v) + private static void ResetBroadphasePoolTainted(BSScene pPhysScene, float v, bool inTaintTime) { BSScene physScene = pPhysScene; - physScene.TaintedObject("BSParam.ResetBroadphasePoolTainted", delegate() + physScene.TaintedObject(inTaintTime, "BSParam.ResetBroadphasePoolTainted", delegate() { physScene.PE.ResetBroadphasePool(physScene.World); }); -- cgit v1.1 From 23516717e48095011c1c06d64785ef7d91754ff2 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 30 Jun 2013 13:39:58 -0700 Subject: BulletSim: a better version of llMoveToTarget that doesn't go crazy. There is still some overshoot but mostly fixes Mantis 6693. Fix bug where moveToTarget was active for non-physical objects and while selected. Fix bug where move target was not getting changed if the script changed the target during a move. --- .../Physics/BulletSPlugin/BSActorMoveToTarget.cs | 80 +++++++++++++++++++--- .../Region/Physics/BulletSPlugin/BSCharacter.cs | 2 +- OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs | 15 ++-- .../Region/Physics/BulletSPlugin/BSPhysObject.cs | 1 + OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 19 ++++- 5 files changed, 98 insertions(+), 19 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs index 75ff24e..bdf4bc0 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorMoveToTarget.cs @@ -50,7 +50,8 @@ public class BSActorMoveToTarget : BSActor // BSActor.isActive public override bool isActive { - get { return Enabled; } + // MoveToTarget only works on physical prims + get { return Enabled && m_controllingPrim.IsPhysicallyActive; } } // Release any connections and resources used by the actor. @@ -102,16 +103,28 @@ public class BSActorMoveToTarget : BSActor // We're taking over after this. m_controllingPrim.ZeroMotion(true); - m_targetMotor = new BSVMotor("BSActorMoveToTargget.Activate", - m_controllingPrim.MoveToTargetTau, // timeScale - BSMotor.Infinite, // decay time scale - 1f // efficiency + /* Someday use the PID controller + m_targetMotor = new BSPIDVMotor("BSActorMoveToTarget-" + m_controllingPrim.LocalID.ToString()); + m_targetMotor.TimeScale = m_controllingPrim.MoveToTargetTau; + m_targetMotor.Efficiency = 1f; + */ + m_targetMotor = new BSVMotor("BSActorMoveToTarget-" + m_controllingPrim.LocalID.ToString(), + m_controllingPrim.MoveToTargetTau, // timeScale + BSMotor.Infinite, // decay time scale + 1f // efficiency ); m_targetMotor.PhysicsScene = m_physicsScene; // DEBUG DEBUG so motor will output detail log messages. m_targetMotor.SetTarget(m_controllingPrim.MoveToTargetTarget); m_targetMotor.SetCurrent(m_controllingPrim.RawPosition); - m_physicsScene.BeforeStep += Mover; + // m_physicsScene.BeforeStep += Mover; + m_physicsScene.BeforeStep += Mover2; + } + else + { + // If already allocated, make sure the target and other paramters are current + m_targetMotor.SetTarget(m_controllingPrim.MoveToTargetTarget); + m_targetMotor.SetCurrent(m_controllingPrim.RawPosition); } } @@ -119,12 +132,16 @@ public class BSActorMoveToTarget : BSActor { if (m_targetMotor != null) { - m_physicsScene.BeforeStep -= Mover; + // m_physicsScene.BeforeStep -= Mover; + m_physicsScene.BeforeStep -= Mover2; m_targetMotor = null; } } - // Called just before the simulation step. Update the vertical position for hoverness. + // Origional mover that set the objects position to move to the target. + // The problem was that gravity would keep trying to push the object down so + // the overall downward velocity would increase to infinity. + // Called just before the simulation step. private void Mover(float timeStep) { // Don't do hovering while the object is selected. @@ -142,6 +159,7 @@ public class BSActorMoveToTarget : BSActor m_physicsScene.DetailLog("{0},BSActorMoveToTarget.Mover,zeroMovement,movePos={1},pos={2},mass={3}", m_controllingPrim.LocalID, movePosition, m_controllingPrim.RawPosition, m_controllingPrim.Mass); m_controllingPrim.ForcePosition = m_targetMotor.TargetValue; + m_controllingPrim.ForceVelocity = OMV.Vector3.Zero; // Setting the position does not cause the physics engine to generate a property update. Force it. m_physicsScene.PE.PushUpdate(m_controllingPrim.PhysBody); } @@ -151,7 +169,51 @@ public class BSActorMoveToTarget : BSActor // Setting the position does not cause the physics engine to generate a property update. Force it. m_physicsScene.PE.PushUpdate(m_controllingPrim.PhysBody); } - m_physicsScene.DetailLog("{0},BSActorMoveToTarget.Mover,move,fromPos={1},movePos={2}", m_controllingPrim.LocalID, origPosition, movePosition); + m_physicsScene.DetailLog("{0},BSActorMoveToTarget.Mover,move,fromPos={1},movePos={2}", + m_controllingPrim.LocalID, origPosition, movePosition); + } + + // Version of mover that applies forces to move the physical object to the target. + // Also overcomes gravity so the object doesn't just drop to the ground. + // Called just before the simulation step. + private void Mover2(float timeStep) + { + // Don't do hovering while the object is selected. + if (!isActive) + return; + + OMV.Vector3 origPosition = m_controllingPrim.RawPosition; // DEBUG DEBUG (for printout below) + OMV.Vector3 addedForce = OMV.Vector3.Zero; + + // CorrectionVector is the movement vector required this step + OMV.Vector3 correctionVector = m_targetMotor.Step(timeStep, m_controllingPrim.RawPosition); + + // If we are very close to our target, turn off the movement motor. + if (m_targetMotor.ErrorIsZero()) + { + m_physicsScene.DetailLog("{0},BSActorMoveToTarget.Mover3,zeroMovement,pos={1},mass={2}", + m_controllingPrim.LocalID, m_controllingPrim.RawPosition, m_controllingPrim.Mass); + m_controllingPrim.ForcePosition = m_targetMotor.TargetValue; + m_controllingPrim.ForceVelocity = OMV.Vector3.Zero; + // Setting the position does not cause the physics engine to generate a property update. Force it. + m_physicsScene.PE.PushUpdate(m_controllingPrim.PhysBody); + } + else + { + // First force to move us there -- the motor return a timestep scaled value. + addedForce = correctionVector / timeStep; + // Remove the existing velocity (only the moveToTarget force counts) + addedForce -= m_controllingPrim.RawVelocity; + // Overcome gravity. + addedForce -= m_controllingPrim.Gravity; + + // Add enough force to overcome the mass of the object + addedForce *= m_controllingPrim.Mass; + + m_controllingPrim.AddForce(addedForce, false /* pushForce */, true /* inTaintTime */); + } + m_physicsScene.DetailLog("{0},BSActorMoveToTarget.Mover3,move,fromPos={1},addedForce={2}", + m_controllingPrim.LocalID, origPosition, addedForce); } } } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 48f842e..5ef6992 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs @@ -626,7 +626,7 @@ public sealed class BSCharacter : BSPhysObject OMV.Vector3 addForce = force / PhysScene.LastTimeStep; AddForce(addForce, pushforce, false); } - private void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { + public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { if (force.IsFinite()) { OMV.Vector3 addForce = Util.ClampV(force, BSParam.MaxAddForceMagnitude); diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs index ef662b5..1214703 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSMotors.cs @@ -144,7 +144,6 @@ public class BSVMotor : BSMotor Vector3 correction = Vector3.Zero; Vector3 error = TargetValue - CurrentValue; - LastError = error; if (!ErrorIsZero(error)) { correction = StepError(timeStep, error); @@ -179,6 +178,7 @@ public class BSVMotor : BSMotor MDetailLog("{0}, BSVMotor.Step,zero,{1},origTgt={2},origCurr={3},currTgt={4},currCurr={5}", BSScene.DetailLogZero, UseName, origCurrVal, origTarget, TargetValue, CurrentValue); } + LastError = error; return correction; } @@ -293,7 +293,6 @@ public class BSFMotor : BSMotor float correction = 0f; float error = TargetValue - CurrentValue; - LastError = error; if (!ErrorIsZero(error)) { correction = StepError(timeStep, error); @@ -328,6 +327,7 @@ public class BSFMotor : BSMotor MDetailLog("{0}, BSFMotor.Step,zero,{1},origTgt={2},origCurr={3},ret={4}", BSScene.DetailLogZero, UseName, origCurrVal, origTarget, CurrentValue); } + LastError = error; return CurrentValue; } @@ -363,7 +363,7 @@ public class BSFMotor : BSMotor // ============================================================================ // ============================================================================ -// Proportional, Integral, Derivitive Motor +// Proportional, Integral, Derivitive ("PID") Motor // Good description at http://www.answers.com/topic/pid-controller . Includes processes for choosing p, i and d factors. public class BSPIDVMotor : BSVMotor { @@ -434,15 +434,14 @@ public class BSPIDVMotor : BSVMotor // A simple derivitive is the rate of change from the last error. Vector3 derivitive = (error - LastError) * timeStep; - LastError = error; // Correction = (proportionOfPresentError + accumulationOfPastError + rateOfChangeOfError) - Vector3 ret = error * timeStep * proportionFactor * FactorMix.X - + RunningIntegration * integralFactor * FactorMix.Y - + derivitive * derivFactor * FactorMix.Z + Vector3 ret = error / TimeScale * timeStep * proportionFactor * FactorMix.X + + RunningIntegration / TimeScale * integralFactor * FactorMix.Y + + derivitive / TimeScale * derivFactor * FactorMix.Z ; - MDetailLog("{0},BSPIDVMotor.step,ts={1},err={2},runnInt={3},deriv={4},ret={5}", + MDetailLog("{0}, BSPIDVMotor.step,ts={1},err={2},runnInt={3},deriv={4},ret={5}", BSScene.DetailLogZero, timeStep, error, RunningIntegration, derivitive, ret); return ret; diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index a4c5e08..a0d5c42 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs @@ -210,6 +210,7 @@ public abstract class BSPhysObject : PhysicsActor AddAngularForce(force, pushforce, false); } public abstract void AddAngularForce(OMV.Vector3 force, bool pushforce, bool inTaintTime); + public abstract void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime); public abstract OMV.Vector3 ForceRotationalVelocity { get; set; } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 95bdc7b..90f74df 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -450,6 +450,9 @@ public class BSPrim : BSPhysObject Gravity = ComputeGravity(Buoyancy); PhysScene.PE.SetGravity(PhysBody, Gravity); + OMV.Vector3 currentScale = PhysScene.PE.GetLocalScaling(PhysShape.physShapeInfo); // DEBUG DEBUG + DetailLog("{0},BSPrim.UpdateMassProperties,currentScale{1},shape={2}", LocalID, currentScale, PhysShape.physShapeInfo); // DEBUG DEBUG + Inertia = PhysScene.PE.CalculateLocalInertia(PhysShape.physShapeInfo, physMass); PhysScene.PE.SetMassProps(PhysBody, physMass, Inertia); PhysScene.PE.UpdateInertiaTensor(PhysBody); @@ -1040,6 +1043,20 @@ public class BSPrim : BSPhysObject } } + public override OMV.Vector3 PIDTarget + { + set + { + base.PIDTarget = value; + BSActor actor; + if (PhysicalActors.TryGetActor(MoveToTargetActorName, out actor)) + { + // if the actor exists, tell it to refresh its values. + actor.Refresh(); + } + + } + } // Used for llSetHoverHeight and maybe vehicle height // Hover Height will override MoveTo target's Z public override bool PIDHoverActive { @@ -1063,7 +1080,7 @@ public class BSPrim : BSPhysObject // Applying a force just adds this to the total force on the object. // This added force will only last the next simulation tick. - public void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { + public override void AddForce(OMV.Vector3 force, bool pushforce, bool inTaintTime) { // for an object, doesn't matter if force is a pushforce or not if (IsPhysicallyActive) { -- cgit v1.1 From 425d2a2a972de34c1853c6049727d4c0eea38af4 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 30 Jun 2013 13:48:27 -0700 Subject: BulletSim: set linkset type to be prim specific rather than a simulator wide default. This allows individual prims to differ in the underlying linkset implementation. --- OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs | 16 ++++------------ .../Region/Physics/BulletSPlugin/BSLinksetCompound.cs | 2 -- OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs | 5 ++++- 3 files changed, 8 insertions(+), 15 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs index 76c2187..ad8e10f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinkset.cs @@ -33,14 +33,6 @@ using OMV = OpenMetaverse; namespace OpenSim.Region.Physics.BulletSPlugin { -// A BSPrim can get individual information about its linkedness attached -// to it through an instance of a subclass of LinksetInfo. -// Each type of linkset will define the information needed for its type. -public abstract class BSLinksetInfo -{ - public virtual void Clear() { } -} - public abstract class BSLinkset { // private static string LogHeader = "[BULLETSIM LINKSET]"; @@ -56,15 +48,15 @@ public abstract class BSLinkset { BSLinkset ret = null; - switch ((int)BSParam.LinksetImplementation) + switch (parent.LinksetType) { - case (int)LinksetImplementation.Constraint: + case LinksetImplementation.Constraint: ret = new BSLinksetConstraints(physScene, parent); break; - case (int)LinksetImplementation.Compound: + case LinksetImplementation.Compound: ret = new BSLinksetCompound(physScene, parent); break; - case (int)LinksetImplementation.Manual: + case LinksetImplementation.Manual: // ret = new BSLinksetManual(physScene, parent); break; default: diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs index 350a5d1..308cf13 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSLinksetCompound.cs @@ -238,7 +238,6 @@ public sealed class BSLinksetCompound : BSLinkset // there will already be a rebuild scheduled. DetailLog("{0},BSLinksetCompound.UpdateProperties,couldNotUpdateChild.schedulingRebuild,whichUpdated={1}", updated.LocalID, whichUpdated); - updated.LinksetInfo = null; // setting to 'null' causes relative position to be recomputed. ScheduleRebuild(updated); } } @@ -294,7 +293,6 @@ public sealed class BSLinksetCompound : BSLinkset child.LocalID, child.PhysBody.AddrString); // Cause the child's body to be rebuilt and thus restored to normal operation - child.LinksetInfo = null; child.ForceBodyShapeRebuild(false); if (!HasAnyChildren) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs index 235da78..87eed98 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs @@ -41,12 +41,15 @@ public class BSPrimLinkable : BSPrimDisplaced // The index of this child prim. public int LinksetChildIndex { get; set; } - public BSLinksetInfo LinksetInfo { get; set; } + public BSLinkset.LinksetImplementation LinksetType { get; set; } public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size, OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical) : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical) { + // Default linkset implementation for this prim + LinksetType = (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation; + Linkset = BSLinkset.Factory(PhysScene, this); PhysScene.TaintedObject("BSPrimLinksetCompound.Refresh", delegate() -- cgit v1.1 From 9d5ae759504f01dceac5d3f859da1e43e28797ad Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 30 Jun 2013 17:06:27 -0700 Subject: BulletSim: remove the handle to the vehicle actor and cause routines that need it to look it up. --- OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 70 ++++++++++++++++------ .../Physics/BulletSPlugin/Tests/BasicVehicles.cs | 32 +++++----- 2 files changed, 70 insertions(+), 32 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 90f74df..b2947c6 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs @@ -70,18 +70,17 @@ public class BSPrim : BSPhysObject private int CrossingFailures { get; set; } // Keep a handle to the vehicle actor so it is easy to set parameters on same. - public BSDynamics VehicleActor; public const string VehicleActorName = "BasicVehicle"; // Parameters for the hover actor - public const string HoverActorName = "HoverActor"; + public const string HoverActorName = "BSPrim.HoverActor"; // Parameters for the axis lock actor public const String LockedAxisActorName = "BSPrim.LockedAxis"; // Parameters for the move to target actor - public const string MoveToTargetActorName = "MoveToTargetActor"; + public const string MoveToTargetActorName = "BSPrim.MoveToTargetActor"; // Parameters for the setForce and setTorque actors - public const string SetForceActorName = "SetForceActor"; - public const string SetTorqueActorName = "SetTorqueActor"; + public const string SetForceActorName = "BSPrim.SetForceActor"; + public const string SetTorqueActorName = "BSPrim.SetTorqueActor"; public BSPrim(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size, OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical) @@ -100,9 +99,8 @@ public class BSPrim : BSPhysObject _isPhysical = pisPhysical; _isVolumeDetect = false; - // We keep a handle to the vehicle actor so we can set vehicle parameters later. - VehicleActor = new BSDynamics(PhysScene, this, VehicleActorName); - PhysicalActors.Add(VehicleActorName, VehicleActor); + // Add a dynamic vehicle to our set of actors that can move this prim. + PhysicalActors.Add(VehicleActorName, new BSDynamics(PhysScene, this, VehicleActorName)); _mass = CalculateMass(); @@ -505,9 +503,25 @@ public class BSPrim : BSPhysObject } } + // Find and return a handle to the current vehicle actor. + // Return 'null' if there is no vehicle actor. + public BSDynamics GetVehicleActor() + { + BSDynamics ret = null; + BSActor actor; + if (PhysicalActors.TryGetActor(VehicleActorName, out actor)) + { + ret = actor as BSDynamics; + } + return ret; + } public override int VehicleType { get { - return (int)VehicleActor.Type; + int ret = (int)Vehicle.TYPE_NONE; + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + ret = (int)vehicleActor.Type; + return ret; } set { Vehicle type = (Vehicle)value; @@ -518,8 +532,12 @@ public class BSPrim : BSPhysObject // change all the parameters. Like a plane changing to CAR when on the // ground. In this case, don't want to zero motion. // ZeroMotion(true /* inTaintTime */); - VehicleActor.ProcessTypeChange(type); - ActivateIfPhysical(false); + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + { + vehicleActor.ProcessTypeChange(type); + ActivateIfPhysical(false); + } }); } } @@ -527,31 +545,47 @@ public class BSPrim : BSPhysObject { PhysScene.TaintedObject("BSPrim.VehicleFloatParam", delegate() { - VehicleActor.ProcessFloatVehicleParam((Vehicle)param, value); - ActivateIfPhysical(false); + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + { + vehicleActor.ProcessFloatVehicleParam((Vehicle)param, value); + ActivateIfPhysical(false); + } }); } public override void VehicleVectorParam(int param, OMV.Vector3 value) { PhysScene.TaintedObject("BSPrim.VehicleVectorParam", delegate() { - VehicleActor.ProcessVectorVehicleParam((Vehicle)param, value); - ActivateIfPhysical(false); + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + { + vehicleActor.ProcessVectorVehicleParam((Vehicle)param, value); + ActivateIfPhysical(false); + } }); } public override void VehicleRotationParam(int param, OMV.Quaternion rotation) { PhysScene.TaintedObject("BSPrim.VehicleRotationParam", delegate() { - VehicleActor.ProcessRotationVehicleParam((Vehicle)param, rotation); - ActivateIfPhysical(false); + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + { + vehicleActor.ProcessRotationVehicleParam((Vehicle)param, rotation); + ActivateIfPhysical(false); + } }); } public override void VehicleFlags(int param, bool remove) { PhysScene.TaintedObject("BSPrim.VehicleFlags", delegate() { - VehicleActor.ProcessVehicleFlags(param, remove); + BSDynamics vehicleActor = GetVehicleActor(); + if (vehicleActor != null) + { + vehicleActor.ProcessVehicleFlags(param, remove); + } }); } diff --git a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs index b040e21..583c436 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/Tests/BasicVehicles.cs @@ -114,21 +114,25 @@ public class BasicVehicles : OpenSimTestCase // Instead the appropriate values are set and calls are made just the parts of the // controller we want to exercise. Stepping the physics engine then applies // the actions of that one feature. - TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency); - TestVehicle.VehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale); - TestVehicle.VehicleActor.enableAngularVerticalAttraction = true; - - TestVehicle.IsPhysical = true; - PhysicsScene.ProcessTaints(); - - // Step the simulator a bunch of times and vertical attraction should orient the vehicle up - for (int ii = 0; ii < simSteps; ii++) + BSDynamics vehicleActor = TestVehicle.GetVehicleActor(); + if (vehicleActor != null) { - TestVehicle.VehicleActor.ForgetKnownVehicleProperties(); - TestVehicle.VehicleActor.ComputeAngularVerticalAttraction(); - TestVehicle.VehicleActor.PushKnownChanged(); - - PhysicsScene.Simulate(simulationTimeStep); + vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_EFFICIENCY, efficiency); + vehicleActor.ProcessFloatVehicleParam(Vehicle.VERTICAL_ATTRACTION_TIMESCALE, timeScale); + vehicleActor.enableAngularVerticalAttraction = true; + + TestVehicle.IsPhysical = true; + PhysicsScene.ProcessTaints(); + + // Step the simulator a bunch of times and vertical attraction should orient the vehicle up + for (int ii = 0; ii < simSteps; ii++) + { + vehicleActor.ForgetKnownVehicleProperties(); + vehicleActor.ComputeAngularVerticalAttraction(); + vehicleActor.PushKnownChanged(); + + PhysicsScene.Simulate(simulationTimeStep); + } } TestVehicle.IsPhysical = false; -- cgit v1.1 From c24c99f4bab0ef2e926ebc46235ffed25fdd9add Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 30 Jun 2013 19:08:15 -0700 Subject: BulletSim: fix an occasional crash with flushing log files. --- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index dec6b6f..155d143 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -223,8 +223,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters // can be left in and every call doesn't have to check for null. if (m_physicsLoggingEnabled) { - PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes); - PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output error messages. + PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush); + PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output its own error messages. } else { @@ -1106,8 +1106,6 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters public void DetailLog(string msg, params Object[] args) { PhysicsLogging.Write(msg, args); - // Add the Flush() if debugging crashes. Gets all the messages written out. - if (m_physicsLoggingDoFlush) PhysicsLogging.Flush(); } // Used to fill in the LocalID when there isn't one. It's the correct number of characters. public const string DetailLogZero = "0000000000"; -- cgit v1.1 From 8eb86c9ec91ee41699ab455fc5e788a4bff53071 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 30 Jun 2013 19:22:43 -0700 Subject: BulletSim: add the reset of the last commit for flush log file problems. Fix small typo in one log message. --- OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs | 2 +- OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs index 07e87d1..aa247dd 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs @@ -1276,7 +1276,7 @@ namespace OpenSim.Region.Physics.BulletSPlugin VehicleAddForce(appliedGravity); - VDetailLog("{0}, MoveLinear,applyGravity,vehGrav={1},collid={2},fudge={3},mass={4},appliedForce={3}", + VDetailLog("{0}, MoveLinear,applyGravity,vehGrav={1},collid={2},fudge={3},mass={4},appliedForce={5}", ControllingPrim.LocalID, m_VehicleGravity, ControllingPrim.IsColliding, BSParam.VehicleGroundGravityFudge, m_vehicleMass, appliedGravity); } diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 155d143..1645c98 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs @@ -223,7 +223,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters // can be left in and every call doesn't have to check for null. if (m_physicsLoggingEnabled) { - PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush); + PhysicsLogging = new Logging.LogWriter(m_physicsLoggingDir, m_physicsLoggingPrefix, m_physicsLoggingFileMinutes, m_physicsLoggingDoFlush); PhysicsLogging.ErrorLogger = m_log; // for DEBUG. Let's the logger output its own error messages. } else -- cgit v1.1 From 635704b7ef739d553a2354bc1bde6c9588c04cad Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 1 Jul 2013 23:54:04 +0100 Subject: Update debug unknown user name UserUMMTGUN3 to UserUMMTGUN4 and UserUMMAU -> UserUMMAU2 to track any new occurences. This is to see the impact that Diva's fixes related to this issue (last one is currently commit c7383688) You will need to clear your viewer cache for this to have any effect Relates to http://opensimulator.org/mantis/view.php?id=6625 --- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 194b591..5da64f7 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -320,7 +320,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement else { names[0] = "Unknown"; - names[1] = "UserUMMTGUN3"; + names[1] = "UserUMMTGUN4"; return false; } @@ -537,7 +537,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement else { user.FirstName = "Unknown"; - user.LastName = "UserUMMAU"; + user.LastName = "UserUMMAU2"; } AddUserInternal(user); -- cgit v1.1 From ccca0059695e0321ae1aa223c9e8b89cc141b58f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 13:29:44 -0700 Subject: HG: close a loophole by which if something was wrong with the ServiceURLs it resulted in never ending asset requests --- OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs | 2 +- .../CoreModules/Framework/InventoryAccess/HGAssetMapper.cs | 9 +++++++++ .../Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs index a168bfe..4d0568d 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/J2KImage.cs @@ -421,7 +421,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP // foreign user is visiting, we need to try again after the first fail to the local // asset service. string assetServerURL = string.Empty; - if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL)) + if (InventoryAccessModule.IsForeignUser(AgentID, out assetServerURL) && !string.IsNullOrEmpty(assetServerURL)) { if (!assetServerURL.EndsWith("/") && !assetServerURL.EndsWith("=")) assetServerURL = assetServerURL + "/"; diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs index 7871eda..144895c 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs @@ -73,6 +73,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess private AssetMetadata FetchMetadata(string url, UUID assetID) { + if (string.IsNullOrEmpty(url)) + return null; + if (!url.EndsWith("/") && !url.EndsWith("=")) url = url + "/"; @@ -92,6 +95,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess AssetBase asset = m_scene.AssetService.Get(assetID.ToString()); if (asset == null) { + if (string.IsNullOrEmpty(url)) + return null; + if (!url.EndsWith("/") && !url.EndsWith("=")) url = url + "/"; @@ -109,6 +115,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess public bool PostAsset(string url, AssetBase asset) { + if (string.IsNullOrEmpty(url)) + return false; + if (asset != null) { if (!url.EndsWith("/") && !url.EndsWith("=")) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index b2b628d..64d5f61 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -297,7 +297,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (m_Scene.TryGetScenePresence(userID, out sp)) { AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode); - if (aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) + if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI")) { assetServerURL = aCircuit.ServiceURLs["AssetServerURI"].ToString(); assetServerURL = assetServerURL.Trim(new char[] { '/' }); -- cgit v1.1 From e984bfb4c63718d5176b17f6beea46f4512cf304 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 14:31:39 -0700 Subject: This should have a strong effect on the Unknown User issue mantis #6625 --- OpenSim/Data/IGridUserData.cs | 1 + OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 7 ++++++- OpenSim/Data/MySQL/MySQLGridUserData.cs | 7 +++++-- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 4 ++++ .../Framework/UserManagement/UserManagementModule.cs | 20 ++++++++++++++++++-- .../Services/UserAccountService/GridUserService.cs | 17 ++++++++++++++++- 6 files changed, 50 insertions(+), 6 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/IGridUserData.cs b/OpenSim/Data/IGridUserData.cs index e15a1f8..9afa477 100644 --- a/OpenSim/Data/IGridUserData.cs +++ b/OpenSim/Data/IGridUserData.cs @@ -50,6 +50,7 @@ namespace OpenSim.Data public interface IGridUserData { GridUserData Get(string userID); + GridUserData[] GetAll(string query); bool Store(GridUserData data); } } \ No newline at end of file diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index 9e215f9..df73e5b 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -50,7 +50,7 @@ namespace OpenSim.Data.MSSQL { } - public GridUserData Get(string userID) + public new GridUserData Get(string userID) { GridUserData[] ret = Get("UserID", userID); @@ -60,5 +60,10 @@ namespace OpenSim.Data.MSSQL return ret[0]; } + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } + } } diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index a9ce94d..df1ecc6 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -46,7 +46,7 @@ namespace OpenSim.Data.MySQL public MySQLGridUserData(string connectionString, string realm) : base(connectionString, realm, "GridUserStore") {} - public GridUserData Get(string userID) + public new GridUserData Get(string userID) { GridUserData[] ret = Get("UserID", userID); @@ -56,6 +56,9 @@ namespace OpenSim.Data.MySQL return ret[0]; } - + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } } } \ No newline at end of file diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 1bb5ed8..54cef1a 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -56,6 +56,10 @@ namespace OpenSim.Data.SQLite return ret[0]; } + public GridUserData[] GetAll(string userID) + { + return base.Get("UserID LIKE {0}%", userID); + } } } \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 5da64f7..a1343fb 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -319,8 +319,25 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement } else { + // Let's try the GridUser service + GridUserInfo uInfo = m_Scenes[0].GridUserService.GetGridUserInfo(uuid.ToString()); + if (uInfo != null) + { + string url, first, last, tmp; + UUID u; + if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) + { + AddUser(uuid, first, last, url); + + names[0] = m_UserCache[uuid].FirstName; + names[1] = m_UserCache[uuid].LastName; + + return true; + } + } + names[0] = "Unknown"; - names[1] = "UserUMMTGUN4"; + names[1] = "UserUMMTGUN5"; return false; } @@ -474,7 +491,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement //m_log.DebugFormat("[USER MANAGEMENT MODULE]: Adding user with id {0}, creatorData {1}", id, creatorData); UserData oldUser; - //lock the whole block - prevent concurrent update lock (m_UserCache) m_UserCache.TryGetValue(id, out oldUser); diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 8388180..62b82fe 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -51,7 +51,22 @@ namespace OpenSim.Services.UserAccountService public virtual GridUserInfo GetGridUserInfo(string userID) { - GridUserData d = m_Database.Get(userID); + GridUserData d = null; + if (userID.Length > 36) // it's a UUI + d = m_Database.Get(userID); + else // it's a UUID + { + GridUserData[] ds = m_Database.GetAll(userID); + if (ds == null) + return null; + if (ds.Length > 0) + { + d = ds[0]; + foreach (GridUserData dd in ds) + if (dd.UserID.Length > d.UserID.Length) // find the longest + d = dd; + } + } if (d == null) return null; -- cgit v1.1 From 626940ceb83102a6aa0eebb81e10c86f1feb8eff Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:39:10 -0700 Subject: More debug messages --- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 7 ++++++- OpenSim/Services/UserAccountService/GridUserService.cs | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index a1343fb..ff31b67 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -323,6 +323,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement GridUserInfo uInfo = m_Scenes[0].GridUserService.GetGridUserInfo(uuid.ToString()); if (uInfo != null) { + m_log.DebugFormat("[USER MANAGEMENT MODULE]: Found grid user {0}", uInfo.UserID); string url, first, last, tmp; UUID u; if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) @@ -334,10 +335,14 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement return true; } + else + m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI"); } + else + m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found"); names[0] = "Unknown"; - names[1] = "UserUMMTGUN5"; + names[1] = "UserUMMTGUN6"; return false; } diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index 62b82fe..af2701d 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -46,7 +46,7 @@ namespace OpenSim.Services.UserAccountService public GridUserService(IConfigSource config) : base(config) { - m_log.Debug("[USER GRID SERVICE]: Starting user grid service"); + m_log.Debug("[GRID USER SERVICE]: Starting user grid service"); } public virtual GridUserInfo GetGridUserInfo(string userID) @@ -58,13 +58,17 @@ namespace OpenSim.Services.UserAccountService { GridUserData[] ds = m_Database.GetAll(userID); if (ds == null) + { + m_log.DebugFormat("[GRID USER SERVICE]: user not found {0}", userID); return null; + } if (ds.Length > 0) { d = ds[0]; foreach (GridUserData dd in ds) if (dd.UserID.Length > d.UserID.Length) // find the longest d = dd; + m_log.DebugFormat("[GRID USER SERVICE]: Found user {0}", d.UserID); } } -- cgit v1.1 From 2c05caec7fcf14c7e61c2f66854fc24f06d5b480 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:47:02 -0700 Subject: Really make it call the method with the query interface --- OpenSim/Data/MySQL/MySQLGridUserData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index df1ecc6..f476fd2 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } } \ No newline at end of file -- cgit v1.1 From 9725b829d5e476fc6b0894b46520ff1d7aba9936 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 15:48:30 -0700 Subject: Do the same for SQLite and MSSQL --- OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 2 +- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index df73e5b..7d10955 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -62,7 +62,7 @@ namespace OpenSim.Data.MSSQL public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 54cef1a..799df91 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite public GridUserData[] GetAll(string userID) { - return base.Get("UserID LIKE {0}%", userID); + return base.Get(String.Format("UserID LIKE {0}%", userID)); } } -- cgit v1.1 From 316e8f92391f561d459bc6240ccd78b0a98c20c6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 16:10:09 -0700 Subject: Fix SQL statement --- OpenSim/Data/MSSQL/MSSQLGridUserData.cs | 2 +- OpenSim/Data/MySQL/MySQLGridUserData.cs | 2 +- OpenSim/Data/SQLite/SQLiteGridUserData.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs index 7d10955..8ec8d49 100644 --- a/OpenSim/Data/MSSQL/MSSQLGridUserData.cs +++ b/OpenSim/Data/MSSQL/MSSQLGridUserData.cs @@ -62,7 +62,7 @@ namespace OpenSim.Data.MSSQL public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } diff --git a/OpenSim/Data/MySQL/MySQLGridUserData.cs b/OpenSim/Data/MySQL/MySQLGridUserData.cs index f476fd2..00560c1 100644 --- a/OpenSim/Data/MySQL/MySQLGridUserData.cs +++ b/OpenSim/Data/MySQL/MySQLGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.MySQL public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } } \ No newline at end of file diff --git a/OpenSim/Data/SQLite/SQLiteGridUserData.cs b/OpenSim/Data/SQLite/SQLiteGridUserData.cs index 799df91..d8c52f8 100644 --- a/OpenSim/Data/SQLite/SQLiteGridUserData.cs +++ b/OpenSim/Data/SQLite/SQLiteGridUserData.cs @@ -58,7 +58,7 @@ namespace OpenSim.Data.SQLite public GridUserData[] GetAll(string userID) { - return base.Get(String.Format("UserID LIKE {0}%", userID)); + return base.Get(String.Format("UserID LIKE '{0}%'", userID)); } } -- cgit v1.1 From d01b8e163d14ee76c291565b5630d5049cde9b95 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Jul 2013 00:27:22 +0100 Subject: minor: Correct typo of "Descrition" to "Description" in "show object *" console commands Thanks to Ai Austin for pointing this out. --- .../Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index e434b2e..0e79733 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands { ConsoleDisplayList cdl = new ConsoleDisplayList(); cdl.AddRow("Name", so.Name); - cdl.AddRow("Descrition", so.Description); + cdl.AddRow("Description", so.Description); cdl.AddRow("Local ID", so.LocalId); cdl.AddRow("UUID", so.UUID); cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); -- cgit v1.1 From 4d24bf75fd695a12683987d9803018c2ec4cae60 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 16:46:35 -0700 Subject: Deleted debug messages. Fixed a null ref exception on the POST handler of GridUserServerPostHandler.cs --- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 5 ++--- OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs | 6 ++++-- OpenSim/Services/UserAccountService/GridUserService.cs | 5 +---- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index ff31b67..90af82e 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -323,7 +323,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement GridUserInfo uInfo = m_Scenes[0].GridUserService.GetGridUserInfo(uuid.ToString()); if (uInfo != null) { - m_log.DebugFormat("[USER MANAGEMENT MODULE]: Found grid user {0}", uInfo.UserID); string url, first, last, tmp; UUID u; if (Util.ParseUniversalUserIdentifier(uInfo.UserID, out u, out url, out first, out last, out tmp)) @@ -336,10 +335,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement return true; } else - m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI"); + m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI {0}", uInfo.UserID); } else - m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found"); + m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found {0}", uuid); names[0] = "Unknown"; names[1] = "UserUMMTGUN6"; diff --git a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs index 687cf8d..7483395 100644 --- a/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs +++ b/OpenSim/Server/Handlers/GridUser/GridUserServerPostHandler.cs @@ -185,10 +185,12 @@ namespace OpenSim.Server.Handlers.GridUser GridUserInfo guinfo = m_GridUserService.GetGridUserInfo(user); Dictionary result = new Dictionary(); - result["result"] = guinfo.ToKeyValuePairs(); + if (guinfo != null) + result["result"] = guinfo.ToKeyValuePairs(); + else + result["result"] = "null"; string xmlString = ServerUtils.BuildXmlResponse(result); - //m_log.DebugFormat("[GRID USER HANDLER]: resp string: {0}", xmlString); return Util.UTF8NoBomEncoding.GetBytes(xmlString); } diff --git a/OpenSim/Services/UserAccountService/GridUserService.cs b/OpenSim/Services/UserAccountService/GridUserService.cs index af2701d..fa9a4a8 100644 --- a/OpenSim/Services/UserAccountService/GridUserService.cs +++ b/OpenSim/Services/UserAccountService/GridUserService.cs @@ -58,17 +58,14 @@ namespace OpenSim.Services.UserAccountService { GridUserData[] ds = m_Database.GetAll(userID); if (ds == null) - { - m_log.DebugFormat("[GRID USER SERVICE]: user not found {0}", userID); return null; - } + if (ds.Length > 0) { d = ds[0]; foreach (GridUserData dd in ds) if (dd.UserID.Length > d.UserID.Length) // find the longest d = dd; - m_log.DebugFormat("[GRID USER SERVICE]: Found user {0}", d.UserID); } } -- cgit v1.1 From 119f84fe11586f9abf76325e9466c8cd8f0d1a72 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 2 Jul 2013 17:03:04 -0700 Subject: Squoosh one last opportunity for Unknown Users to creep in. --- .../Framework/UserManagement/UserManagementModule.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 90af82e..e19631e 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -532,7 +532,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement UserData user = new UserData(); user.Id = id; - if (creatorData != null && creatorData != string.Empty) + if (!string.IsNullOrEmpty(creatorData)) { //creatorData = ; @@ -553,14 +553,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement } if (parts.Length >= 2) user.FirstName = parts[1].Replace(' ', '.'); + + AddUserInternal(user); + } - else - { - user.FirstName = "Unknown"; - user.LastName = "UserUMMAU2"; - } + // else don't add the user to the cache, period. - AddUserInternal(user); } } -- cgit v1.1 From 25889b2d7ef08b27591aa61ab4950bdbc856d7a5 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 4 Jul 2013 00:02:53 +0100 Subject: change "debug packet" command to "debug lludp packet" to conform with other "debug lludp" options also moves the implementing code into LLUDPServer.cs along with other debug commands from OpenSim.cs gets all debug lludp commands to only activate for the set scene if not root --- OpenSim/Region/Application/OpenSim.cs | 51 ------------------- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 59 ++++++++++++++++++++++ OpenSim/Region/Framework/Scenes/SceneManager.cs | 23 --------- 3 files changed, 59 insertions(+), 74 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index 9325b12..6ff7f01 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -226,18 +226,6 @@ namespace OpenSim "Force the update of all objects on clients", HandleForceUpdate); - m_console.Commands.AddCommand("Debug", false, "debug packet", - "debug packet [ ]", - "Turn on packet debugging", - "If level > 255 then all incoming and outgoing packets are logged.\n" - + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" - + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" - + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" - + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" - + "If level <= 0 then no packets are logged.\n" - + "If an avatar name is given then only packets from that avatar are logged", - Debug); - m_console.Commands.AddCommand("General", false, "change region", "change region ", "Change current console region", ChangeSelectedRegion); @@ -701,45 +689,6 @@ namespace OpenSim RefreshPrompt(); } - /// - /// Turn on some debugging values for OpenSim. - /// - /// - protected void Debug(string module, string[] args) - { - if (args.Length == 1) - return; - - switch (args[1]) - { - case "packet": - string name = null; - if (args.Length == 5) - name = string.Format("{0} {1}", args[3], args[4]); - - if (args.Length > 2) - { - int newDebug; - if (int.TryParse(args[2], out newDebug)) - { - SceneManager.SetDebugPacketLevelOnCurrentScene(newDebug, name); - // We provide user information elsewhere if any clients had their debug level set. -// MainConsole.Instance.OutputFormat("Debug packet level set to {0}", newDebug); - } - else - { - MainConsole.Instance.Output("Usage: debug packet 0..255"); - } - } - - break; - - default: - MainConsole.Instance.Output("Unknown debug command"); - break; - } - } - // see BaseOpenSimServer /// /// Many commands list objects for debugging. Some of the types are listed here diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 8eb2e06..ff31ef5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -513,6 +513,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP EnablePoolStats(); MainConsole.Instance.Commands.AddCommand( + "Debug", false, "debug lludp packet", + "debug lludp packet [ ]", + "Turn on packet debugging", + "If level > 255 then all incoming and outgoing packets are logged.\n" + + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" + + "If level <= 200 then incoming RequestImage and outgoing ImagePacket, ImageData, LayerData and CoarseLocationUpdate packets are not logged.\n" + + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" + + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" + + "If level <= 0 then no packets are logged.\n" + + "If an avatar name is given then only packets from that avatar are logged", + HandlePacketCommand); + + MainConsole.Instance.Commands.AddCommand( "Debug", false, "debug lludp start", @@ -553,8 +566,45 @@ namespace OpenSim.Region.ClientStack.LindenUDP HandleStatusCommand); } + private void HandlePacketCommand(string module, string[] args) + { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) + return; + + string name = null; + + if (args.Length == 6) + name = string.Format("{0} {1}", args[4], args[5]); + + if (args.Length > 3) + { + int newDebug; + if (int.TryParse(args[3], out newDebug)) + { + m_scene.ForEachScenePresence(sp => + { + if (name == null || sp.Name == name) + { + m_log.DebugFormat( + "Packet debug for {0} ({1}) set to {2} in {3}", + sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_scene.Name); + + sp.ControllingClient.DebugPacketLevel = newDebug; + } + }); + } + else + { + MainConsole.Instance.Output("Usage: debug lludp packet 0..255 [ ]"); + } + } + } + private void HandleStartCommand(string module, string[] args) { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) + return; + if (args.Length != 4) { MainConsole.Instance.Output("Usage: debug lludp start "); @@ -572,6 +622,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void HandleStopCommand(string module, string[] args) { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) + return; + if (args.Length != 4) { MainConsole.Instance.Output("Usage: debug lludp stop "); @@ -589,6 +642,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void HandlePoolCommand(string module, string[] args) { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) + return; + if (args.Length != 4) { MainConsole.Instance.Output("Usage: debug lludp pool "); @@ -621,6 +677,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void HandleStatusCommand(string module, string[] args) { + if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) + return; + MainConsole.Instance.OutputFormat( "IN LLUDP packet processing for {0} is {1}", m_scene.Name, IsRunningInbound ? "enabled" : "disabled"); diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 780bd01..28f7896 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs @@ -477,29 +477,6 @@ namespace OpenSim.Region.Framework.Scenes return false; } - /// - /// Set the debug packet level on each current scene. This level governs which packets are printed out to the - /// console. - /// - /// - /// Name of avatar to debug - public void SetDebugPacketLevelOnCurrentScene(int newDebug, string name) - { - ForEachSelectedScene(scene => - scene.ForEachScenePresence(sp => - { - if (name == null || sp.Name == name) - { - m_log.DebugFormat( - "Packet debug for {0} ({1}) set to {2}", - sp.Name, sp.IsChildAgent ? "child" : "root", newDebug); - - sp.ControllingClient.DebugPacketLevel = newDebug; - } - }) - ); - } - public List GetCurrentSceneAvatars() { List avatars = new List(); -- cgit v1.1 From 27cdfb7b840423cf8cee08988dc487eeb34d71c7 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 08:47:45 -0700 Subject: HG Friends: debug an issue where the friends data stored in the DB is incomplete. --- OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 1 + OpenSim/Services/Friends/FriendsService.cs | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index ae45b99..d8f7dc9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -546,6 +546,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendsService.StoreFriend(agentID.ToString(), theFriendUUID, 1); // and also the converse FriendsService.StoreFriend(theFriendUUID, agentID.ToString(), 1); + m_log.DebugFormat("[HGFRIENDS MODULE]: Stored {0} {01}", agentID, theFriendUUID); //if (!confirming) //{ diff --git a/OpenSim/Services/Friends/FriendsService.cs b/OpenSim/Services/Friends/FriendsService.cs index e2033ac..dd3f733 100644 --- a/OpenSim/Services/Friends/FriendsService.cs +++ b/OpenSim/Services/Friends/FriendsService.cs @@ -29,6 +29,7 @@ using OpenMetaverse; using OpenSim.Framework; using System; using System.Collections.Generic; +using System.Reflection; using OpenSim.Services.Interfaces; using OpenSim.Data; using Nini.Config; @@ -39,7 +40,12 @@ namespace OpenSim.Services.Friends { public class FriendsService : FriendsServiceBase, IFriendsService { - public FriendsService(IConfigSource config) : base(config) + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + public FriendsService(IConfigSource config) + : base(config) { } @@ -98,6 +104,7 @@ namespace OpenSim.Services.Friends d.Data = new Dictionary(); d.Data["Flags"] = flags.ToString(); + m_log.DebugFormat("[FRIENDS]: Storing {0} {1}", PrincipalID, Friend); return m_Database.Store(d); } -- cgit v1.1 From 5eb78aad96f2dbaf7c4c0e5fa7e678076a2edbfc Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 09:17:01 -0700 Subject: Revert "HG Friends: debug an issue where the friends data stored in the DB is incomplete." This reverts commit 27cdfb7b840423cf8cee08988dc487eeb34d71c7. --- OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 1 - OpenSim/Services/Friends/FriendsService.cs | 9 +-------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index d8f7dc9..ae45b99 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -546,7 +546,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends FriendsService.StoreFriend(agentID.ToString(), theFriendUUID, 1); // and also the converse FriendsService.StoreFriend(theFriendUUID, agentID.ToString(), 1); - m_log.DebugFormat("[HGFRIENDS MODULE]: Stored {0} {01}", agentID, theFriendUUID); //if (!confirming) //{ diff --git a/OpenSim/Services/Friends/FriendsService.cs b/OpenSim/Services/Friends/FriendsService.cs index dd3f733..e2033ac 100644 --- a/OpenSim/Services/Friends/FriendsService.cs +++ b/OpenSim/Services/Friends/FriendsService.cs @@ -29,7 +29,6 @@ using OpenMetaverse; using OpenSim.Framework; using System; using System.Collections.Generic; -using System.Reflection; using OpenSim.Services.Interfaces; using OpenSim.Data; using Nini.Config; @@ -40,12 +39,7 @@ namespace OpenSim.Services.Friends { public class FriendsService : FriendsServiceBase, IFriendsService { - private static readonly ILog m_log = - LogManager.GetLogger( - MethodBase.GetCurrentMethod().DeclaringType); - - public FriendsService(IConfigSource config) - : base(config) + public FriendsService(IConfigSource config) : base(config) { } @@ -104,7 +98,6 @@ namespace OpenSim.Services.Friends d.Data = new Dictionary(); d.Data["Flags"] = flags.ToString(); - m_log.DebugFormat("[FRIENDS]: Storing {0} {1}", PrincipalID, Friend); return m_Database.Store(d); } -- cgit v1.1 From 16f40c1a15454fd6b093ae901c307670f12602fe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 4 Jul 2013 17:29:53 +0100 Subject: Add --default option to "debug lludp packet" command to allow packet logging to be performed immediately from client start --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 69 ++++++++++++++++------ 1 file changed, 52 insertions(+), 17 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index ff31ef5..82fad11 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -34,6 +34,7 @@ using System.Net.Sockets; using System.Reflection; using System.Threading; using log4net; +using NDesk.Options; using Nini.Config; using OpenMetaverse.Packets; using OpenSim.Framework; @@ -102,10 +103,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// public class LLUDPServer : OpenSimUDPBase { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// Maximum transmission unit, or UDP packet size, for the LLUDP protocol public const int MTU = 1400; - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + /// + /// Default packet debug level given to new clients + /// + public int DefaultClientPacketDebugLevel { get; set; } /// The measured resolution of Environment.TickCount public readonly float TickCountResolution; @@ -514,7 +520,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP MainConsole.Instance.Commands.AddCommand( "Debug", false, "debug lludp packet", - "debug lludp packet [ ]", + "debug lludp packet [--default] [ ]", "Turn on packet debugging", "If level > 255 then all incoming and outgoing packets are logged.\n" + "If level <= 255 then incoming AgentUpdate and outgoing SimStats and SimulatorViewerTimeMessage packets are not logged.\n" @@ -522,7 +528,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP + "If level <= 100 then incoming ViewerEffect and AgentAnimation and outgoing ViewerEffect and AvatarAnimation packets are not logged.\n" + "If level <= 50 then outgoing ImprovedTerseObjectUpdate packets are not logged.\n" + "If level <= 0 then no packets are logged.\n" - + "If an avatar name is given then only packets from that avatar are logged", + + "If --default is specified then the level becomes the default logging level for all subsequent agents.\n" + + "In this case, you cannot also specify an avatar name.\n" + + "If an avatar name is given then only packets from that avatar are logged.", HandlePacketCommand); MainConsole.Instance.Commands.AddCommand( @@ -571,31 +579,54 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (SceneManager.Instance.CurrentScene != null && SceneManager.Instance.CurrentScene != m_scene) return; + bool setAsDefaultLevel = false; + OptionSet optionSet = new OptionSet().Add("default", o => setAsDefaultLevel = o != null); + List filteredArgs = optionSet.Parse(args); + string name = null; - if (args.Length == 6) - name = string.Format("{0} {1}", args[4], args[5]); + if (filteredArgs.Count == 6) + { + if (!setAsDefaultLevel) + { + name = string.Format("{0} {1}", filteredArgs[4], filteredArgs[5]); + } + else + { + MainConsole.Instance.OutputFormat("ERROR: Cannot specify a user name when setting default logging level"); + return; + } + } - if (args.Length > 3) + if (filteredArgs.Count > 3) { int newDebug; - if (int.TryParse(args[3], out newDebug)) + if (int.TryParse(filteredArgs[3], out newDebug)) { - m_scene.ForEachScenePresence(sp => + if (setAsDefaultLevel) + { + DefaultClientPacketDebugLevel = newDebug; + MainConsole.Instance.OutputFormat( + "Debug packet debug for new clients set to {0}", DefaultClientPacketDebugLevel); + } + else { - if (name == null || sp.Name == name) + m_scene.ForEachScenePresence(sp => { - m_log.DebugFormat( - "Packet debug for {0} ({1}) set to {2} in {3}", - sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_scene.Name); - - sp.ControllingClient.DebugPacketLevel = newDebug; - } - }); + if (name == null || sp.Name == name) + { + MainConsole.Instance.OutputFormat( + "Packet debug for {0} ({1}) set to {2} in {3}", + sp.Name, sp.IsChildAgent ? "child" : "root", newDebug, m_scene.Name); + + sp.ControllingClient.DebugPacketLevel = newDebug; + } + }); + } } else { - MainConsole.Instance.Output("Usage: debug lludp packet 0..255 [ ]"); + MainConsole.Instance.Output("Usage: debug lludp packet [--default] 0..255 [ ]"); } } } @@ -687,6 +718,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP "OUT LLUDP packet processing for {0} is {1}", m_scene.Name, IsRunningOutbound ? "enabled" : "disabled"); MainConsole.Instance.OutputFormat("LLUDP pools in {0} are {1}", m_scene.Name, UsePools ? "on" : "off"); + + MainConsole.Instance.OutputFormat( + "Packet debug level for new clients is {0}", DefaultClientPacketDebugLevel); } public bool HandlesRegion(Location x) @@ -1533,6 +1567,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP client = new LLClientView(m_scene, this, udpClient, sessionInfo, agentID, sessionID, circuitCode); client.OnLogout += LogoutHandler; + client.DebugPacketLevel = DefaultClientPacketDebugLevel; ((LLClientView)client).DisableFacelights = m_disableFacelights; -- cgit v1.1 From 068a3afad9b585399e5422108f8c5074c9e6b33f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 09:51:31 -0700 Subject: HG Friends: migration #3 is failing on some installations of MySql. Setting the table to InnoDB seems to fix the problem. --- OpenSim/Data/MySQL/Resources/FriendsStore.migrations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations index 55d82ec..5faf956 100644 --- a/OpenSim/Data/MySQL/Resources/FriendsStore.migrations +++ b/OpenSim/Data/MySQL/Resources/FriendsStore.migrations @@ -9,7 +9,7 @@ CREATE TABLE `Friends` ( `Offered` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY(`PrincipalID`, `Friend`), KEY(`PrincipalID`) -); +) ENGINE=InnoDB; COMMIT; -- cgit v1.1 From 98a2fa8e358a6a008eea28161e48e4bfc877e11e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 10:23:20 -0700 Subject: HG Friends: this was commented some commits ago, but it shouldn't have been. --- .../CoreModules/Avatar/Friends/HGFriendsModule.cs | 49 +++++++++++----------- 1 file changed, 24 insertions(+), 25 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index ae45b99..6d1fd1f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -348,31 +348,30 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends return null; } -// public override FriendInfo[] GetFriendsFromService(IClientAPI client) -// { -//// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); -// Boolean agentIsLocal = true; -// if (UserManagementModule != null) -// agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); - -// if (agentIsLocal) -// return base.GetFriendsFromService(client); - -// FriendInfo[] finfos = new FriendInfo[0]; -// // Foreigner -// AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); -// if (agentClientCircuit != null) -// { -// //[XXX] string agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit); - -// finfos = FriendsService.GetFriends(client.AgentId.ToString()); -// m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); -// } - -//// m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); - -// return finfos; -// } + public override FriendInfo[] GetFriendsFromService(IClientAPI client) + { + // m_log.DebugFormat("[HGFRIENDS MODULE]: Entering GetFriendsFromService for {0}", client.Name); + Boolean agentIsLocal = true; + if (UserManagementModule != null) + agentIsLocal = UserManagementModule.IsLocalGridUser(client.AgentId); + + if (agentIsLocal) + return base.GetFriendsFromService(client); + + FriendInfo[] finfos = new FriendInfo[0]; + // Foreigner + AgentCircuitData agentClientCircuit = ((Scene)(client.Scene)).AuthenticateHandler.GetAgentCircuitData(client.CircuitCode); + if (agentClientCircuit != null) + { + // Note that this is calling a different interface than base; this one calls with a string param! + finfos = FriendsService.GetFriends(client.AgentId.ToString()); + m_log.DebugFormat("[HGFRIENDS MODULE]: Fetched {0} local friends for visitor {1}", finfos.Length, client.AgentId.ToString()); + } + + // m_log.DebugFormat("[HGFRIENDS MODULE]: Exiting GetFriendsFromService for {0}", client.Name); + + return finfos; + } protected override bool StoreRights(UUID agentID, UUID friendID, int rights) { -- cgit v1.1 From ae42c93f9a2c7df4e7c14896df27544f283c8114 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 10:59:21 -0700 Subject: Now trying to find a cause of freeze at login related to friends status notifications. --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 41ea2a2..bc501b7 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -526,8 +526,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (friendSession.RegionID != UUID.Zero) { GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); - //m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); - m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); + if (region != null) + { + m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); + m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); + } } } } -- cgit v1.1 From 0cc0a2485c6502df096b9070ff0c8e5584dae2fd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 11:18:05 -0700 Subject: More debug related to the previous commit --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index bc501b7..16a2b9b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -526,9 +526,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends if (friendSession.RegionID != UUID.Zero) { GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); + m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", (region == null ? "null" : region.RegionName)); if (region != null) { - m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", region.RegionName); m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); } } -- cgit v1.1 From ec9ffbb89a8925cebae29d9950475eaa1b280de4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 11:36:10 -0700 Subject: More debug, same issue --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 6 ++++-- .../Framework/InventoryAccess/HGInventoryAccessModule.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index 16a2b9b..ea69abb 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -523,15 +523,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends foreach (PresenceInfo friendSession in friendSessions) { // let's guard against sessions-gone-bad - if (friendSession.RegionID != UUID.Zero) + if (friendSession != null && friendSession.RegionID != UUID.Zero) { + m_log.DebugFormat("[FRIENDS]: Get region {0}", friendSession.RegionID); GridRegion region = GridService.GetRegionByUUID(m_Scenes[0].RegionInfo.ScopeID, friendSession.RegionID); - m_log.DebugFormat("[FRIENDS]: Remote Notify to region {0}", (region == null ? "null" : region.RegionName)); if (region != null) { m_FriendsSimConnector.StatusNotify(region, userID, friendSession.UserID, online); } } + else + m_log.DebugFormat("[FRIENDS]: friend session is null or the region is UUID.Zero"); } } diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 64d5f61..1eae0ac 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -244,7 +244,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment) { - m_log.DebugFormat("[HGScene] RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID); + m_log.DebugFormat("[HGScene]: RezObject itemID={0} fromTaskID={1}", itemID, fromTaskID); //if (fromTaskID.Equals(UUID.Zero)) //{ -- cgit v1.1 From bf214122cddf62b46d6074755b08a3b0acef853f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 11:53:22 -0700 Subject: More debug, same issue --- OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs | 2 ++ OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs index ea69abb..6d4c65d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs @@ -498,6 +498,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends protected virtual void StatusNotify(List friendList, UUID userID, bool online) { + m_log.DebugFormat("[FRIENDS]: Entering StatusNotify for {0}", userID); + List friendStringIds = friendList.ConvertAll(friend => friend.Friend); List remoteFriendStringIds = new List(); foreach (string friendStringId in friendStringIds) diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs index 6d1fd1f..a456009 100644 --- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs @@ -252,7 +252,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends protected override void StatusNotify(List friendList, UUID userID, bool online) { -// m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); + m_log.DebugFormat("[HGFRIENDS MODULE]: Entering StatusNotify for {0}", userID); // First, let's divide the friends on a per-domain basis Dictionary> friendsPerDomain = new Dictionary>(); -- cgit v1.1 From fdafc2a16c3c661231d47f0c979438f2500ec131 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 4 Jul 2013 20:39:16 +0100 Subject: With diva's permission, temporarily reinsert Unknown UserUMMAU3 to make sure that GUN7 failure has largely disappeared. Unknown UserUMMAU3 insertion should definitely be removed down the line. However, I would like a little more time to check the GUN* reduction first, since removing UMMAU3 will make these failures appear as GUN7 instead. Also bumps GUN6 -> GUN7 and UMMAU2 -> UMMAU3 --- .../UserManagement/UserManagementModule.cs | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index e19631e..461c385 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -135,7 +135,6 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement s.ForEachSOG(delegate(SceneObjectGroup sog) { CacheCreators(sog); }); } - void EventManager_OnNewClient(IClientAPI client) { client.OnConnectionClosed += new Action(HandleConnectionClosed); @@ -151,6 +150,10 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement void HandleUUIDNameRequest(UUID uuid, IClientAPI remote_client) { +// m_log.DebugFormat( +// "[USER MANAGEMENT MODULE]: Handling request for name binding of UUID {0} from {1}", +// uuid, remote_client.Name); + if (m_Scenes[0].LibraryService != null && (m_Scenes[0].LibraryService.LibraryRootFolder.Owner == uuid)) { remote_client.SendNameReply(uuid, "Mr", "OpenSim"); @@ -338,10 +341,12 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI {0}", uInfo.UserID); } else - m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found {0}", uuid); + { + m_log.DebugFormat("[USER MANAGEMENT MODULE]: No grid user found for {0}", uuid); + } names[0] = "Unknown"; - names[1] = "UserUMMTGUN6"; + names[1] = "UserUMMTGUN7"; return false; } @@ -553,12 +558,18 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement } if (parts.Length >= 2) user.FirstName = parts[1].Replace(' ', '.'); - - AddUserInternal(user); - } - // else don't add the user to the cache, period. + else + { + // Temporarily add unknown user entries of this type into the cache so that we can distinguish + // this source from other recent (hopefully resolved) bugs that fail to retrieve a user name binding + // TODO: Can be removed when GUN* unknown users have definitely dropped significantly or + // disappeared. + user.FirstName = "Unknown"; + user.LastName = "UserUMMAU3"; + } + AddUserInternal(user); } } -- cgit v1.1 From ca380ec0397b28a3d7a3f2c60aeb6eaf1153be31 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 12:41:45 -0700 Subject: Same freeze issue, now checking if it's in estate --- OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs index 73e706c..d23e51a 100644 --- a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs +++ b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs @@ -130,6 +130,7 @@ namespace OpenSim.Region.CoreModules.World.Estate private void SendToEstate(uint EstateID, Dictionary sendData) { + m_log.DebugFormat("[XESTATE CONNECTOR]: SendToEstate"); List regions = m_EstateModule.Scenes[0].GetEstateRegions((int)EstateID); UUID ScopeID = UUID.Zero; -- cgit v1.1 From 38a04ff993052980a2dfbfbdbe0d2853e2d8950e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 13:00:06 -0700 Subject: Revert "Same freeze issue, now checking if it's in estate" This reverts commit ca380ec0397b28a3d7a3f2c60aeb6eaf1153be31. --- OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs index d23e51a..73e706c 100644 --- a/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs +++ b/OpenSim/Region/CoreModules/World/Estate/XEstateConnector.cs @@ -130,7 +130,6 @@ namespace OpenSim.Region.CoreModules.World.Estate private void SendToEstate(uint EstateID, Dictionary sendData) { - m_log.DebugFormat("[XESTATE CONNECTOR]: SendToEstate"); List regions = m_EstateModule.Scenes[0].GetEstateRegions((int)EstateID); UUID ScopeID = UUID.Zero; -- cgit v1.1 From c95a23863ab51810ccc01afd3dd641c18a183305 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 13:13:52 -0700 Subject: WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT. --- OpenSim/Framework/WebUtil.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 6fb1e0c..ece3129 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -1061,6 +1061,7 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > WebUtil.LongCallTime) + { m_log.InfoFormat( "[FORMS]: Slow request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, @@ -1069,6 +1070,9 @@ namespace OpenSim.Framework tickdiff, tickdata, obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj); + Util.PrintCallStack(); + + } else if (WebUtil.DebugLevel >= 4) m_log.DebugFormat( "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", -- cgit v1.1 From 33ddb6c246e7a3b8670b759e0799884520b12e9d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 13:25:58 -0700 Subject: Revert "WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT." This reverts commit c95a23863ab51810ccc01afd3dd641c18a183305. --- OpenSim/Framework/WebUtil.cs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index ece3129..6fb1e0c 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -1061,7 +1061,6 @@ namespace OpenSim.Framework int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > WebUtil.LongCallTime) - { m_log.InfoFormat( "[FORMS]: Slow request {0} {1} {2} took {3}ms, {4}ms writing, {5}", reqnum, @@ -1070,9 +1069,6 @@ namespace OpenSim.Framework tickdiff, tickdata, obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj); - Util.PrintCallStack(); - - } else if (WebUtil.DebugLevel >= 4) m_log.DebugFormat( "[WEB UTIL]: HTTP OUT {0} took {1}ms, {2}ms writing", -- cgit v1.1 From da3aa441388e589ffcd7a667aadc260f8084854f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 13:27:53 -0700 Subject: Debug the RegionHandle handler (same issue) --- OpenSim/Region/Framework/Scenes/Scene.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a9f8a85..aa14529 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -4889,6 +4889,7 @@ namespace OpenSim.Region.Framework.Scenes public void RegionHandleRequest(IClientAPI client, UUID regionID) { + m_log.DebugFormat("[SCENE]: RegionHandleRequest {0}", regionID); ulong handle = 0; if (regionID == RegionInfo.RegionID) handle = RegionInfo.RegionHandle; -- cgit v1.1 From d80936bbbb85280623478f3a25d59a4a4da9c3e6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 4 Jul 2013 14:07:25 -0700 Subject: Guard against completely unknown user UUIDs. --- .../CoreModules/Framework/UserManagement/UserManagementModule.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 461c385..a7cbc8f 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -332,10 +332,13 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement { AddUser(uuid, first, last, url); - names[0] = m_UserCache[uuid].FirstName; - names[1] = m_UserCache[uuid].LastName; + if (m_UserCache.ContainsKey(uuid)) + { + names[0] = m_UserCache[uuid].FirstName; + names[1] = m_UserCache[uuid].LastName; - return true; + return true; + } } else m_log.DebugFormat("[USER MANAGEMENT MODULE]: Unable to parse UUI {0}", uInfo.UserID); -- cgit v1.1