Exception when switching window from fullscreen to windowed mode
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: 4.1.0.1734
Platform: Windows
Describe the bug
Exception during switching to windowed mode.
To Reproduce
Steps to reproduce the behavior:
- Create a new game project using default settings
- Add a SyncScript asset with the following code:
using Stride.Engine;
using Stride.Input;
public class FullScreenToggler : SyncScript
{
public override void Update()
{
if (Input.Keyboard.IsKeyDown(Keys.F))
{
Game.Window.IsFullscreen = !Game.Window.IsFullscreen;
}
}
}
- Add a ScriptComponent with the script from step 2 to the Camera (or any other) entity.
- Run the game using F5 hotkey (or in any other way).
- Toggle fullscreen mode using the "F" or "Alt+Enter" hotkey.
- Toggle windowed mode using exactly "F" hotkey (handled by the script from step 2).
Expected behavior
Game window is switched to windowed mode like it was before step 5 execution.
Screenshots

Log and callstacks
- ReproducingExceptionInfo.txt
ReproducingAfterExceptionConsole.log - console log after you click on continue button (see screenshot above). - RealProjectExceptionInfo.txt
Additional context
- Using the "Alt+Enter" hotkey in step 6 (for switching back from fullscreen mode to windowed) works as expected.
- Even an empty scene with the only empty entity on it which has the ScriptComponent with the script from step 2 works as described.
- There are also similar issues, but they all belongs to a different kind of exception.
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 by reproducing the issue with the FullScreenToggler SyncScript and the Game.Window.IsFullscreen transition described in the steps. Review the linked exception information and console logs to identify the fullscreen-to-windowed path involved. Done means switching back with the script's F hotkey returns to windowed mode without an exception, while Alt+Enter continues to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop, game-dev, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100