New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception when switching window from fullscreen to windowed mode #1493
Comments
Since "Alt+Enter" is working as expected this may not be a big issue, but there is a common practice to add a fullscreen toggler in game video options and it won't work there. |
I'll try to repro this later, but the exceptions you're showing are related to serialization which should have nothing to do with changing window mode, which either should be very worrying or there's something else going on here. |
I'm not so sure if related, but I get a very similar exception when I try to change window size while in fullscreen mode (different asset but same serializer can't be found). |
Ok, so I was able to repro this easily. Basically whenever things change for the GraphicsDevice such that it has to recreate everything it calls The exception message is thrown in the Reload callback of While the underlying serialized data of a texture can be deserialized as an The other issue is why this full reload happens in the first place. Looks like there may be an exception thrown during resizing from FullScreen in
|
@manio143 , thanks for a quick feedback. |
I was able to trace the Alt+Enter behavior to GameForm.cs and seems to be doing the exactly same thing, except in a different moment in the game loop (before calling any of the game's systems, it happens in |
It'll work if you try it like this.
|
That's a nice workaround, tested it myself and it works like a charm. I'll leave one more note here: when changing resolution in fullscreen, these two ways worked for me:
|
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:
Expected behavior
Game window is switched to windowed mode like it was before step 5 execution.
Screenshots
Log and callstacks
ReproducingAfterExceptionConsole.log - console log after you click on continue button (see screenshot above).
Additional context
The text was updated successfully, but these errors were encountered: