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).
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.)
(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.)
(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.
(You can still load a separate resource file at runtime using g_resource_load()!)
(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.
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.
Comment on attachment 342706 [details] Patch Makes sense to me, but let's see what Carlos Garcia thinks tomorrow.
Comment on attachment 342706 [details] Patch Clearing flags on attachment: 342706 Committed r232832: <https://trac.webkit.org/changeset/232832>
All reviewed patches have been landed. Closing bug.