diff options
author | Snoopy Pfeffer | 2011-11-06 15:05:19 +0100 |
---|---|---|
committer | Snoopy Pfeffer | 2011-11-06 15:05:19 +0100 |
commit | dfbfc9826aa67e0c8d04faa5608fb33cc86dd374 (patch) | |
tree | 435520f189687a80395ebff6391c636687cb3196 /OpenSim/Services/AssetService | |
parent | Fix build break (diff) | |
download | opensim-SC_OLD-dfbfc9826aa67e0c8d04faa5608fb33cc86dd374.zip opensim-SC_OLD-dfbfc9826aa67e0c8d04faa5608fb33cc86dd374.tar.gz opensim-SC_OLD-dfbfc9826aa67e0c8d04faa5608fb33cc86dd374.tar.bz2 opensim-SC_OLD-dfbfc9826aa67e0c8d04faa5608fb33cc86dd374.tar.xz |
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
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 10 |
1 files changed, 9 insertions, 1 deletions
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 | |||
117 | return null; | 117 | return null; |
118 | } | 118 | } |
119 | 119 | ||
120 | return m_Database.GetAsset(assetID); | 120 | try |
121 | { | ||
122 | return m_Database.GetAsset(assetID); | ||
123 | } | ||
124 | catch (Exception e) | ||
125 | { | ||
126 | m_log.ErrorFormat("[ASSET SERVICE]: Exception getting asset {0} {1}", assetID, e); | ||
127 | return null; | ||
128 | } | ||
121 | } | 129 | } |
122 | 130 | ||
123 | public virtual AssetBase GetCached(string id) | 131 | public virtual AssetBase GetCached(string id) |