• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Flight - Sessions - UI - Data - Unexpected persistance across sessions

Messages
1,361
Country
scotland
Please ingnore this post/thread. - A stupid mistake on my part.

Hi Folks

Just a head's up for Flight developers,
of something I'd long suspected, but not previously proven.

Data from one Flight.exe session
is persisting in memory
across multiple Flight.exe sessions.

Data in this example is a Text label, referenced by an _id GUID.
This method appears to be used for data passed to Flight's UI.
e.g.
Missions scorecategory - Text _id
Airplanes livery - Description _id

It may possibly apply to other non-UI methods.



Background -
Working on an edited version of an MS default Flight mission.

Investigating adding an extra scorecategory, (displays on the UI's post-mission score-summary screen).
I'd created a scorecategory dummy placeholder, named "Blatant Cheeseburgers".

Despite having since assigned a new-value, "Penalty MLW exceeded",
the old-value "Blatant Cheeseburgers"
has persisted across 7 subsequent Flight.exe sessions.

Code:
  <ScoreCategory>
  <Name>Penalty_Overload_MLW</Name>
  <Text _id="{25510134-CDB7-46fb-9C01-8ADF2A6A0BD7}">Penalty MLW exceeded</Text>
  <MaximumScore>0</MaximumScore>
  </ScoreCategory>



I'd confirmed persistance across sessions -
- The loaded addon was the current build, (by changing a loadtime evaluated element).
- The JobBoard had been purged between sessions. %AppData%\Local\Microsoft\Flight\Shared\JobBoard\.
- Fully uninstalled/deleted the addon, (DLC folder & content were removed).
- Launched a new Flight session whilst the addon was uninstalled, my mission was not listed.
- Installed a newer version of my addon, launched a new Flight session, my mission was listed.

Flew the mission to completion,
the old-value "Blatant Cheeseburgers" was still displayed.



Not tested -
Persistance across OS user logoff/logon.
Assigning a new GUID.



HTH
ATB
Paul
 
Last edited:
Paul, that is literally impossible. When a program exits Windows frees all memory. The only way this is possible is if it got saved to disk and reloaded. If it is a generated mission, then it could be that Flight is caching the generated missions to disk for particular job boards, and they aren't cleared when Flight shuts down.


If you are using a existing Flight mission and text isn't changing, there may be a different explanation:

_id is a localization id. It needs to be unique at least per document, but should be globally unique. At runtime Flight uses this _id and then looks up the localized value for it in the language specific .resources file associated with the file containing the _id. Any time you see a text element or any element with a _id, the string in property is just a default if there is no known .resources file.

Example:
foo.pak contains a file, bar.spb which contains an element:
<Text _id="unique guid">Some default text</Text>

If your language is set to English, it also loads a pak file from the Languages\foo.en-us.pak. This pak file contains bar.spb.resources:
This resources file is a SimProp file that contains a mapping from "unique guid" to the English version of the string. Flight uses this string at runtime instead of "Some default text" in bar.spb

If your language is set to Spanish, it also loads a pak file from the Languages\foo.es-ES.pak. This pak file contains bar.spb.resources:
This resources file is a SimProp file that contains a mapping from "unique guid" to the Spanish version of the string. Flight uses this string at runtime instead of "Some default text" in bar.spb
 
Hi Steve

Many thanks for your reply.

re: literally impossible

Flight.exe being a wrapper incorporating several 3rd party modules,
I'd suspected my old-value data was being persisted
by another instance of Adobe Flash, (i.e. a shared environment).



I'd created the old-value "Blatant Cheeseburgers" many months ago,
and only attempted superceding with a useful label, on Saturday.

Your followup comments on .resources files rang an alarm bell.
On checking the relevant .resources, my old-value was present.



My apologies for my misleading post.



HTH
ATB
Paul
 
Flight.exe isn't a wrapper, it is self contained, and the flash player it uses for UI is not based on Adobe Flash player. Glad you found the problem though :)
 
Back
Top