eclipse.platform.swt icon indicating copy to clipboard operation
eclipse.platform.swt copied to clipboard

Eclipse crashes when rendering tooltips with formatted javadoc.

Open robmv opened this issue 1 year ago • 4 comments

Describe the bug

After updating the OS (Fedora Linux 39) of the package javascriptcoregtk4.1 2.44.0-2.fc39, Eclipse keeps crashing every time it will try to render HTML. The previous version was 2.42.5-1.fc39

To Reproduce

  1. Open Eclipse in a Wayland session.
  2. Open any Java source file.
  3. Hover over a Java class or method from the base class library like String to show its javadoc
  4. The UI hangs and a few second later it crashes.

Before the crash this is show on stderr:

(Eclipse:26511): Gdk-CRITICAL **: 12:06:11.663: gdk_window_create_gl_context: assertion 'GDK_IS_WINDOW (window)' failed

Expected behavior

A Javadoc tooltip is shown.

Environment:

  1. Select the platform(s) on which the behavior is seen:
    • [ ] All OS
    • [ ] Windows
    • [x] Linux
    • [ ] macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)

Fedora Linux 39 x86_64

  1. JRE/JDK version

OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (17.0.10+7, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)

Version since

Eclipse 2024-03 (4.31.0)

Workaround (or) Additional context

Running Eclipse with the X11 backend instead of Wayland with GDK_BACKEND=x11 is a workaround.

Native stack trace of the WebKitGTK crash

The bugs is reported on WebKit bugzilla as a regression, reporting it here in case the Eclipse code is making a mistake in its WebKit usage.

robmv avatar Apr 01 '24 17:04 robmv

I assume this is the same problem as

https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-2028049433

and that the workaround described in that issue still works.

merks avatar Apr 02 '24 06:04 merks

Yes it looks like that stack trace at #158-2027347825 but not the original bug report of #158. The WEBKIT_DISABLE_COMPOSITING_MODE=1 workaround works, without needed to 'downgrade' to X11.

robmv avatar Apr 02 '24 13:04 robmv

@iloveeclipse @akurtakov

I wonder if it's possible that SWT can detect configurations that are known not to work and inform the user? After all, an issue like the following one has been open "forever" without resolution:

https://github.com/eclipse-platform/eclipse.platform.swt/issues/158

merks avatar Apr 20 '24 06:04 merks

I wonder if it's possible that SWT can detect configurations that are known not to work and inform the user?

SWT itself has no "feedback loop" to user, IDE / products would be responsible for that - if we would have a reliable way to detect the crash.

In theory this would be an external JVM started that would try to open a browser via SWT and we checking for the response.

iloveeclipse avatar Apr 22 '24 06:04 iloveeclipse