Bug 545275 - [Wayland] Eclipse crashes after interaction with WebKit
Summary: [Wayland] Eclipse crashes after interaction with WebKit
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.11   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard: RHT
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2019-03-11 14:25 EDT by Roland Grunberg CLA
Modified: 2019-03-20 15:27 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Grunberg CLA 2019-03-11 14:25:43 EDT
Using Eclipse SDK (master) from http://eclipse.matbooth.co.uk/flatpak/ .

Version: 2019-03 (4.11)
Build id: I20190211-1800

1) Start Eclipse in a new workspace
2) Create a new Java project
3) Open the type hierarchy (ctrl+shift+t) and open java.lang.Object
4) Hover over the Object type defintion (or anything that might display hover info with some data)
5) Once the hover gets focus (ie. doesn't disappear), start double clicking quickly, while continuing to move the mouse some small distance within the bounds of the hover.

Step 5 usually, though not consistently results in a crash.

C  [libwayland-client.so.0+0x82a4]  wl_proxy_get_user_data+0x4

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 2507  org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(JZ)Z (0 bytes) @ 0x00007f831c574e84 [0x00007f831c574e40+0x0000000000000044]
J 11155 c2 org.eclipse.swt.widgets.Display.readAndDispatch()Z (77 bytes) @ 0x00007f831c61b220 [0x00007f831c61af80+0x00000000000002a0]
Comment 1 Eric Williams CLA 2019-03-14 14:30:09 EDT
I believe this isn't an SWT bug, but instead something missing from our flatpak configuration.

When opening the hover and clicking around in it, I see the following messages before the crash:

libEGL warning: wayland-egl: could not open /dev/dri/card0 (No such file or directory)
WaylandCompositor requires eglBindWaylandDisplayWL, eglUnbindWaylandDisplayWL and eglQueryWaylandBuffer.
Nested Wayland compositor could not initialize EGL


Googling around that error message led me to find this:

https://gitlab.gnome.org/GNOME/gnome-news/commit/a4eead423207875d150b8d782783facd3f6ae7eb

I don't know anything about flatpak but it looks like some argument has been added to a settings/definition file. Mat, what do you think?
Comment 2 Eric Williams CLA 2019-03-14 16:27:43 EDT
Update: the /dev/dri/card0 issue is not the cause of the bug, as the crash still happens with --device=dri set as a launch option. I can also reproduce the bug in the Javadoc view, by clicking on some class, detaching the javadoc view, and then clicking around in the detached view. The stacktrace then becomes:

C  [libjavascriptcoregtk-4.0.so.18+0xf56f2c]  WTF::String::tryGetUtf8(WTF::ConversionMode) const+0xc

I'll continue to bisect.
Comment 3 Eric Williams CLA 2019-03-15 14:46:47 EDT
The issue does not appear to exclusive to Java hovers. Clicking around, specifically dragging around the Javadoc view (detached or not) reproduces the crash.

I am not sure what exactly the problem is...will continue to investigate.
Comment 4 Eric Williams CLA 2019-03-20 10:26:50 EDT
Might be related: https://bugs.webkit.org/show_bug.cgi?id=194698
Comment 5 Eric Williams CLA 2019-03-20 11:29:06 EDT
Reproduces on upstream Eclipse, not just flatpak.
Comment 6 Eric Williams CLA 2019-03-20 15:06:58 EDT
The issue is fixed in WebKit-GTK 2.24. I have confirmed this by building it on my machine and testing with Eclipse -- the issue isn't reproducible anymore.