From 05c1ec7fafe581e368d57138b2d1df7e590c2dd5 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:01:45 -0700 Subject: Changed the lock object, to see if this helps at all. Also switched the order of lock and try/catch in RemoveImageFromQueue. --- .../Region/ClientStack/LindenUDP/LLImageManager.cs | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs index 2120d33..cc290ed 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLImageManager.cs @@ -88,7 +88,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP J2KImage imgrequest; // Do a linear search for this texture download - lock (m_priorityQueue) + lock (m_syncRoot) m_priorityQueue.Find(delegate(J2KImage img) { return img.TextureID == newRequest.RequestedAssetID; }, out imgrequest); if (imgrequest != null) @@ -99,7 +99,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP try { - lock (m_priorityQueue) + lock (m_syncRoot) m_priorityQueue.Delete(imgrequest.PriorityQueueHandle); } catch (Exception) { } @@ -211,7 +211,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { J2KImage image = null; - lock (m_priorityQueue) + lock (m_syncRoot) { if (m_priorityQueue.Count > 0) @@ -230,23 +230,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP { image.PriorityQueueHandle = null; - lock (m_priorityQueue) - m_priorityQueue.Add(ref image.PriorityQueueHandle, image); + lock (m_syncRoot) + try + { + m_priorityQueue.Add(ref image.PriorityQueueHandle, image); + } + catch (Exception) { } } void RemoveImageFromQueue(J2KImage image) { - try - { - lock (m_priorityQueue) + lock (m_syncRoot) + try + { m_priorityQueue.Delete(image.PriorityQueueHandle); - } - catch (Exception) { } + } + catch (Exception) { } } void UpdateImageInQueue(J2KImage image) { - lock (m_priorityQueue) + lock (m_syncRoot) { try { m_priorityQueue.Replace(image.PriorityQueueHandle, image); } catch (Exception) -- cgit v1.1 From 5f18a088a83c9997e1fe026241de2c0db1a961b8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:14:46 -0700 Subject: More error catching/outputting. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index e22328d..b425d90 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -137,11 +137,21 @@ namespace OpenSim.Server.Handlers.Grid } Dictionary rinfoData = new Dictionary(); - foreach (KeyValuePair kvp in request) - rinfoData[kvp.Key] = kvp.Value; - GridRegion rinfo = new GridRegion(rinfoData); + GridRegion rinfo = null; + try + { + foreach (KeyValuePair kvp in request) + rinfoData[kvp.Key] = kvp.Value; + rinfo = new GridRegion(rinfoData); + } + catch (Exception e) + { + m_log.DebugFormat("[GRID HANDLER]: exception unpacking region data: {0}", e); + } - bool result = m_GridService.RegisterRegion(scopeID, rinfo); + bool result = false; + if (rinfo != null) + m_GridService.RegisterRegion(scopeID, rinfo); if (result) return SuccessResult(); -- cgit v1.1 From 05b80185b9f74979eeab0d60ae4d7de56593264c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 11:49:21 -0700 Subject: More debug to try to diagnose a problem with region registration. --- OpenSim/Server/Base/ServerUtils.cs | 2 +- OpenSim/Services/Connectors/Grid/GridServiceConnector.cs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Base/ServerUtils.cs b/OpenSim/Server/Base/ServerUtils.cs index 0964caa..9d9735e 100644 --- a/OpenSim/Server/Base/ServerUtils.cs +++ b/OpenSim/Server/Base/ServerUtils.cs @@ -260,7 +260,7 @@ namespace OpenSim.Server.Base public static Dictionary ParseXmlResponse(string data) { - //m_log.DebugFormat("[XXX]: received xml string: {0}", data); + m_log.DebugFormat("[XXX]: received xml string: {0}", data); Dictionary ret = new Dictionary(); diff --git a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs index ba46b0d..acdf558 100644 --- a/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServiceConnector.cs @@ -109,8 +109,13 @@ namespace OpenSim.Services.Connectors { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - if ((replyData["Result"] != null) && (replyData["Result"].ToString().ToLower() == "success")) + if (replyData.ContainsKey("Result")&& (replyData["Result"].ToString().ToLower() == "success")) return true; + else if (!replyData.ContainsKey("Result")) + m_log.DebugFormat("[GRID CONNECTOR]: reply data does not contain result field"); + else + m_log.DebugFormat("[GRID CONNECTOR]: unexpected result {0}", replyData["Result"].ToString()); + } else m_log.DebugFormat("[GRID CONNECTOR]: RegisterRegion received null reply"); -- cgit v1.1 From 9bd1353875d40806cbe76b8afca17ed5a93e9efd Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 5 Oct 2009 12:13:38 -0700 Subject: Fixed bug introduced in one of the last commits. --- OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs index b425d90..08edcbf 100644 --- a/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Grid/GridServerPostHandler.cs @@ -151,7 +151,7 @@ namespace OpenSim.Server.Handlers.Grid bool result = false; if (rinfo != null) - m_GridService.RegisterRegion(scopeID, rinfo); + result = m_GridService.RegisterRegion(scopeID, rinfo); if (result) return SuccessResult(); -- cgit v1.1