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 <filename unknown>:0
    at HttpServer.HttpClientContext.OnReceive (IAsyncResult ar) [0x00000] in <filename unknown>:0 ^M
  ^M
  Application is terminating: True^M
remove-scene-viewer
Snoopy Pfeffer 2011-11-06 15:05:19 +01:00
parent bd10d14bbd
commit dfbfc9826a
1 changed files with 9 additions and 1 deletions

View File

@ -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)