eclipse.platform.swt
eclipse.platform.swt copied to clipboard
[Wayland] Eclipse crashes on latest Ubuntu
Eclipse IDE frequently crashs for me on the latest Ubuntu release.
Eclipse SDK Version: 2022-06 (4.24) Build id: I20220512-1800 OS: Linux, v.5.15.0-27-generic, x86_64 / gtk 3.24.33, WebKit 2.36.0 Java vendor: Eclipse Adoptium Java runtime version: 17.0.1+12 Java version: 17.0.1
Error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f306673c3c4, pid=6457, tid=6458
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.1+12 (17.0.1+12) (build 17.0.1+12)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (17.0.1+12, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libcairo.so.2+0x643c4] cairo_region_num_rectangles+0x4
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/vogella/dev/eclipse-2022-05-05/eclipse/core.6457)
#
# An error report file with more information is saved as:
# /home/vogella/dev/eclipse-2022-05-05/eclipse/hs_err_pid6457.log
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Please attach /home/vogella/dev/eclipse-2022-05-05/eclipse/hs_err_pid6457.log and exact versions of gtk / cairo libraries.
Note that the latest 17.x version is currently 17.0.3+7 though it's unlikely a bug in the JVM....
It seems this is the same crash. Eclipse is very unstable, it also exhibits jittery display in the Project Explorer, triggered by mouse moves. Crashes often when code assist popups Are shown. Behaviour was the same on JDK17.
@mutatrum : Is the crash reproducible? If yes, please provide steps to reproduce. Looks like you are using wayland. Can you please switch to X11?
/home/vogella/dev/eclipse-2022-05-05/eclipse/hs_err_pid6457.log
Sorry was on holiday.
Cairo library:
vogella@Scyth:/usr/lib$ dpkg -l | grep cairo
ii gtk2-engines-murrine:amd64 0.98.2-3build2 amd64 cairo-based gtk+-2.0 theme engine
ii libcairo-gobject-perl:amd64 1.005-3build1 amd64 integrate Cairo into the Glib type system in Perl
ii libcairo-gobject2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library (GObject library)
ii libcairo-perl:amd64 1.109-2build1 amd64 Perl interface to the Cairo graphics library
ii libcairo-script-interpreter2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library (script interpreter)
ii libcairo2:amd64 1.16.0-5ubuntu2 amd64 Cairo 2D vector graphics library
ii libcairomm-1.0-1v5:amd64 1.12.2-4build3 amd64 C++ wrappers for Cairo (shared libraries)
ii libdecor-0-plugin-1-cairo:amd64 0.1.0-3build1 amd64 default decoration plugin
ii libpangocairo-1.0-0:amd64 1.50.6+ds-2 amd64 Layout and rendering of internationalized text
ii libpixman-1-0:amd64 0.40.0-1build4 amd64 pixel-manipulation library for X and cairo
ii python3-cairo:amd64 1.20.1-3build1 amd64 Python3 bindings for the Cairo vector graphics library
ii python3-gi-cairo 3.42.0-3build1 amd64 Python 3 Cairo bindings for the GObject library
Here is the log (can't attach all was it is too long)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f306673c3c4, pid=6457, tid=6458
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.1+12 (17.0.1+12) (build 17.0.1+12)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (17.0.1+12, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C [libcairo.so.2+0x643c4] cairo_region_num_rectangles+0x4
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/vogella/dev/eclipse-2022-05-05/eclipse/core.6457)
#
# If you would like to submit a bug report, please visit:
# https://github.com/adoptium/adoptium-support/issues
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- S U M M A R Y ------------
Command Line: -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM /home/vogella/dev/eclipse-2022-05-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher /home/vogella/dev/eclipse-2022-05-05/eclipse/eclipse -name Eclipse --launcher.library /home/vogella/dev/eclipse-2022-05-05/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.2.500.v20220509-0833/eclipse_11701.so -startup /home/vogella/dev/eclipse-2022-05-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar --launcher.appendVmargs -exitdata b -vm /home/vogella/.sdkman/candidates/java/current/bin/java -vmargs -Dosgi.requiredJavaVersion=11 -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Xms256m -Xmx2048m --add-modules=ALL-SYSTEM -jar /home/vogella/dev/eclipse-2022-05-05/eclipse//plugins/org.eclipse.equinox.launcher_1.6.400.v20210924-0641.jar
Host: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz, 8 cores, 31G, Ubuntu 22.04 LTS
Time: Sat May 21 10:21:01 2022 CEST elapsed time: 43.768422 seconds (0d 0h 0m 43s)
--------------- T H R E A D ---------------
Current thread (0x00007f30b0024950): JavaThread "main" [_thread_in_native, id=6458, stack(0x00007f30b62d8000,0x00007f30b63d8000)]
Stack: [0x00007f30b62d8000,0x00007f30b63d8000], sp=0x00007f30b63d4f58, free space=1011k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libcairo.so.2+0x643c4] cairo_region_num_rectangles+0x4
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 2780 org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(J)V (0 bytes) @ 0x00007f30a10b7069 [0x00007f30a10b7020+0x0000000000000049]
J 10964 c2 org.eclipse.swt.widgets.Display.eventProc(JJ)J (212 bytes) @ 0x00007f30a146c3b8 [0x00007f30a146c300+0x00000000000000b8]
v ~StubRoutines::call_stub
J 2769 org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Z)Z (0 bytes) @ 0x00007f30a10b6469 [0x00007f30a10b6420+0x0000000000000049]
J 12276 c1 org.eclipse.swt.widgets.Display.readAndDispatch()Z (88 bytes) @ 0x00007f309ae9533c [0x00007f309ae951c0+0x000000000000017c]
j org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run()V+564
j org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12
j org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(Lorg/eclipse/e4/ui/model/application/MApplicationElement;Lorg/eclipse/e4/core/contexts/IEclipseContext;)Ljava/lang/Object;+57
j org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(Lorg/eclipse/e4/ui/model/application/MApplicationElement;)V+20
j org.eclipse.ui.internal.Workbench.lambda$3(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;[I)V+393
j org.eclipse.ui.internal.Workbench$$Lambda$246+0x0000000800dfd588.run()V+12
j org.eclipse.core.databinding.observable.Realm.runWithDefault(Lorg/eclipse/core/databinding/observable/Realm;Ljava/lang/Runnable;)V+12
j org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+16
j org.eclipse.ui.PlatformUI.createAndRunWorkbench(Lorg/eclipse/swt/widgets/Display;Lorg/eclipse/ui/application/WorkbenchAdvisor;)I+2
j org.eclipse.ui.internal.ide.application.IDEApplication.start(Lorg/eclipse/equinox/app/IApplicationContext;)Ljava/lang/Object;+113
j org.eclipse.equinox.internal.app.EclipseAppHandle.run(Ljava/lang/Object;)Ljava/lang/Object;+138
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ljava/lang/Object;)Ljava/lang/Object;+85
j org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(Ljava/lang/Object;)Ljava/lang/Object;+79
j org.eclipse.core.runtime.adaptor.EclipseStarter.run(Ljava/lang/Object;)Ljava/lang/Object;+99
j org.eclipse.core.runtime.adaptor.EclipseStarter.run([Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Object;+132
v ~StubRoutines::call_stub
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+0 [email protected]
j jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+133 [email protected]
j jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+6 [email protected]
j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+59 [email protected]
j org.eclipse.equinox.launcher.Main.invokeFramework([Ljava/lang/String;[Ljava/net/URL;)V+201
j org.eclipse.equinox.launcher.Main.basicRun([Ljava/lang/String;)V+159
j org.eclipse.equinox.launcher.Main.run([Ljava/lang/String;)I+4
j org.eclipse.equinox.launcher.Main.main([Ljava/lang/String;)V+10
v ~StubRoutines::call_stub
siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000004
0x00007f30b63d4f88: 00007fct 20 2021 12:00:24 by "" with gcc 7.5.0
END.
Way to reproduce:
- Open Welcome Screen
- Click on Migrate
- Click on Eclipse Platform
Bye bye Eclipse
@vogella : are you also using wayland? If yes, can you please switch to X11 & check if that will still crash?
@nnemkin @akurtakov @niraj-modi FYI this bugs makes Eclipse impossible to use with latest Ubuntu.
@vogella : are you also using wayland? If yes, can you please switch to X11 & check if that will still crash?
Works fine with X11. Still a critial bug as Ubuntus deault is Wayland.
Couple of queries: Is it a regression in 4.24 M3 ? Also is it specific to Java17 ?
@sravanlakkimsetti @joel-majano Any idea here ?
Is your ubuntu fully uptodate?
Same on Debian 10
Eclipse crashes frequently and unpredictably under Debian 10. It could not be reproduced yet. In a forum there was a tip to start Eclipse with the command line option -Djdk.gtk.version=2. But that does not help. Eclipse is therefore no longer usable under Debian, which is very regrettable.
Please check one of the crash-reports:
Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-20-amd64
Output of "Help->About Eclipse-> "Copy build Id informatin to clipboard":
Eclipse IDE for Java Developers (includes Incubating components) Version: 2022-03 (4.23.0) Build id: 20220310-1457 OS: Linux, v.4.19.0-20-amd64, x86_64 / gtk 3.24.5 Java vendor: Eclipse Adoptium Java runtime version: 17.0.2+8 Java version: 17.0.2
My Eclipse is running with openjdk version "11.0.15" 2022-04-19.
Same on Debian 10
Eclipse crashes frequently and unpredictably under Debian 10. It could not be reproduced yet. In a forum there was a tip to start Eclipse with the command line option -Djdk.gtk.version=2. But that does not help. Eclipse is therefore no longer usable under Debian, which is very regrettable.
Please check one of the crash-reports:
Operating System: Debian GNU/Linux 10 (buster) Kernel: Linux 4.19.0-20-amd64
This is a different crash related to webkit. Please open this as a separate issue.
@sravanlakkimsetti
OK, sorry.
I did open a new issue.
I tried to reproduce this problem on Ubuntu 22.04 Eclipse SDK Version: 2022-06 (4.24) Build id: I20220525-1800 OS: Linux, v.5.15.0-33-generic, x86_64 / gtk 3.24.33, WebKit 2.36.2 Java vendor: Eclipse Adoptium Java runtime version: 17.0.3+7 Java version: 17.0.3
Cannot reproduce this problem. Tried using gnome and Ubuntu desktop environments.
From the description I think the help web app is not getting launched.
Cannot reproduce this problem
@sravanlakkimsetti : have you tried with Wayland or X11? It crashes on Wayland only, at least for Lars, see above.
I used wayland
Note, that there are few bugs reporting same crash in cairo_region_num_rectangles on Wayland for Eclipse like https://bugs.openjdk.java.net/browse/JDK-8244794, they are also on wayland (see loaded libraries section).
I wonder if there is some additional precondition for the crash.
I have some feeling it could be even driver specific issue.
For me It started on Ubuntu 21.10/JDK 17.0.3+7, Eclipse 4.23.
It also occured on 4.22M3:
The steps above (Welcome -> Migrate -> Eclipse platform) seem to trigger it. Other than that, I have no clear reproduction steps, but the first sign is flickering of the text in the project view. Flickering is triggered by cursor and mouse movement, however, the flickering is not there on startup. The use of a console or terminal view seems to initiate the flickering.
One side-effect I sometimes see: after a refactoring, the edit pane is briefly showing colored diagonal lines.
Screenshot of the edit pane, this flashes for a few 100ms, after a refactor:

Not sure if this is related, but I can't remember this seeing before.
Is your ubuntu fully uptodate?
Yes
Is your ubuntu fully uptodate?
Yes. Ubuntu 22.04, gnome 42.1, libgtk-3-0:amd64 3.24.33-1ubuntu2
I tried to reproduce. Installed fresh Ubuntu 22.04, Eclipse I20220531-0600. Clicked various buttons for a few minutes, seen no problems.
For those who can reproduce it:
- Add
-XX:+CreateCoredumpOnCrashto youreclipse.ini, for example after-Xmx2048m. - Run this command to enable core dumps in your Linux:
$ ulimit -c unlimited - Reproduce crash
- Find the core dump (look in ~ and Eclipse dir)
- Compress (7z is quite good) and share the dump.
I never tried these steps myself (with Eclipse), hopefully it will work as intended.
Note that the dump will likely contain all memory of eclipse's process, which may include sources you opened, password, etc. So it's a good idea to reproduce with a clean workspace.
I got a similar issue with Eclipse 2022-03 on Ubuntu 2204 Jammy Jellyfish.
After one or more class, method, or variable renamings, the Java editor window becomes the same as the screenshot of the post of mutatrum above for a couple of seconds. Then, the memory usage of Eclipse starts growing until Eclipse crashes.
Didn't observe the same behavior on Ubuntu 2004 Focal Fossa.
@AmiDavidW could you please follow steps from https://github.com/eclipse-platform/eclipse.platform.swt/issues/158#issuecomment-1142873959 to capture a core dump?
I have now renamed variables 20 times, but didn't have any problems
Thanks @SyntevoAlex Did you see the Java editor became same as the screenshot above?
Following the instructions, I created a new workspace and tried some renames. The Jave editor still changed to the screenshot during the renaming. However, Eclipse didn't crash.
I'm checking what is the difference between the two workspaces.
So far, I noticed that, in the log of the old workspace, the error below repeats itself hundreds of times with an interval of 10ms. Can this be a hint?
!ENTRY org.eclipse.ui.ide 4 4 2022-05-30 16:22:28.135
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
at org.eclipse.swt.graphics.Transform.<init>(Transform.java:147)
at org.eclipse.swt.graphics.Transform.<init>(Transform.java:79)
at org.jkiss.dbeaver.ui.controls.VerticalButton.paint(VerticalButton.java:250)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5895)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1546)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
at org.eclipse.swt.widgets.Control.gtk_draw(Control.java:3890)
at org.eclipse.swt.widgets.Scrollable.gtk_draw(Scrollable.java:365)
at org.eclipse.swt.widgets.Composite.gtk_draw(Composite.java:496)
at org.eclipse.swt.widgets.Canvas.gtk_draw(Canvas.java:181)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2389)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:6834)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:6210)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1565)
at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4578)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)
Sorry for the delay!
Did you see the Java editor became same as the screenshot above?
No, I didn't see any problems at all.
the error below repeats itself hundreds of times
You caught a bug in org.jkiss.dbeaver.ui.controls.VerticalButton.paint(). I understand that this is a 3rd party plugin you have installed in Eclipse?
The bug is due to a non-disposed 'Transform' here: https://github.com/dbeaver/dbeaver/blob/f4a5ad3e0860f3d3c2239d902e3bfb6086d311a3/plugins/org.jkiss.dbeaver.ui/src/org/jkiss/dbeaver/ui/controls/VerticalButton.java#L250 I suggest that you report it to DBeaver.
The bug is harmless on Linux, because on Linux, Transform.handle doesn't contain any native resources to be leaked. However, on Windows for example, this is an actual leak of memory.
Summary: this is a bug, but it doesn't explain the crash.