Bug 179883 - [WPE] WPEWebProcess: Couldn't find current GLX or EGL context
Summary: [WPE] WPEWebProcess: Couldn't find current GLX or EGL context
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 178894
  Show dependency treegraph
 
Reported: 2017-11-20 05:32 PST by Carlos Garcia Campos
Modified: 2017-11-21 05:37 PST (History)
4 users (show)

See Also:


Attachments
Patch (2.04 KB, patch)
2017-11-20 05:34 PST, Carlos Garcia Campos
zan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-11-20 05:32:11 PST
I'm seeing that message quite often when running the unit tests. The problem seems to be that some tests run so fast that the web process never renders the first frame, so the context is created but never made current. I've checked with apitrace that there are calls to eglQueryContext with null display, causing a EGL_BAD_DISPLAY, but I don't know where those calls are originated, see:

12 eglChooseConfig(dpy = 0x55afaa1eaba0, attrib_list = {EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, EGL_RED_SIZE, 8, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_STENCIL_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_NONE}, configs = &0x55afaa1eba50, config_size = 1, num_config = &1) = EGL_TRUE
13 eglCreateContext(dpy = 0x55afaa1eaba0, config = 0x55afaa1eba50, share_context = 0x7f8c24003290, attrib_list = {EGL_CONTEXT_MAJOR_VERSION, 2, EGL_NONE}) = 0x7f8c240391c0
14 eglCreateWindowSurface(dpy = 0x55afaa1eaba0, config = 0x55afaa1eba50, win = 0x7f8c24039130, attrib_list = {}) = 0x7f8c240476a0
15 eglGetCurrentDisplay() = NULL
16 eglGetCurrentContext() = NULL
17 eglGetCurrentDisplay() = NULL
18 eglQueryContext(dpy = NULL, ctx = NULL, attribute = EGL_CONTEXT_CLIENT_TYPE, value = &0) = EGL_FALSE
19 eglGetError() = EGL_BAD_DISPLAY
Comment 1 Carlos Garcia Campos 2017-11-20 05:34:43 PST
Created attachment 327358 [details]
Patch
Comment 2 Miguel Gomez 2017-11-21 03:36:57 PST
Looks good to me.

The context that is being created is meant to be made current in the compositing thread, so there shouldn't be any problem by making it current when it's created instead of waiting for the first rendered frame.
Comment 3 Carlos Garcia Campos 2017-11-21 05:37:56 PST
Committed r225078: <https://trac.webkit.org/changeset/225078>