diff options
author | Justin Clarke Casey | 2008-03-12 18:11:08 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-03-12 18:11:08 +0000 |
commit | b9ef6ed0471d19e0e64330cb4020d1de26fd8f1c (patch) | |
tree | 6cb89452484b651b6dbfa43dcca4a5cc399ff9a4 /OpenSim/Region/Environment/Scenes | |
parent | * Since remoting exceptions occur quite often in some cases (e.g. when a neig... (diff) | |
download | opensim-SC-b9ef6ed0471d19e0e64330cb4020d1de26fd8f1c.zip opensim-SC-b9ef6ed0471d19e0e64330cb4020d1de26fd8f1c.tar.gz opensim-SC-b9ef6ed0471d19e0e64330cb4020d1de26fd8f1c.tar.bz2 opensim-SC-b9ef6ed0471d19e0e64330cb4020d1de26fd8f1c.tar.xz |
* Don't abort (and keep failing) the update if one Entity gives us an exception when we try to update it
* This doesn't remove bug 757, but does largely remove the worst consequences
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/InnerScene.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 60 |
2 files changed, 44 insertions, 31 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 02d0e20..7d21935 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -217,13 +217,26 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | /// <summary> | ||
221 | /// Process all pending updates | ||
222 | /// </summary> | ||
220 | internal void ProcessUpdates() | 223 | internal void ProcessUpdates() |
221 | { | 224 | { |
222 | lock (m_updateList) | 225 | lock (m_updateList) |
223 | { | 226 | { |
224 | for (int i = 0; i < m_updateList.Count; i++) | 227 | for (int i = 0; i < m_updateList.Count; i++) |
225 | { | 228 | { |
226 | m_updateList[i].Update(); | 229 | EntityBase entity = m_updateList[i]; |
230 | |||
231 | // Don't abort the whole update if one entity happens to give us an exception. | ||
232 | try | ||
233 | { | ||
234 | m_updateList[i].Update(); | ||
235 | } | ||
236 | catch (Exception e) | ||
237 | { | ||
238 | m_log.ErrorFormat("[INNERSCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.m_uuid, e); | ||
239 | } | ||
227 | } | 240 | } |
228 | m_updateList.Clear(); | 241 | m_updateList.Clear(); |
229 | } | 242 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index cc97988..1c6efd2 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -724,34 +724,34 @@ namespace OpenSim.Region.Environment.Scenes | |||
724 | 724 | ||
725 | if (Region_Status != RegionStatus.SlaveScene) | 725 | if (Region_Status != RegionStatus.SlaveScene) |
726 | { | 726 | { |
727 | if (m_frame % m_update_events == 0) | 727 | if (m_frame % m_update_events == 0) |
728 | UpdateEvents(); | 728 | UpdateEvents(); |
729 | 729 | ||
730 | if (m_frame % m_update_backup == 0) | 730 | if (m_frame % m_update_backup == 0) |
731 | UpdateStorageBackup(); | 731 | UpdateStorageBackup(); |
732 | 732 | ||
733 | if (m_frame % m_update_terrain == 0) | 733 | if (m_frame % m_update_terrain == 0) |
734 | UpdateTerrain(); | 734 | UpdateTerrain(); |
735 | 735 | ||
736 | if (m_frame % m_update_land == 0) | 736 | if (m_frame % m_update_land == 0) |
737 | UpdateLand(); | 737 | UpdateLand(); |
738 | otherMS = System.Environment.TickCount - otherMS; | 738 | otherMS = System.Environment.TickCount - otherMS; |
739 | // if (m_frame%m_update_avatars == 0) | 739 | // if (m_frame%m_update_avatars == 0) |
740 | // UpdateInWorldTime(); | 740 | // UpdateInWorldTime(); |
741 | m_statsReporter.AddPhysicsFPS(physicsFPS); | 741 | m_statsReporter.AddPhysicsFPS(physicsFPS); |
742 | m_statsReporter.AddTimeDilation(m_timedilation); | 742 | m_statsReporter.AddTimeDilation(m_timedilation); |
743 | m_statsReporter.AddFPS(1); | 743 | m_statsReporter.AddFPS(1); |
744 | m_statsReporter.AddInPackets(0); | 744 | m_statsReporter.AddInPackets(0); |
745 | m_statsReporter.SetRootAgents(m_innerScene.GetRootAgentCount()); | 745 | m_statsReporter.SetRootAgents(m_innerScene.GetRootAgentCount()); |
746 | m_statsReporter.SetChildAgents(m_innerScene.GetChildAgentCount()); | 746 | m_statsReporter.SetChildAgents(m_innerScene.GetChildAgentCount()); |
747 | m_statsReporter.SetObjects(m_innerScene.GetTotalObjects()); | 747 | m_statsReporter.SetObjects(m_innerScene.GetTotalObjects()); |
748 | m_statsReporter.SetActiveObjects(m_innerScene.GetActiveObjects()); | 748 | m_statsReporter.SetActiveObjects(m_innerScene.GetActiveObjects()); |
749 | frameMS = System.Environment.TickCount - frameMS; | 749 | frameMS = System.Environment.TickCount - frameMS; |
750 | m_statsReporter.addFrameMS(frameMS); | 750 | m_statsReporter.addFrameMS(frameMS); |
751 | m_statsReporter.addPhysicsMS(physicsMS); | 751 | m_statsReporter.addPhysicsMS(physicsMS); |
752 | m_statsReporter.addOtherMS(otherMS); | 752 | m_statsReporter.addOtherMS(otherMS); |
753 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); | 753 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); |
754 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); | 754 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); |
755 | } | 755 | } |
756 | } | 756 | } |
757 | catch (NotImplementedException) | 757 | catch (NotImplementedException) |
@@ -1288,7 +1288,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1288 | 1288 | ||
1289 | if (m_restorePresences.ContainsKey(client.AgentId)) | 1289 | if (m_restorePresences.ContainsKey(client.AgentId)) |
1290 | { | 1290 | { |
1291 | m_log.Info("REGION Restore Scene Presence"); | 1291 | m_log.Info("[REGION]: Restore Scene Presence"); |
1292 | 1292 | ||
1293 | presence = m_restorePresences[client.AgentId]; | 1293 | presence = m_restorePresences[client.AgentId]; |
1294 | m_restorePresences.Remove(client.AgentId); | 1294 | m_restorePresences.Remove(client.AgentId); |
@@ -1304,7 +1304,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1304 | } | 1304 | } |
1305 | else | 1305 | else |
1306 | { | 1306 | { |
1307 | m_log.Info("REGION Add New Scene Presence"); | 1307 | m_log.Info("[REGION]: Add New Scene Presence"); |
1308 | 1308 | ||
1309 | m_estateManager.sendRegionHandshake(client); | 1309 | m_estateManager.sendRegionHandshake(client); |
1310 | 1310 | ||