-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Failed to create an SDL2 GL context (Invalid window) #21641
Comments
The attached logs don't have the crash you describe, try running the game again and attached the latest logs. How/where did you get the exception stack trace? |
Check out runtime.log, the error message is on the very top, it’s just that the game keeps logging some more after the SDL error. I got the stack trace when running osu! from the flatpak command line but I got a similar trace when debugging osu-framework (maybe we should move the issue there) in Rider. |
@pcktm pull in ppy/osu-framework#5585 and see if you get a more verbose error message. |
Pulled and ran VisualTests from osu-framework since it also exhibits this behavior of displaying a window and hanging but nothing new was logged to console nor logs. Interestingly the InvalidOperationException you added doesn't throw and I even added a debugger breakpoint on it just to be sure - doesn't break. |
The |
This is probably something specific to your system. Not really sure how to go about debugging this. But give vulkan a try, pull in the latest changes and apply this diff: diff --git a/osu.Framework/Platform/GameHost.cs b/osu.Framework/Platform/GameHost.cs
index bc472e5da..67b44c129 100644
--- a/osu.Framework/Platform/GameHost.cs
+++ b/osu.Framework/Platform/GameHost.cs
@@ -40,6 +40,7 @@
using SixLabors.ImageSharp.PixelFormats;
using SixLabors.ImageSharp.Processing;
using osu.Framework.Graphics.Textures;
+using osu.Framework.Graphics.Veldrid;
using osu.Framework.Graphics.Video;
using osu.Framework.IO.Serialization;
using osu.Framework.IO.Stores;
@@ -324,7 +325,7 @@ protected GameHost([NotNull] string gameName, [CanBeNull] HostOptions options =
};
}
- protected virtual IRenderer CreateRenderer() => new GLRenderer();
+ protected virtual IRenderer CreateRenderer() => new VeldridRenderer();
/// <summary>
/// Performs a GC collection and frees all framework caches.
@@ -703,7 +704,7 @@ public void Run(Game game)
SetupForRun();
- Window = CreateWindow(GraphicsSurfaceType.OpenGL);
+ Window = CreateWindow(GraphicsSurfaceType.Vulkan);
populateInputHandlers();
|
Unfortunately, veldrid has some trouble loading some shared library. I've got vulkan-headers and the corresponding drivers installed, yet it throws:
Can't figure out what dependency is missing, |
Looks to be a known issue happening across certain linux distros (mellinoe/nativelibraryloader#19), seems we can fix this locally by using |
Inspired by @frenzibyte comment I linked |
To provide more context to this issue I tried tracing it some more in debugger and caught this exception:
The Tried |
Got it! After explicitly setting the runtime in Rider to .NET Core instead of automatic visual-tests finally ran! Looks like for some reason it was selecting Mono? Anyway, it runs correctly only with the above patch, so there's still something wrong since non-nullable PrimaryDisplay => (Displays ?? getSDLDisplays()).First(); a good enough fix? If so, I'd submit a PR to osu-framework. |
Could you post the full stack trace?
This is not a proper solution. |
It appears that there may be a race condition causing the deadlock? Debugging the code step-by-step seems to allow the frames to be drawn correctly, but when running freely, the issue occurs after a few (amount isn't constant) executions of the The previously mentioned issue with |
I was able to successfully launch the game consistently by debugging the first few frames step-by-step and then muting all breakpoints. The game launches without hanging when visual tests are run after this process. |
After setting the ExecutionMode to SingleThread, the osu! game was able to launch successfully. However, there still appears to be an issue with the multithreaded mode on my system but I do not have the expertise to troubleshoot this issue further. I'd be happy to provide the development team any additional info. Thank you! |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Type
Crash to desktop
Bug description
AppImage version of the game used to run fine on my system and now it opens a black window and hangs (probably after some system update as I'm on a rolling distro). Tried building from source - builds fine, opens a black window and hangs. I rebuilt flatpak image with never version since the flathub one is outdated and it ran fine for a few weeks but now doesn't even open a window saying:
Screenshots or videos
No response
Version
2022.1208.0 but is present in earlier releases too
Logs
database.log
input.log
network.log
performance.log
runtime.log
The text was updated successfully, but these errors were encountered: