Code: Select all
//this one has no problem at all, prints nice clean json string
try
{
print(ES3.LoadRawString("0.sav"));
}
catch (System.Exception)
{
throw;
}
//this one makes error
try
{
ES3.CacheFile("0.sav");
}
catch (System.Exception)
{
throw;
}
Code: Select all
ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
ES3Internal.ES3Stream.CreateStream (System.IO.Stream stream, ES3Settings settings, ES3Internal.ES3FileMode fileMode) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:117)
ES3Reader.Create (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:366)
ES3File.SaveRaw (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:170)
ES3File..ctor (System.Byte[] bytes, ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:83)
ES3File.CacheFile (ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3File.cs:371)
ES3.CacheFile (ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:1464)
ES3.CacheFile (System.String filePath) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:1449)
r35_MapBrain.Start () (at Assets/Scripts/r35_MapBrain.cs:156)
but when a stream comes in System.IO.MemoryStream it fire errors.
Am I using the wrong approach to making a cache?
and this is my another action for preventing the Sharing Violation issue, by the way.
(https://moodkie.com/forum/viewtopic.php?p=7494)