Bug 178937

Summary: [WPE] Add some error reporting during EGL display/context creation
Product: WebKit Reporter: Adrian Perez <aperez>
Component: WPE WebKitAssignee: Adrian Perez <aperez>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, clopez, commit-queue, magomez, mcatanzaro, webkit-bug-importer, zan
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=178896
Attachments:
Description Flags
RFC patch, to get the discussion started.
none
Patch
none
Patch none

Adrian Perez
Reported 2017-10-27 08:11:46 PDT
Currently it is very hard to determine what went wrong when EGL fails to create valid contexts for us, with only the following being written into standard error (see bug #178896 for one instance of this): PlatformDisplayWPE: could not create the EGL display. It would be a good idea to add some calls to “eglGetError()” and write some more information to standard error on failure. Admittedly, using “eglGetError()” won't get us particularly chatty messages, but it would be better than the current situation.
Attachments
RFC patch, to get the discussion started. (11.55 KB, patch)
2017-10-27 08:15 PDT, Adrian Perez
no flags
Patch (14.29 KB, patch)
2017-10-30 15:12 PDT, Adrian Perez
no flags
Patch (14.46 KB, patch)
2017-10-31 05:00 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2017-10-27 08:15:25 PDT
Created attachment 325162 [details] RFC patch, to get the discussion started.
Carlos Alberto Lopez Perez
Comment 2 2017-10-30 05:34:59 PDT
Comment on attachment 325162 [details] RFC patch, to get the discussion started. Looks good to me. I think getting a meaningful error when things go wrong is very important. I hate when things just crash or fail without telling why. So feel free to upload it for review. I will r+ it if no further comments in a few days from other reviewer.
Miguel Gomez
Comment 3 2017-10-30 05:39:42 PDT
(In reply to Adrian Perez from comment #1) > Created attachment 325162 [details] > RFC patch, to get the discussion started. LGTM as well! :)
Michael Catanzaro
Comment 4 2017-10-30 07:08:56 PDT
As I mentoined in bug #178896, the output when I run dyz is now: PlatformDisplayWPE: could not create the EGL display: EGL_SUCCESS. Cannot create EGL context: invalid display (last error: EGL_BAD_PARAMETER) I'm not sure why there's no PlatformDisplayWPE if the error is EGL_SUCCESS, but that should have a different error message. Reminds me of those "Error: success" Windows screeshots.
Adrian Perez
Comment 5 2017-10-30 12:50:37 PDT
Provided that we seem to agree in that having this landed, I'll rebase the patch, add a proper ChangeLog entry, and re-upload it.
Adrian Perez
Comment 6 2017-10-30 15:12:19 PDT
Carlos Alberto Lopez Perez
Comment 7 2017-10-30 15:18:29 PDT
Comment on attachment 325382 [details] Patch It seems the GTK EWS failed.
Carlos Alberto Lopez Perez
Comment 8 2017-10-31 03:40:20 PDT
Comment on attachment 325382 [details] Patch r- due to failed GTK EWS on the patch
Adrian Perez
Comment 9 2017-10-31 03:47:32 PDT
(In reply to Carlos Alberto Lopez Perez from comment #8) > Comment on attachment 325382 [details] > Patch > > r- due to failed GTK EWS on the patch I'm on it. The build failure happens locally for me so it won't be hard fix and make sure the GTK+ port builds fine as well ;-)
Adrian Perez
Comment 10 2017-10-31 05:00:53 PDT
Created attachment 325432 [details] Patch This version builds fine, it includes "GLContextEGL.h" when USE(EGL) is enabled.
WebKit Commit Bot
Comment 11 2017-11-02 11:56:00 PDT
Comment on attachment 325432 [details] Patch Clearing flags on attachment: 325432 Committed r224347: <https://trac.webkit.org/changeset/224347>
WebKit Commit Bot
Comment 12 2017-11-02 11:56:02 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.