From 014a86c26b138e4fc861fd30634e866b83dbabdb Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Mon, 2 Jan 2012 19:46:30 +0000 Subject: [PATCH] Adding commented out log messages and some minor formatting for future bug hunting. No functional changes. --- .../WebFetchInvDescHandler.cs | 148 +++++++++--------- .../ClientStack/Linden/UDP/LLImageManager.cs | 9 +- .../Agent/TextureSender/J2KDecoderModule.cs | 3 + .../Asset/LocalAssetServiceConnector.cs | 2 + OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 1 + .../Connectors/Asset/AssetServiceConnector.cs | 6 + 6 files changed, 97 insertions(+), 72 deletions(-) diff --git a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs index e91a4b8b88..3ce4e667c6 100644 --- a/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/WebFetchInventoryDescendents/WebFetchInvDescHandler.cs @@ -240,78 +240,84 @@ namespace OpenSim.Capabilities.Handlers if (containingFolder != null) { +// m_log.DebugFormat( +// "[WEB FETCH INV DESC HANDLER]: Retrieved folder {0} {1} for agent id {2}", +// containingFolder.Name, containingFolder.ID, agentID); + version = containingFolder.Version; - - if (fetchItems) - { - /* - List linkedItemsToAdd = new List(); - - foreach (InventoryItemBase item in contents.Items) - { - if (item.AssetType == (int)AssetType.Link) - { - InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); - - // Take care of genuinely broken links where the target doesn't exist - // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, - // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles - // rather than having to keep track of every folder requested in the recursion. - if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link && linkedItem.AssetType == (int)AssetType.Object) - linkedItemsToAdd.Add(linkedItem); - } - } - - foreach (InventoryItemBase linkedItem in linkedItemsToAdd) - { - m_log.DebugFormat( - "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", - linkedItem.Name, folderID, agentID); - - contents.Items.Insert(0, linkedItem); - } - */ - - /* - // If the folder requested contains links, then we need to send those folders first, otherwise the links - // will be broken in the viewer. - HashSet linkedItemFolderIdsToSend = new HashSet(); - foreach (InventoryItemBase item in contents.Items) - { - if (item.AssetType == (int)AssetType.Link) - { - InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); - - // Take care of genuinely broken links where the target doesn't exist - // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, - // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles - // rather than having to keep track of every folder requested in the recursion. - if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) - { - // We don't need to send the folder if source and destination of the link are in the same - // folder. - if (linkedItem.Folder != containingFolder.ID) - linkedItemFolderIdsToSend.Add(linkedItem.Folder); - } - } - } - - foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) - { - m_log.DebugFormat( - "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", - linkedItemFolderId, folderID, agentID); - - int dummyVersion; - InventoryCollection linkedCollection - = Fetch( - agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); - - contents.Folders.AddRange(linkedCollection.Folders); - contents.Items.AddRange(linkedCollection.Items); - } - */ - } +// +// if (fetchItems) +// { +// List linkedItemsToAdd = new List(); +// +// foreach (InventoryItemBase item in contents.Items) +// { +// if (item.AssetType == (int)AssetType.Link) +// { +// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); +// +// // Take care of genuinely broken links where the target doesn't exist +// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, +// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles +// // rather than having to keep track of every folder requested in the recursion. +// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) +// linkedItemsToAdd.Insert(0, linkedItem); +// } +// } +// +// foreach (InventoryItemBase linkedItem in linkedItemsToAdd) +// { +// m_log.DebugFormat( +// "[WEB FETCH INV DESC HANDLER]: Inserted linked item {0} for link in folder {1} for agent {2}", +// linkedItem.Name, folderID, agentID); +// +// contents.Items.Add(linkedItem); +// } +// +// // If the folder requested contains links, then we need to send those folders first, otherwise the links +// // will be broken in the viewer. +// HashSet linkedItemFolderIdsToSend = new HashSet(); +// foreach (InventoryItemBase item in contents.Items) +// { +// if (item.AssetType == (int)AssetType.Link) +// { +// InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); +// +// // Take care of genuinely broken links where the target doesn't exist +// // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, +// // but no viewer has been observed to set these up and this is the lazy way of avoiding cycles +// // rather than having to keep track of every folder requested in the recursion. +// if (linkedItem != null && linkedItem.AssetType != (int)AssetType.Link) +// { +// // We don't need to send the folder if source and destination of the link are in the same +// // folder. +// if (linkedItem.Folder != containingFolder.ID) +// linkedItemFolderIdsToSend.Add(linkedItem.Folder); +// } +// } +// } +// +// foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) +// { +// m_log.DebugFormat( +// "[WEB FETCH INV DESC HANDLER]: Recursively fetching folder {0} linked by item in folder {1} for agent {2}", +// linkedItemFolderId, folderID, agentID); +// +// int dummyVersion; +// InventoryCollection linkedCollection +// = Fetch( +// agentID, linkedItemFolderId, ownerID, fetchFolders, fetchItems, sortOrder, out dummyVersion); +// +// InventoryFolderBase linkedFolder = new InventoryFolderBase(linkedItemFolderId); +// linkedFolder.Owner = agentID; +// linkedFolder = m_InventoryService.GetFolder(linkedFolder); +// +//// contents.Folders.AddRange(linkedCollection.Folders); +// +// contents.Folders.Add(linkedFolder); +// contents.Items.AddRange(linkedCollection.Items); +// } +// } } } else diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs index 9e0db12734..5c4a6624c4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLImageManager.cs @@ -39,6 +39,9 @@ using log4net; namespace OpenSim.Region.ClientStack.LindenUDP { + /// + /// This class handles UDP texture requests. + /// public class LLImageManager { private sealed class J2KImageComparer : IComparer @@ -228,15 +231,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP image.PriorityQueueHandle = null; lock (m_syncRoot) + { try { m_priorityQueue.Add(ref image.PriorityQueueHandle, image); } catch (Exception) { } + } } void RemoveImageFromQueue(J2KImage image) { lock (m_syncRoot) + { try { m_priorityQueue.Delete(image.PriorityQueueHandle); } catch (Exception) { } + } } void UpdateImageInQueue(J2KImage image) @@ -254,4 +261,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion Priority Queue Helpers } -} +} \ No newline at end of file diff --git a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs index 1386e86729..7dd90874b6 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureSender/J2KDecoderModule.cs @@ -152,6 +152,9 @@ namespace OpenSim.Region.CoreModules.Agent.TextureSender /// JPEG2000 data private void DoJ2KDecode(UUID assetID, byte[] j2kData) { +// m_log.DebugFormat( +// "[J2KDecoderModule]: Doing J2K decoding of {0} bytes for asset {1}", j2kData.Length, assetID); + //int DecodeTime = 0; //DecodeTime = Environment.TickCount; OpenJPEG.J2KLayerInfo[] layers; diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs index cc5d06199e..2e6ec908e1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Asset/LocalAssetServiceConnector.cs @@ -170,6 +170,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Asset public AssetBase GetCached(string id) { +// m_log.DebugFormat("[LOCAL ASSET SERVICES CONNECTOR]: Cache request for {0}", id); + if (m_Cache != null) return m_Cache.Get(id); diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 2194ff0fe0..228eca9896 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs @@ -2822,6 +2822,7 @@ namespace OpenSim.Region.Physics.OdePlugin m_global_contactcount = 0; d.WorldQuickStep(world, ODE_STEPSIZE); + d.JointGroupEmpty(contactgroup); } catch (Exception e) diff --git a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs index fdab254ed8..d7b2ff85ed 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServiceConnector.cs @@ -100,6 +100,8 @@ namespace OpenSim.Services.Connectors public AssetBase Get(string id) { +// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Synchronous get request for {0}", id); + string uri = m_ServerURI + "/assets/" + id; AssetBase asset = null; @@ -119,6 +121,8 @@ namespace OpenSim.Services.Connectors public AssetBase GetCached(string id) { +// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Cache request for {0}", id); + if (m_Cache != null) return m_Cache.Get(id); @@ -177,6 +181,8 @@ namespace OpenSim.Services.Connectors public bool Get(string id, Object sender, AssetRetrieved handler) { +// m_log.DebugFormat("[ASSET SERVICE CONNECTOR]: Potentially asynchronous get request for {0}", id); + string uri = m_ServerURI + "/assets/" + id; AssetBase asset = null;