RESOLVED FIXED 186588
[WPE] Trying to access the remote inspector hits an assertion in the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=186588
Summary [WPE] Trying to access the remote inspector hits an assertion in the UIProcess
Adrian Perez
Reported 2018-06-13 01:51:03 PDT
Setting “WEBKIT_INSPECTOR_SERVER=127.0.0.1:8787” in the environment before running e.g. Cog, and then trying to open “inspector://127.0.0.1:8787” in Epiphany results in the following assertion being hit: (cog:2873): GLib-CRITICAL **: 10:13:52.759: g_bytes_get_data: assertion 'bytes != NULL' failed The UIProcess will segfault immediately after printing the above. This happens both in “trunk” and the current stable version (2.20.0).
Attachments
Patch (9.19 KB, patch)
2018-06-13 16:24 PDT, Adrian Perez
no flags
Adrian Perez
Comment 1 2018-06-13 01:53:58 PDT
After some investigation I have been able to determine that this issue is caused by resources inside “libWPEWebInspectorResources.so” having incorrect base paths: % gresource list $PREFIX/lib/wpe-webkit-0.1/libWPEWebInspectorResources.so|grep Commands /org/webkitgtk/inspector/UserInterface/Images/DOMComment.svg /org/webkitgtk/inspector/UserInterface/Protocol/InspectorBackendCommands.js (Note that the “/org/webkitgtk” prefix is being used, when it should have been “/org/wpe” in this case.)
Michael Catanzaro
Comment 2 2018-06-13 06:05:12 PDT
(If you're bored, libWPEWebInspectorResources.so should almost certainly be turned into a GResource bundle, like it is for WebKitGTK+, instead of a separate shared object.)
Zan Dobersek
Comment 3 2018-06-13 06:13:15 PDT
(In reply to Michael Catanzaro from comment #2) > (If you're bored, libWPEWebInspectorResources.so should almost certainly be > turned into a GResource bundle, like it is for WebKitGTK+, instead of a > separate shared object.) It hasn't been yet since it would bloat up the libWPEWebKit.so binary, while as a separate .so object it can at least be copied over to the target device when in need of debugging.
Michael Catanzaro
Comment 4 2018-06-13 06:16:24 PDT
(You can still load a separate resource file at runtime using g_resource_load()!)
Zan Dobersek
Comment 5 2018-06-13 06:30:46 PDT
(In reply to Michael Catanzaro from comment #4) > (You can still load a separate resource file at runtime using > g_resource_load()!) TIL. That could work I guess.
Adrian Perez
Comment 6 2018-06-13 16:24:00 PDT
Created attachment 342706 [details] Patch First I thought of adding --gtk/--wpe switches to the Python script which generates the XML manifest passed to glib-compile-resources, but then it dawned on me that it is not really needed to differentiate between resources at /org/webkitgtk/inspector and /org/wpe/inspector: they are the same, and it cannot ever happen anyway that both resource sets are loaded into the same process... So why not just using the same /org/webkit/inspector prefix for both ports? This way it will be less likely that breakage is introduced again in the future.
Michael Catanzaro
Comment 7 2018-06-13 17:09:46 PDT
Comment on attachment 342706 [details] Patch Makes sense to me, but let's see what Carlos Garcia thinks tomorrow.
WebKit Commit Bot
Comment 8 2018-06-13 23:39:21 PDT
Comment on attachment 342706 [details] Patch Clearing flags on attachment: 342706 Committed r232832: <https://trac.webkit.org/changeset/232832>
WebKit Commit Bot
Comment 9 2018-06-13 23:39:23 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.