Drop the CopyTo parameter from Int32.MaxValue to 4096. This is a buffer size

not a target size. Mono 2.10 appears to try to allocate the full buffer which
immediately crashes. Tested on mono 2.6.7 and 2.10.5
remove-scene-viewer
Mic Bowman 2011-11-02 18:55:54 -07:00
parent 6b4ae4f30c
commit 40a1eddfd1
1 changed files with 1 additions and 1 deletions

View File

@ -473,7 +473,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
// Grab the asset data from the response stream
using (MemoryStream stream = new MemoryStream())
{
responseStream.CopyTo(stream, Int32.MaxValue);
responseStream.CopyTo(stream, 4096);
asset.Data = stream.ToArray();
}
}