From c607e6f3b8de5f04e0c9114893b11256fa922272 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 20:28:48 +0100 Subject: Revert "don't report the null uuid as a missing asset on saving oars/iars" This reverts commit 5ce119174e03715bfc61f7864bd3e7182c5d21ea. This change led to infinite timeout since the expected number of assets no longer matched requests. Rather than introduce yet fresh bugs with another fix, just revert this since the inaccurate report is just inconvenient --- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 4d360f6..a1451ce 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -134,8 +134,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver foreach (KeyValuePair kvp in m_uuids) { - if (kvp.Key != UUID.Zero) - m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); + m_assetService.Get(kvp.Key.ToString(), kvp.Value, PreAssetRequestCallback); } m_requestCallbackTimer.Enabled = true; @@ -270,7 +269,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver } catch (Exception e) { - m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}{1}", e.Message, e.StackTrace); + m_log.ErrorFormat("[ARCHIVER]: AssetRequestCallback failed with {0}", e); } } @@ -286,8 +285,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver catch (Exception e) { m_log.ErrorFormat( - "[ARCHIVER]: Terminating archive creation since asset requester callback failed with {0}{1}", - e.Message, e.StackTrace); + "[ARCHIVER]: Terminating archive creation since asset requster callback failed with {0}", e); } } } -- cgit v1.1 From 5964084d25ab534e0eb888b44fefea8ee3e51a7d Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 29 Jun 2010 20:36:17 +0100 Subject: Fix a nullref on autoreturn --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9278164..f9da341 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1574,13 +1574,25 @@ namespace OpenSim.Region.Framework.Scenes // for when deleting the object from it ForceSceneObjectBackup(grp); - if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) + if (remoteClient == null) + { + // Autoreturn has a null client. Nothing else does. So + // allow only returns + if (action != DeRezAction.Return) + return; + permissionToTakeCopy = false; - if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) - permissionToTake = false; + } + else + { + if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) + permissionToTakeCopy = false; + if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) + permissionToTake = false; - if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) - permissionToDelete = false; + if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) + permissionToDelete = false; + } } -- cgit v1.1 From 94cb6fc916e1bd039f2b59214e68a0b3c4847445 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Jun 2010 18:54:31 +0100 Subject: stop exceptions in setting and getting state from propogating since they aren't fatal to operations this will hopefully stop "save oar" from failing if a script asset is corrupt --- .../Framework/Scenes/SceneObjectPartInventory.cs | 39 +++++++++++++++++----- 1 file changed, 31 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3a8f168..a6067ad 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -218,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes foreach (IScriptModule e in engines) { if (e != null) - { + { ArrayList errors = e.GetScriptErrors(itemID); foreach (Object line in errors) ret.Add(line); @@ -356,14 +356,26 @@ namespace OpenSim.Region.Framework.Scenes m_part.ParentGroup.m_savedScriptState[oldID] = newDoc.OuterXml; } + foreach (IScriptModule e in engines) { if (e != null) { - if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) - break; + // Stop an exception in setting saved state from propogating since this is not fatal. + try + { + if (e.SetXMLState(newID, m_part.ParentGroup.m_savedScriptState[oldID])) + break; + } + catch (Exception ex) + { + m_log.WarnFormat( + "[PRIM INVENTORY]: Could not set script state for old key {0}, new key {1} in prim {2} {3}. Exception {4}{5}", + oldID, newID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); + } } } + m_part.ParentGroup.m_savedScriptState.Remove(oldID); } } @@ -1021,12 +1033,23 @@ namespace OpenSim.Region.Framework.Scenes { if (e != null) { - string n = e.GetXMLState(item.ItemID); - if (n != String.Empty) + // Stop any exception from the script engine from propogating since setting state + // isn't essential. + try + { + string n = e.GetXMLState(item.ItemID); + if (n != String.Empty) + { + if (!ret.ContainsKey(item.ItemID)) + ret[item.ItemID] = n; + break; + } + } + catch (Exception ex) { - if (!ret.ContainsKey(item.ItemID)) - ret[item.ItemID] = n; - break; + m_log.WarnFormat( + "[PRIM INVENTORY]: Could not retrieve script state for item {0} {1} in prim {2} {3}. Exception {4}{5}", + item.Name, item.ItemID, m_part.Name, m_part.UUID, ex.Message, ex.StackTrace); } } } -- cgit v1.1 From d06b977ed1a0472fbf15da0d4d7ae68b40936fb8 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 29 Jun 2010 14:21:48 -0700 Subject: Remove the override from DeletToInventory in HGInventoryAccessModule. This may be causing the infinite loop, not sure. --- .../CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 58c396c..b0555da 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs @@ -131,7 +131,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess return ret; } - public override UUID DeleteToInventory(DeRezAction action, UUID folderID, + // DO NOT OVERRIDE THIS METHOD + public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID, SceneObjectGroup objectGroup, IClientAPI remoteClient) { UUID assetID = base.DeleteToInventory(action, folderID, new List() {objectGroup}, remoteClient); -- cgit v1.1