aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2007-04-22 17:31:51 +0000
committerAdam Frisby2007-04-22 17:31:51 +0000
commit869b39c451ca1ce2dca4e651d6eada0c5b213f06 (patch)
tree0bf737e9ac76b6961a271a79069dbe745b3d9a10
parent=== Dedicated to Jesse. === (diff)
downloadopensim-SC_OLD-869b39c451ca1ce2dca4e651d6eada0c5b213f06.zip
opensim-SC_OLD-869b39c451ca1ce2dca4e651d6eada0c5b213f06.tar.gz
opensim-SC_OLD-869b39c451ca1ce2dca4e651d6eada0c5b213f06.tar.bz2
opensim-SC_OLD-869b39c451ca1ce2dca4e651d6eada0c5b213f06.tar.xz
SimClient: Added Try/Catch over block of code which is triggering an exception that should not be triggerable. (Duplicate key after dictionary is locked, checked for key, then added) [!?!?]
AvatarUpdate: Added check for if the physics actor is null before attempting to access it.
-rw-r--r--OpenSim.RegionServer/SimClient.cs12
-rw-r--r--OpenSim.RegionServer/world/AvatarUpdate.cs6
2 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim.RegionServer/SimClient.cs b/OpenSim.RegionServer/SimClient.cs
index e4c445b..d716bd6 100644
--- a/OpenSim.RegionServer/SimClient.cs
+++ b/OpenSim.RegionServer/SimClient.cs
@@ -731,7 +731,17 @@ namespace OpenSim
731 { 731 {
732 if (!NeedAck.ContainsKey(Pack.Header.Sequence)) 732 if (!NeedAck.ContainsKey(Pack.Header.Sequence))
733 { 733 {
734 NeedAck.Add(Pack.Header.Sequence, Pack); 734 try
735 {
736 NeedAck.Add(Pack.Header.Sequence, Pack);
737 }
738 catch (Exception e)
739 {
740 // Ignore
741 // Seems to throw a exception here occasionally
742 // of 'duplicate key' despite being locked.
743 // !?!?!?
744 }
735 } 745 }
736 else 746 else
737 { 747 {
diff --git a/OpenSim.RegionServer/world/AvatarUpdate.cs b/OpenSim.RegionServer/world/AvatarUpdate.cs
index 6c0ace7..34d032c 100644
--- a/OpenSim.RegionServer/world/AvatarUpdate.cs
+++ b/OpenSim.RegionServer/world/AvatarUpdate.cs
@@ -10,6 +10,12 @@ namespace OpenSim.world
10 { 10 {
11 public override void update() 11 public override void update()
12 { 12 {
13 if (this._physActor == null)
14 {
15 //HACKHACK: Note to work out why this entity does not have a physics actor
16 // and prehaps create one.
17 return;
18 }
13 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z); 19 libsecondlife.LLVector3 pos2 = new LLVector3(this._physActor.Position.X, this._physActor.Position.Y, this._physActor.Position.Z);
14 if (this.updateflag) 20 if (this.updateflag)
15 { 21 {