|Summary:||[WPE] Add some error reporting during EGL display/context creation|
|Product:||WebKit||Reporter:||Adrian Perez <aperez>|
|Component:||WPE WebKit||Assignee:||Adrian Perez <aperez>|
|Severity:||Normal||CC:||bugs-noreply, cgarcia, clopez, commit-queue, magomez, mcatanzaro, webkit-bug-importer, zan|
Description Adrian Perez 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.
Comment 1 Adrian Perez 2017-10-27 08:15:25 PDT
Created attachment 325162 [details] RFC patch, to get the discussion started.
Comment 2 Carlos Alberto Lopez Perez 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.
Comment 3 Miguel Gomez 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! :)
Comment 4 Michael Catanzaro 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.
Comment 5 Adrian Perez 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.
Comment 7 Carlos Alberto Lopez Perez 2017-10-30 15:18:29 PDT
Comment on attachment 325382 [details] Patch It seems the GTK EWS failed.
Comment 8 Carlos Alberto Lopez Perez 2017-10-31 03:40:20 PDT
Comment on attachment 325382 [details] Patch r- due to failed GTK EWS on the patch
Comment 9 Adrian Perez 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 ;-)
Comment 10 Adrian Perez 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.
Comment 11 WebKit Commit Bot 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>
Comment 12 WebKit Commit Bot 2017-11-02 11:56:02 PDT
All reviewed patches have been landed. Closing bug.