Error ES3.Save

Discussion and help for Easy Save 3
Post Reply
adrien
Posts: 3
Joined: Fri Apr 05, 2019 9:26 am

Error ES3.Save

Post by adrien »

Hi guys,

I'm having an error when saving with ES3 and I don't know why. My DataManager is a Singleton and my project is running on Android.

ArgumentOutOfRangeException: Positive number required.
Parameter name: bufferSize
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) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
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) (at <d7ac571ca2d04b2f981d0d886fa067cf>:0)
ES3Internal.ES3FileStream..ctor (System.String path, ES3Internal.ES3FileMode fileMode, System.Int32 bufferSize, System.Boolean useAsync) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3FileStream.cs:12)
(wrapper remoting-invoke-with-check) ES3Internal.ES3FileStream..ctor(string,ES3Internal.ES3FileMode,int,bool)
ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) (at Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:24)
ES3Writer.Create (ES3Settings settings, System.Boolean writeHeaderAndFooter, System.Boolean overwriteKeys, System.Boolean append) (at Assets/Plugins/Easy Save 3/Scripts/Writers/ES3Writer.cs:324)
ES3Writer.Create (ES3Settings settings) (at Assets/Plugins/Easy Save 3/Scripts/Writers/ES3Writer.cs:318)
ES3.Save[T] (System.String key, System.Object value) (at Assets/Plugins/Easy Save 3/Scripts/ES3.cs:25)
DataManager.OnApplicationQuit () (at Assets/DataManager.cs:65)

UnityVersion 2018.3.8f1

Thank you in advance
adrien
Posts: 3
Joined: Fri Apr 05, 2019 9:26 am

Re: Error ES3.Save

Post by adrien »

And I don't have Encryption
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Error ES3.Save

Post by Joel »

Hi there,

I've not seen this error before, but it suggests that the buffer size in the settings is a negative value. Please could you open the ES3 Default Settings prefab found at Assets/Plugins/Easy Save 3/Resources/ES3/, and check that the Buffer size is set to 2048? See screenshot below.

If this is not the problem, please could you run the following code on the device and let me know the output?
Debug.Log( (new ES3Settings()).bufferSize );
All the best,
Joel
Attachments
Screenshot 2019-04-06 at 09.48.15.png
Screenshot 2019-04-06 at 09.48.15.png (159.41 KiB) Viewed 2881 times
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
adrien
Posts: 3
Joined: Fri Apr 05, 2019 9:26 am

Re: Error ES3.Save

Post by adrien »

Hi Joel,

Thank you for your answer, I checked the prefab and all the settings were null. I don't know when and how the prefab was reset..

Everything works now thanks! :)
Post Reply