-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
'Avalonia.OpenGL.OpenGlException': Unable to make the context current #5562
Comments
@kekekeks ☝️ |
Disabling |
I am getting the very same issue if WGL is enabled even for simpler apps on various Windows 10 and Windows 11 machines.
You can see that in TID the thread id is 7, hence, not the UI thread which would be 1. Maybe this helps... |
Is there any update on this issue or plan on working on it? It is still happening. This should be a very high priority bug as it is essentially a non-starter for any project that wants to use OpenGL within Avalonia on Windows. |
There are plans to finish and merge #6391 before 11.0. That should be way more stable. |
That is strange, I got the same exception on X11
|
@StipecMV that's a completely different issue. Your |
Any updates? |
Still happening, please fix this issue, as this is very disturbing. The issue happens only on NVidia graphics cards. I know this because I was writing my on UI Framework and having the same issue. The best way to handle this is just to add Try/Catch when drawing and handle specifically OpenGlException, then just print the exception instead |
"The issue happens only on Nvidia graphics cards" is incorrect. Intel/AMD/Nvidia does not matter. It throws this exception randomly. It is just an OpenGL implementation error. |
It is just an OpenGL implementation error. And your last statement contradicts with your first statement. Which one is true? |
I thought it might be from threading. But i checked again without threading turned on on my own UI framework, still the same. Turning on "high performance" mode on nvidia still solves the issue, but we can't expect end users to do this. |
I don't think windows or any driver will change to active gpu during the runtime. So that may be true that integrated gpus do have a problem with avalonia's opengl control. But my tests shows the almost opposite. This exception occurs very randomly. That does not mean it won't happen. It is likely to happen anyone that uses avalonia's opengl control in an app. This error will never get a solution from avalonia team, (This is just my guess) It is possible that they can't replicate the issue at all. |
Not just Avalonia though, my own UI library also have the same problem. It uses Silk.NET OpenGL for backend and SkiaSharp. Could either be problem with OpenGl and .NET itself. But this is just my guess EDIT: Using the dedicated graphics device no longer fix my problem. Idk why EDIT2: Here's how i fixed it on my own ui library: try
{
SkiaCtx.Flush();
}
catch (Exception e)
{
Console.WriteLine(e);
} |
Describe the bug
OpenGL rendering controls works just fine but about in 2 minutes, it crashes with this exception:
'Avalonia.OpenGL.OpenGlException': Unable to make the context current
Also, nobody returns my e-mail about paid support request. Hope you guys are okay.
To Reproduce
Screenshots
Additional context
Logs:
The text was updated successfully, but these errors were encountered: