Save State is not persisted after exiting the sim (only works when switching flights in-session)

  • Sim Version: 1.6.34.0

  • Frequency: Consistently

  • Severity: Blocker

Bug Description:
Save State does not persist when the user ends a flight and exits Microsoft Flight Simulator 2024. After re-launching the sim, the aircraft loads without the previously saved state (systems state, accumulated flight hours, and other developer-defined Save State values are lost).

The only scenario where Save State reliably works is when the user exits the current flight and loads another flight within the same simulator session (without closing the sim). This behavior is inconsistent with Microsoft Flight Simulator 2020, where Save State persists across a full sim shutdown/restart.

This is a blocker because it prevents users from maintaining continuous aircraft ownership/usage data (such as flight time accumulation) and breaks developer Save State persistence workflows that are expected to survive closing and re-opening the sim.

2 Likes

I can confirm the same type of behaviour in our Airvan. States aren’t saved when exiting the flight, as if the plane stays “loaded” while you are in the menu.

Hi Alex,

It does save the state when you return to the main menu (it’s written to the persistence database). The problem is that it only gets loaded when you start a new flight—and if the user closes the sim, that persisted data can be lost the next time they launch it.

Because of this, I had to implement a WASM-based save-state system instead. The WASM approach stores the state data in the user’s WASM AppData aircraft folder, so it survives sim restarts reliably.

Hopefully Asobo fixes the persistence issue soon, but we can’t wait on it. In the meantime, I can set up the WASM solution for you based on the product name.

1 Like

Hello @Flysimware,

I can also confirm this issue occurs on my 2024-native EMB-110. I am relying on this for the aircraft and EFB settings, but with this issue occurring, now I have to implement a persistent settings system on WASM instead.

Thank you for posting the bug report. Happy holidays BTW, guys (@Flysimware and @SWS-AlexVletsas)!

Regards,
Carlos Daniel González Gómez
NextGen Simulations

2 Likes

Hello @Flysimware

A fix is already on the way to have state.cfg saved when returning to the main menu, following your other bug report: Aircraft load with 50% fuel no matter what - [MSFS 2024] Bug Reports / SDK: Tools/Samples/Documentation - MSFS DevSupport

The case where the player would quit the game directly without going back to the main menu will be reviewed as well.

Regards,
Sylvain

1 Like

Around 20 users have reported the same issue.

One user said the state.cfg is only updated when starting the flight, but never updated during or at the end of the flight.

Another user said he presses “restart flight” when ending the flight to save the progress.

This is new to SU4 and no similar fs20 issue exists.

User reports:

Every time I start the DA42, it’s like the first time. I also noticed the state.cfg file time stamp is not updated upon sim exit. (AppData\Roaming\Microsoft Flight Simulator 2024\SimObjects\Airplanes\COWS_DA42VI\state.cfg). Suggestions please?

same here, MSFS 2024, COWS_DA42VI, with beta, my `state.cfg` timestamp gets updated, but update date/time is when I started a session, not when finished it. the values in there are not what i had in the plane when finishing the session (fuel levels, hobbs and so on). it used to work before su4.

I’ve had similar issues, but found that after a flight,if I go back to the main menu and put the aircraft on another airport it seems to save okay.

All I do is turn the battery on check the service hours before switching off again.

Then shut down my Xbox.

Just FYI, the current easier solution is to click Restart in the menu after the flight. At least it works for planes from other devs that have the same problem after the update so might be worth checking.

In SU4, the only way to force a state.cfg save is to reload the aircraft. So typically, this will happen if you back to main menu and start a new flight with the same aircraft.

Will EFB/JS SetStoredData be affected as well by the fix?

I’m finding inconsistent states between sessions in my EFB app
(Maybe similar to @cdgonzalezgo ?)

1 Like

They’re separate mechanisms so it would be better to track those issues in a separate bug report.

1 Like

This statement was not part of my bug report. But also would be fixed if you get the behavior to work like MSFS20. I was stating that if you go back to the main menu then close the flight you do not save anything. This was a huge shock as this tricked many users. That is why MSFS2020 saves the save state the minute you exit the flight or close the sim from the flight.

Are we likely to see any changes to this in SU5?

Whilst we typically handle state saving using WASM gauges for our internally developed aircraft, our partners (e.g. Black Square) commonly use the state.cfg method for their aircraft, and this has been one of the most commonly reported issues by users.

We’ve also had reports of unexpected behaviour for some users since MSFS 2020, and would really appreciate if the system could be investigated for ways to improve consistency.

Thanks,
Martyn - Just Flight

There will be a partial fix on SU5 that covers the case of a user returning to main menu.
However this will not address the case of a user exiting the sim directly, where a fix is planned for a later update.

Regards,
Sylvain

3 Likes

When you say this part will be fixed. Does that mean the save state will be updated at the time you leave the flight and go back to main menu like 2020 does? Because the issue right now is that the save state does not get saved until you restart a new flight and it gets that data from cache. And that is why closing the sim even after returning to the main menu fails. So in a way if you fix this based on how 2020 works you will fix the bug for closing the sim too. But not if the user closes the sim while in flight. That I see might take more time to solve. Never tested that in 2020 myself.

If you close the sim from in-game with Alt+F4 in 2020 it doesn’t persist, which is quite handy for development/QA testing.

So to me they do not need to fix the closing sim part. Just save the data as soon as you leave the flight and not when we start a new flight like the 2024 currently is doing. So to me SU5 will be the full fix.

1 Like

Yes, this will fully address the issue you reported here if that’s what you have in mind:
Aircraft load with 50% fuel no matter what - [MSFS 2024] Bug Reports / SDK: Tools/Samples/Documentation - MSFS DevSupport

Regards,
Sylvain

1 Like

Hello

The case for persistent vars not being saved on sim exit is addressed in SU5 Beta 1.7.9.0.

Regards,
Sylvain

2 Likes

Hey Sylvain,

I was just testing this in the latest beta and can confirm that the saving of L:Vars now works when exiting a flight. My EX1 L:Vars however are never saved, not when exiting the flight and also not with the workaround of restarting the flight that you have previously mentioned.

Hello @b1e1n7e

Do you mean the L:1 vars?

Yes, I have set up the persistance section in the systems.cfg but when reviewing the change live in the state.cfg they are never being saved. They remain at the value defined in the systems.cfg.

I can record you a quick demonstration if required.

EDIT: I did some further testing and it seems like on top of not being saved, the L:1:Vars are also not initialized at the beginning of the flight.