aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs47
1 files changed, 22 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 6187803..9bca654 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1140,7 +1140,7 @@ namespace OpenSim.Region.Framework.Scenes
1140 1140
1141 HeartbeatThread 1141 HeartbeatThread
1142 = Watchdog.StartThread( 1142 = Watchdog.StartThread(
1143 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false); 1143 Heartbeat, string.Format("Heartbeat ({0})", RegionInfo.RegionName), ThreadPriority.Normal, false, false);
1144 } 1144 }
1145 1145
1146 /// <summary> 1146 /// <summary>
@@ -1178,6 +1178,13 @@ namespace OpenSim.Region.Framework.Scenes
1178 try 1178 try
1179 { 1179 {
1180 m_eventManager.TriggerOnRegionStarted(this); 1180 m_eventManager.TriggerOnRegionStarted(this);
1181
1182 // The first frame can take a very long time due to physics actors being added on startup. Therefore,
1183 // don't turn on the watchdog alarm for this thread until the second frame, in order to prevent false
1184 // alarms for scenes with many objects.
1185 Update();
1186 Watchdog.GetCurrentThreadInfo().AlarmIfTimeout = true;
1187
1181 while (!shuttingdown) 1188 while (!shuttingdown)
1182 Update(); 1189 Update();
1183 1190
@@ -1206,7 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes
1206 1213
1207 ++Frame; 1214 ++Frame;
1208 1215
1209// m_log.DebugFormat("[SCENE]: Processing frame {0}", Frame); 1216// m_log.DebugFormat("[SCENE]: Processing frame {0} in {1}", Frame, RegionInfo.RegionName);
1210 1217
1211 try 1218 try
1212 { 1219 {
@@ -1361,26 +1368,10 @@ namespace OpenSim.Region.Framework.Scenes
1361 { 1368 {
1362 throw; 1369 throw;
1363 } 1370 }
1364 catch (AccessViolationException e)
1365 {
1366 m_log.ErrorFormat(
1367 "[REGION]: Failed on region {0} with exception {1}{2}",
1368 RegionInfo.RegionName, e.Message, e.StackTrace);
1369 }
1370 //catch (NullReferenceException e)
1371 //{
1372 // m_log.Error("[REGION]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
1373 //}
1374 catch (InvalidOperationException e)
1375 {
1376 m_log.ErrorFormat(
1377 "[REGION]: Failed on region {0} with exception {1}{2}",
1378 RegionInfo.RegionName, e.Message, e.StackTrace);
1379 }
1380 catch (Exception e) 1371 catch (Exception e)
1381 { 1372 {
1382 m_log.ErrorFormat( 1373 m_log.ErrorFormat(
1383 "[REGION]: Failed on region {0} with exception {1}{2}", 1374 "[SCENE]: Failed on region {0} with exception {1}{2}",
1384 RegionInfo.RegionName, e.Message, e.StackTrace); 1375 RegionInfo.RegionName, e.Message, e.StackTrace);
1385 } 1376 }
1386 1377
@@ -1418,7 +1409,6 @@ namespace OpenSim.Region.Framework.Scenes
1418 entry.checkAtTargets(); 1409 entry.checkAtTargets();
1419 } 1410 }
1420 1411
1421
1422 /// <summary> 1412 /// <summary>
1423 /// Send out simstats data to all clients 1413 /// Send out simstats data to all clients
1424 /// </summary> 1414 /// </summary>
@@ -4699,7 +4689,10 @@ namespace OpenSim.Region.Framework.Scenes
4699 Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); 4689 Vector3? nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
4700 if (nearestPoint != null) 4690 if (nearestPoint != null)
4701 { 4691 {
4702 Debug.WriteLine("Found a sane previous position based on velocity, sending them to: " + nearestPoint.ToString()); 4692// m_log.DebugFormat(
4693// "[SCENE]: Found a sane previous position based on velocity for {0}, sending them to {1} in {2}",
4694// avatar.Name, nearestPoint, nearestParcel.LandData.Name);
4695
4703 return nearestPoint.Value; 4696 return nearestPoint.Value;
4704 } 4697 }
4705 4698
@@ -4709,12 +4702,16 @@ namespace OpenSim.Region.Framework.Scenes
4709 nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel); 4702 nearestPoint = GetNearestPointInParcelAlongDirectionFromPoint(avatar.AbsolutePosition, dir, nearestParcel);
4710 if (nearestPoint != null) 4703 if (nearestPoint != null)
4711 { 4704 {
4712 Debug.WriteLine("They had a zero velocity, sending them to: " + nearestPoint.ToString()); 4705// m_log.DebugFormat(
4706// "[SCENE]: {0} had a zero velocity, sending them to {1}", avatar.Name, nearestPoint);
4707
4713 return nearestPoint.Value; 4708 return nearestPoint.Value;
4714 } 4709 }
4715 4710
4716 //Ultimate backup if we have no idea where they are 4711 //Ultimate backup if we have no idea where they are
4717 Debug.WriteLine("Have no idea where they are, sending them to: " + avatar.lastKnownAllowedPosition.ToString()); 4712// m_log.DebugFormat(
4713// "[SCENE]: No idea where {0} is, sending them to {1}", avatar.Name, avatar.lastKnownAllowedPosition);
4714
4718 return avatar.lastKnownAllowedPosition; 4715 return avatar.lastKnownAllowedPosition;
4719 } 4716 }
4720 4717
@@ -5120,7 +5117,7 @@ namespace OpenSim.Region.Framework.Scenes
5120// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget); 5117// presence.Name, presence.AbsolutePosition, presence.MoveToPositionTarget);
5121 5118
5122 Vector3 agent_control_v3 = new Vector3(); 5119 Vector3 agent_control_v3 = new Vector3();
5123 presence.HandleMoveToTargetUpdate(ref agent_control_v3); 5120 presence.HandleMoveToTargetUpdate(1, ref agent_control_v3);
5124 presence.AddNewMovement(agent_control_v3); 5121 presence.AddNewMovement(agent_control_v3);
5125 } 5122 }
5126 } 5123 }