-
-
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
OpenGlException: eglMakeCurrent failed with error EGL_CONTEXT_LOST #4128
Comments
Just confirming I saw this same error too today - while resizing a window which had opened and displayed fine previously. |
Please, try with this PR #4242 |
I will try and update if it works, thanks. |
@kekekeks Didn't happen for me since I started using the latest nightly build but I also switched to the deferred renderer (not sure if it matters). Also, it's probably worth noting that this exception occurred to me only when logging to a computer through RDP. |
Just to confirm, I've seen it happen 2-3 times running on a normal session, not via RDP so (assuming mine is the same issue) it's not confined just to RDP sessions. |
The thing is, there are two scenarios when EGL_CONTEXT_LOST can happen:
The first one we need to handle properly, but for second one we need to determine what was causing it, since invalid calls might cause worse errors as well. |
It used to happen because of RDP but just now it happened when I was just opening the window and it has different stack trace - Also, if it helps - I noticed one of the exceptions had different error code - |
I encountered this today while upgrading my graphics drivers for AvaloniaUI/XamlControlsGallery#4 while XamlControlGallery was running. Probably not all that useful, but here's the exception and stack trace: Click to expandAvalonia.OpenGL.OpenGlException: 'eglCreateWindowSurface failed with error EGL_CONTEXT_LOST (0x300E)'
|
CONTEXT_LOSS handling is a must have feature. Especially on a notebooks. After a sleep users are getting almost 100% repro. This is making them angry a lot :) App freeze/crash + potential progress loss is a pain. |
No progress on this? I encountered this issue today while simply resizing the main window of my app. |
@kekekeks as a quick solution - maybe let's handle CONTEXT_LOSS with exception? So we can handle it as unobserved exception, save all the changes in app and restart it. Now device lost generates a freeze of app on MakeCurrent EGL method on windows - it's a disaster, because we can't handle this. Only solution now is to listen to Render Thread responsiveness from background thread and if there is a minute lag - restart the app. |
|
I'm seeing this issue if I leave an application open and then put Windows to sleep. Upon wakeup, the exception will fire 100% of the time. |
This happens to me when using the version on the master, it's very rare but happened 3 times when I logged into my computer and opened the window using the Show functions.
AllowEglInitialization=true and UseDeferredRendering = false
Application: Blast.exe CoreCLR Version: 5.0.20.27801 .NET Version: 5.0.0-preview.5.20278.1 Description: The process was terminated due to an unhandled exception. Exception Info: Avalonia.OpenGL.OpenGlException: eglMakeCurrent failed with error EGL_CONTEXT_LOST (0x300E) at Avalonia.OpenGL.EglContext.MakeCurrent(EglSurface surface) at Avalonia.OpenGL.EglGlPlatformSurface.RenderTarget.BeginDraw() at Avalonia.Skia.GlRenderTarget.BeginRenderingSession() at Avalonia.Skia.SkiaGpuRenderTarget.CreateDrawingContext(IVisualBrushRenderer visualBrushRenderer) at Avalonia.Rendering.ImmediateRenderer.Paint(Rect rect) at Avalonia.Win32.WindowImpl.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) This happens to me when I use Acrylic + UseGPU randomly, couldn't find any issue like this, are you familiar with it or I should open an issue?
The text was updated successfully, but these errors were encountered: