From d23222cbc69f1c8e40c2e9509347e0a1a2734860 Mon Sep 17 00:00:00 2001
From: Tedd Hansen
Date: Fri, 18 Jan 2008 23:45:16 +0000
Subject: Added block for scenario: global exception handler called in loop
when exception happens inside global exception handler Added InnerException
to output
---
OpenSim/Region/Application/Application.cs | 11 ++++++++++-
OpenSim/Region/Environment/Scenes/Scene.cs | 4 ----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs
index d253775..bf44274 100644
--- a/OpenSim/Region/Application/Application.cs
+++ b/OpenSim/Region/Application/Application.cs
@@ -80,6 +80,7 @@ namespace OpenSim
}
}
+ private static bool _IsHandlingException = false; // Make sure we don't go recursive on ourself
///
/// Global exception handler -- all unhandlet exceptions end up here :)
///
@@ -87,6 +88,9 @@ namespace OpenSim
///
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
+ if (_IsHandlingException)
+ return;
+ _IsHandlingException = true;
// TODO: Add config option to allow users to turn off error reporting
// TODO: Post error report (disabled for now)
@@ -96,7 +100,10 @@ namespace OpenSim
msg += "\r\n";
msg += "Exception: " + e.ExceptionObject.ToString() + "\r\n";
-
+ Exception ex = (Exception)e.ExceptionObject;
+ if (ex.InnerException != null)
+ msg += "InnerException: " + ex.InnerException.ToString() + "\r\n";
+
msg += "\r\n";
msg += "Application is terminating: " + e.IsTerminating.ToString() + "\r\n";
@@ -118,6 +125,8 @@ namespace OpenSim
{
// Ignore
}
+
+ _IsHandlingException=false;
}
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 6a10969..c6f9aff 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1696,19 +1696,15 @@ namespace OpenSim.Region.Environment.Scenes
return LLUUID.Zero;
}
- private static readonly object _performParcelPrimCountUpdateMutex = new object();
///
///
///
public void performParcelPrimCountUpdate()
{
- lock (_performParcelPrimCountUpdateMutex)
- {
m_LandManager.resetAllLandPrimCounts();
m_eventManager.TriggerParcelPrimCountUpdate();
m_LandManager.finalizeLandPrimCountUpdate();
m_LandManager.landPrimCountTainted = false;
- }
}
///
--
cgit v1.1