Null reference error in Merge()
Posted: Thu Jul 22, 2021 9:34 pm
Hi. I have a weird behaviuor in my android game.
In the previous game version saving system works fine.
In my new version it works fine too if I do a clean installation.
But if I install on top of previous version, saving system stops working completely.
Error is "NullReferenceException in ES3Writer.Merge(Reader reader)"
I double checked all my values, keys and filenames which I pass to the saving system. They are not null
I started to check each key-value pair in and I detected that in my previous version I had enum Period_Type, but in current version I removed this enum, but Easy Save is somehow trying to use it when it performs
And when it is trying to access field "type" of Period_Type, NullReference error occurs.
For now I have added try-catch block and saving system starts working. Could you recommend how to manage this situation in a proper way? Why is ES3Writer still trying to access Period_Type enum and how should I clean it?
In the previous game version saving system works fine.
In my new version it works fine too if I do a clean installation.
But if I install on top of previous version, saving system stops working completely.
Error is "NullReferenceException in ES3Writer.Merge(Reader reader)"
I double checked all my values, keys and filenames which I pass to the saving system. They are not null
I started to check each key-value pair in
Code: Select all
reader.RawEnumerator
Code: Select all
ES3Writer.Merge(Reader reader)
For now I have added try-catch block and saving system starts working. Could you recommend how to manage this situation in a proper way? Why is ES3Writer still trying to access Period_Type enum and how should I clean it?