From dfbfc9826aa67e0c8d04faa5608fb33cc86dd374 Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Sun, 6 Nov 2011 15:05:19 +0100 Subject: Damaged assets, especially appearance textures, could crash the region server with a fatal exception. Now, such excpetions are caught by an exception handler and just an error message is shown. This was the kind of exception causing these fatal server crashes: APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs^M ^M Exception: System.ArgumentOutOfRangeException: Argument is out of range. Parameter name: offset exceeds the size of buffer at System.Net.Sockets.NetworkStream.BeginRead (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) [0x00000] in :0 at HttpServer.HttpClientContext.OnReceive (IAsyncResult ar) [0x00000] in :0 ^M ^M Application is terminating: True^M --- OpenSim/Services/AssetService/AssetService.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index 2ea513b..b3af8e3 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -117,7 +117,15 @@ namespace OpenSim.Services.AssetService return null; } - return m_Database.GetAsset(assetID); + try + { + return m_Database.GetAsset(assetID); + } + catch (Exception e) + { + m_log.ErrorFormat("[ASSET SERVICE]: Exception getting asset {0} {1}", assetID, e); + return null; + } } public virtual AssetBase GetCached(string id) -- cgit v1.1 From 927561383ec2f0e0a4839837d5896ec49b84aa42 Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Sun, 6 Nov 2011 17:43:39 +0100 Subject: HUD attachments: Removes some more messages sent to wrong clients. --- OpenSim/Region/Framework/Scenes/Scene.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1e111e5..5465ca4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3164,16 +3164,25 @@ namespace OpenSim.Region.Framework.Scenes public void SendKillObject(uint localID) { SceneObjectPart part = GetSceneObjectPart(localID); + UUID attachedAvatar = UUID.Zero; + if (part != null) // It is a prim { if (!part.ParentGroup.IsDeleted) // Valid { if (part.ParentGroup.RootPart != part) // Child part return; + + if (part.ParentGroup.IsAttachment && part.ParentGroup.AttachmentPoint >= 31 && part.ParentGroup.AttachmentPoint <= 38) + attachedAvatar = part.ParentGroup.AttachedAvatar; } } - ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); + ForEachClient(delegate(IClientAPI client) + { + if (attachedAvatar == UUID.Zero || attachedAvatar == client.AgentId) + client.SendKillObject(m_regionHandle, localID); + }); } #endregion -- cgit v1.1