Loading New Data into the ES3File

Discussion and help for Easy Save 3
Post Reply
faolad
Posts: 1
Joined: Tue Jan 28, 2020 2:04 am

Loading New Data into the ES3File

Post by faolad »

I'm trying to load/replace the saved data with a new ES3File in iOS without success.
Keep getting this error:

Code: Select all

Uploading Crash Report
ArgumentOutOfRangeException: Positive number required.
Parameter name: bufferSize
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00000] in <00000000000000000000000000000000>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean useAsync) [0x00000] in <00000000000000000000000000000000>:0 
  at ES3Internal.ES3FileStream..ctor (System.String path, ES3Internal.ES3FileMode fileMode, System.Int32 bufferSize, System.Boolean useAsync) [0x00000] in <00000000000000000000000000000000>:0 
  at ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) [0x00000] in <00000000000000000000000000000000>:0 
  at ES3.AppendRaw (System.String str, ES3Settings settings) [0x00000] in <00000000000000000000000000000000>:0 
  at ES3.AppendRaw (System.String str, System.String filePath, ES3Settings settings) [0x00000] in <00000000000000000000000000000000>:0 
  at SaveGameData.OnGUI () [0x00000] in <00000000000000000000000000000000>:0 
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Loading New Data into the ES3File

Post by Joel »

Hi there,

Please could you run the following code in the Editor and on the device and check the output to console? You should put it immediately before the line of code which triggers the error (i.e. in SaveGameData.OnGUI()).
Debug.Log("Buffer size: " + (new ES3Settings()).bufferSize);
Also just to check that this isn't an issue with there being no save data on the device when you first install the app (or differences in save data), you might want to try deleting your save data in the Editor and see if the error occurs there too. You can find your save data by going to Window > Easy Save 3 > Tools > Open Persistent Data Path.

It sounds like the default settings aren't being compiled into iOS correctly, because it's complaining that the buffer size is negative. Do you get this error when you call any other Easy Save methods?

There have been a number of bug fixes at our end, and although I can't see anything in the fix log which relates to this, it might be worth me sending you a pre-release version of the next update to see if this has any effect. If you private message me your invoice number I'll be happy to do this.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply