Key not found

Discussion and help for Easy Save 3
Post Reply
JohnS
Posts: 5
Joined: Thu Jul 27, 2023 2:17 pm

Key not found

Post by JohnS »

Hi,

I'm using PlayMaker – and I've been saving and loading with EasySave for a while, but I am suddenly experiencing weird issues.
After a successful save (running the game in Unity editor), if I stop playing and then start playing again, EasySave can't find the key.

It's been working just fine for a month, and I haven't changed the way my savemanager works, so I am pretty stumped.
I've attached a screen of my FSM – first thing that happens when it runs is that "Init" sends the "Load" event, so EasySave's Load All runs first. And breaks.

Any ideas what is happening? I'd love any pointers.¨
Thanks,
/John


System.Collections.Generic.KeyNotFoundException: Key "Database" was not found in file "/Users/johnsoby/Library/Application Support/InventMill Media LLC/Lost Pathways/SaveFile.es3". Use Load<T>(key, defaultValue) if you want to return a default value if the key does not exist.
at ES3Reader.Read[T] (System.String key) [0x00058] in /Users/johnsoby/Documents/Lost Pathways/Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:204
at ES3.Load[T] (System.String key, ES3Settings settings) [0x0003b] in /Users/johnsoby/Documents/Lost Pathways/Assets/Plugins/Easy Save 3/Scripts/ES3.cs:443
at ES3PlayMaker.LoadAll.Enter () [0x00000] in /Users/johnsoby/Documents/Lost Pathways/Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:513
at ES3PlayMaker.ActionBase.OnEnter () [0x00000] in /Users/johnsoby/Documents/Lost Pathways/Assets/Plugins/Easy Save 3/PlayMaker/ES3PlayMaker.cs:43
Attachments
FSM.jpg
FSM.jpg (164.02 KiB) Viewed 458 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Key not found

Post by Joel »

Hi John,

Please could you send me a screenshot of each of the following:
  1. A screenshot of your Easy Save settings in Tools > Easy Save 3 > Settings, with the Advanced Settings foldout open.
  2. A screenshot of the Save All action you're using to save to the Database key.
All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
JohnS
Posts: 5
Joined: Thu Jul 27, 2023 2:17 pm

Re: Key not found

Post by JohnS »

You bet – thanks for your quick response!
Attachments
FSM save.jpg
FSM save.jpg (158 KiB) Viewed 454 times
JohnS
Posts: 5
Joined: Thu Jul 27, 2023 2:17 pm

Re: Key not found

Post by JohnS »

And this:
Attachments
settings.jpg
settings.jpg (253.16 KiB) Viewed 452 times
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Key not found

Post by Joel »

Thanks for sending that over.

Everything looks fine there, but you do appear to be using an older version, so I first recommend updating.

If this doesn't resolve your issue, please could you replicate your issue in a minimal project with a simple scene and private message it to me with instructions so I can see what's happening.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
JohnS
Posts: 5
Joined: Thu Jul 27, 2023 2:17 pm

Re: Key not found

Post by JohnS »

Thanks. After updating, the error now changed into a sharing violation..? I tried changing the path, but nothing changed.

I'll see if I can reproduce it in a separate project and DM you.
Thanks,
/John

.IO.IOException: Sharing violation on path /Users/johnsoby/Documents/Lost Pathways/Saves/SaveFile.es3
at ES3Internal.ES3Stream.CreateStream (ES3Settings settings, ES3Internal.ES3FileMode fileMode) [0x00111] in /Users/johnsoby/Documents/Lost Pathways/Assets/Plugins/Easy Save 3/Scripts/Streams/ES3Stream.cs:69
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Key not found

Post by Joel »

Hi there,

A sharing violation usually means that the file is open externally (i.e. in a text editor or being used by another piece of software), or your project is using threads and the file is being used in multiple threads at the same time. I'd first make sure the file isn't open anywhere if you haven't already.

Otherwise if you could reproduce it in a new project I'll take a look to see what is happening.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
JohnS
Posts: 5
Joined: Thu Jul 27, 2023 2:17 pm

Re: Key not found

Post by JohnS »

Just made a brand new project and the exact same SaveManager runs just perfectly in that one.
Guess I'm the culprit somehow. I'll go through my statemachines and try to figure out where it goes wrong.
Thanks for your help.

/John
Post Reply