Project in Launcher window sometimes disappears when selected
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Release Type: Official Release
Version: Launcher v5.0.5
Platform(s): Windows 7
Describe the bug
Sometimes when you open your project in the Stride Launcher window it'll be removed from the list.
You are then required to open it via Browse button in the Project selection window.
To Reproduce
Steps to reproduce the behavior:
- Open your project in the Launcher window. It's a gamble if it stays or not.
Expected behavior
Project should stay on the list.
Additional context
I looked into it a long time ago, but have forgotten about the details and don't know how to fix this.
Files that may or may not be relevant:
From what I vaguely recall about the issue, there might be a couple of issues going on.
FileSystemWatcher is considered unreliable/not well behaved. From my testing, sometimes FileSystemWatcher will flood the Changed event when saving the user's profile settings file, causing multiple reloads (as per SettingsProfile).
When you select a project to open, LauncherViewModel.StartStudio is called from RecentProjectViewModel, which calls LauncherSettings.Save, which will then trigger FileSystemWatcher's events, which then SettingsProfile will reload the settings file.
The part I don't fully remember is how it is sometimes able to hold the project list without the project you selected to open, then I believe decides to save your settings with that list (ie. causing the save to occur without the selected project). I believe this happens somewhere in the midst of the save/FileSystemWatcher.Change reload events.
One possibility I'm wondering is if it might be that Game Studio is also registering FileSystemWatcher on its own SettingsProfile causing interference between the two apps.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with LauncherViewModel.cs around StartStudio and trace LauncherSettings.Save through SettingsProfile.cs, SettingsContainer.cs, and MostRecentlyUsedFileCollection.cs. Reproduce the project selection flow on Windows and inspect the FileSystemWatcher reload sequence; done means the selected project reliably remains in the Launcher list after opening.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100