eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
111 stars 127 forks source link

Searching in Eclipse Marketplace causes JRE to detect a fatal error #1230

Open djfitzgerald opened 3 months ago

djfitzgerald commented 3 months ago

Let's make sure issue is not already fixed in latest builds first.

Steps to reproduce

From a fresh installation and clean workspace:

I tried

I expected: To be able to install Groovy

But got: The entire Eclipse application crashed and the JVM took a dump

Here is some relevant log output

From <workspace>/.metadata/.log:

!ENTRY org.eclipse.ui 4 0 2024-05-14 16:57:14.615
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.IllegalArgumentException: Argument not valid
    at org.eclipse.swt.SWT.error(SWT.java:4903)
    at org.eclipse.swt.SWT.error(SWT.java:4837)
    at org.eclipse.swt.SWT.error(SWT.java:4808)
    at org.eclipse.swt.graphics.Image.init(Image.java:1189)
    at org.eclipse.swt.graphics.Image.<init>(Image.java:210)
    at org.eclipse.equinox.internal.p2.ui.discovery.util.GradientCanvas.onPaint(GradientCanvas.java:168)
    at org.eclipse.equinox.internal.p2.ui.discovery.util.GradientCanvas.lambda$0(GradientCanvas.java:81)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1538)
    at org.eclipse.swt.widgets.Control.gtk_draw(Control.java:3927)
    at org.eclipse.swt.widgets.Scrollable.gtk_draw(Scrollable.java:365)
    at org.eclipse.swt.widgets.Composite.gtk_draw(Composite.java:506)
    at org.eclipse.swt.widgets.Canvas.gtk_draw(Canvas.java:174)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2482)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:6883)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:6162)
    at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_do_event(Native Method)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1598)
    at org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Native Method)
    at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.execAsyncAndWaitForReturn(WebKit.java:1282)
    at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.runjavascript(WebKit.java:1030)
    at org.eclipse.swt.browser.WebKit$Webkit2AsyncToSync.evaluate(WebKit.java:1000)
    at org.eclipse.swt.browser.WebKit.evaluate(WebKit.java:1299)
    at org.eclipse.swt.browser.WebKit.close(WebKit.java:865)
    at org.eclipse.swt.browser.WebKit.onDispose(WebKit.java:1792)
    at org.eclipse.swt.browser.WebKit.lambda$4(WebKit.java:768)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1555)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1534)
    at org.eclipse.swt.widgets.Widget.release(Widget.java:1337)
    at org.eclipse.swt.widgets.Control.release(Control.java:4803)
    at org.eclipse.swt.widgets.Widget.dispose(Widget.java:543)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.computeBrowserAvailable(AbstractMarketplaceDiscoveryItem.java:521)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.createInfoLink(AbstractMarketplaceDiscoveryItem.java:394)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.createDescription(AbstractMarketplaceDiscoveryItem.java:341)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.createContent(AbstractMarketplaceDiscoveryItem.java:241)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.createContent(AbstractMarketplaceDiscoveryItem.java:203)
    at org.eclipse.epp.internal.mpc.ui.wizards.DiscoveryItem.createContent(DiscoveryItem.java:123)
    at org.eclipse.epp.internal.mpc.ui.wizards.AbstractMarketplaceDiscoveryItem.<init>(AbstractMarketplaceDiscoveryItem.java:168)
    at org.eclipse.epp.internal.mpc.ui.wizards.DiscoveryItem.<init>(DiscoveryItem.java:102)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.createDiscoveryItem(MarketplaceViewer.java:501)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.doCreateViewerItem(MarketplaceViewer.java:435)
    at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer$3.doCreateItem(CatalogViewer.java:344)
    at org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListViewer.createNewItem(ControlListViewer.java:241)
    at org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListViewer.refreshAll(ControlListViewer.java:483)
    at org.eclipse.equinox.internal.p2.ui.discovery.util.ControlListViewer.inputChanged(ControlListViewer.java:355)
    at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282)
    at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1636)
    at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer.catalogUpdated(CatalogViewer.java:250)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.access$3(MarketplaceViewer.java:1)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.lambda$1(MarketplaceViewer.java:377)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.runUpdate(MarketplaceViewer.java:772)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.catalogUpdated(MarketplaceViewer.java:376)
    at org.eclipse.equinox.internal.p2.ui.discovery.wizards.CatalogViewer.updateCatalog(CatalogViewer.java:589)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.updateCatalog(MarketplaceViewer.java:1049)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplacePage.safeUpdateCatalog(MarketplacePage.java:810)
    at org.eclipse.epp.internal.mpc.ui.wizards.MarketplacePage.lambda$4(MarketplacePage.java:798)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:5040)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4520)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
    at org.eclipse.jface.window.Window.open(Window.java:799)
    at org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand.openWizardDialog(AbstractMarketplaceWizardCommand.java:146)
    at org.eclipse.epp.internal.mpc.ui.commands.AbstractMarketplaceWizardCommand.execute(AbstractMarketplaceWizardCommand.java:73)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:277)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:98)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:298)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:232)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:174)
    at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:165)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:204)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:444)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:442)
    at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:464)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5855)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1529)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5065)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4517)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1432)

Linux console output:

danfitz:~$ /opt/eclipse/eclipse 
May 14, 2024 4:30:38 PM org.apache.aries.spifly.BaseActivator log
INFO: Registered provider ch.qos.logback.classic.spi.LogbackServiceProvider of service org.slf4j.spi.SLF4JServiceProvider in bundle ch.qos.logback.classic
16:30:39.167 [Start Level: Equinox Container: f7de121a-0587-4e64-9d9f-9aeb2694016d] DEBUG org.eclipse.jgit.internal.util.ShutdownHook -- register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$177/0x000000010024b948@d2eeaa3 with shutdown hook
16:30:39.167 [Start Level: Equinox Container: f7de121a-0587-4e64-9d9f-9aeb2694016d] DEBUG org.eclipse.jgit.internal.util.ShutdownHook -- register org.eclipse.jgit.util.FS$FileStoreAttributes$$Lambda$177/0x000000010024b948@d2eeaa3 with shutdown hook
16:30:40.798 [main] DEBUG org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob -- Queued refresh request: [/pw3270/pom.xml]
16:30:40.798 [main] DEBUG org.eclipse.m2e.core.internal.project.registry.ProjectRegistryRefreshJob -- Queued refresh request: [/pw3270/pom.xml]

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.509: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.615: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.622: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.653: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.688: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.865: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:42.865: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar

(Eclipse:101195): Gtk-CRITICAL **: 16:30:55.093: gtk_box_gadget_distribute: assertion 'size >= 0' failed in GtkScrollbar
EGLDisplay Initialization failed: EGL_BAD_ACCESS
libEGL warning: egl: failed to create dri2 screen
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

libEGL warning: egl: failed to create dri2 screen
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f5fcf960c35, pid=101195, tid=101196
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.10+7 (17.0.10+7) (build 17.0.10+7)
# Java VM: 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)
# Problematic frame:
# C  [libgtk-3.so.0+0x360c35]  gtk_widget_is_sensitive+0x25
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/danfitz/core.101195)
#
# An error report file with more information is saved as:
# /home/danfitz/hs_err_pid101195.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.
#
danfitz:~$ 

Tested under this environment:

djfitzgerald commented 3 months ago

hs_err_pid109567.log

djfitzgerald commented 3 months ago

metadata.log

jukzi commented 3 months ago

duplicates https://github.com/eclipse-platform/eclipse.platform.swt/issues/1185 see https://github.com/eclipse-platform/eclipse.platform.swt/issues/1185#issuecomment-2105098212 for workaround

fedejeanne commented 3 months ago

@jukzi good to know that the workaround actually works, thank you!

(Pity that the reporter of #1185 never answered https://github.com/eclipse-platform/eclipse.platform.swt/issues/1185#issuecomment-2106875497)

djfitzgerald commented 3 months ago

@fedejeanne @jukzi The mentioned workaround does not work for me. See attached console log. eclipse.conslog.txt

djfitzgerald commented 3 months ago

Also: the problem doesn't happen for me when the Eclipse Marketplace opens up (as it did in #1185), but only once I have typed "Maven" into the search box and hit enter to begin the search.

iloveeclipse commented 3 months ago

could you attach /home/danfitz/hs_err_pid63659.log too?

djfitzgerald commented 3 months ago

Sure; here you go hs_err_pid63659.log

iloveeclipse commented 3 months ago
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libgobject-2.0.so.0+0x3b2a8]  g_type_check_instance_is_a+0x48
C  [libgtk-3.so.0+0x417c5e]
C  [libswt-atk-gtk-4964r8.so+0x33bd]  Java_org_eclipse_swt_internal_accessibility_gtk_ATK_call__JJ+0xe
J 15486 c1 org.eclipse.swt.accessibility.AccessibleObject.atkObject_ref_state_set(J)J (494 bytes) @ 0x00007f3222a159b4 [0x00007f3222a158c0+0x00000000000000f4]
v  ~StubRoutines::call_stub
V  [libjvm.so+0x829895]  JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*)+0x315
V  [libjvm.so+0x8c27cb]  jni_invoke_static(JNIEnv_*, JavaValue*, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) [clone .constprop.1]+0x38b
V  [libjvm.so+0x8c4bf5]  jni_CallStaticLongMethodV+0x205

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 9620  org.eclipse.swt.internal.accessibility.gtk.ATK.call(JJ)J (0 bytes) @ 0x00007f3228dc24e4 [0x00007f3228dc24a0+0x0000000000000044]
J 15486 c1 org.eclipse.swt.accessibility.AccessibleObject.atkObject_ref_state_set(J)J (494 bytes) @ 0x00007f3222a159b4 [0x00007f3222a158c0+0x00000000000000f4]
v  ~StubRoutines::call_stub
J 5704  org.eclipse.swt.internal.gtk3.GTK3.gtk_main_iteration_do(Z)Z (0 bytes) @ 0x00007f3228f7de61 [0x00007f3228f7de20+0x0000000000000041]
J 10747 c1 org.eclipse.swt.widgets.Display.readAndDispatch()Z (88 bytes) @ 0x00007f32223160ac [0x00007f3222315ee0+0x00000000000001cc]
j  org.eclipse.jface.operation.ModalContext$ModalContextThread.block()V+19
j  org.eclipse.jface.operation.ModalContext.run(Lorg/eclipse/jface/operation/IRunnableWithProgress;ZLorg/eclipse/core/runtime/IProgressMonitor;Lorg/eclipse/swt/widgets/Display;)V+126
j  org.eclipse.jface.wizard.WizardDialog.run(ZZLorg/eclipse/jface/operation/IRunnableWithProgress;)V+78
j  org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.doQuery(Lorg/eclipse/epp/internal/mpc/ui/wizards/MarketplaceViewer$QueryData;Ljava/util/Set;)Lorg/eclipse/core/runtime/IStatus;+33
j  org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceViewer.doQuery()Lorg/eclipse/core/runtime/IStatus;+10

OK, this is not webkit. Could you try to load core file into gdb and attach backtrace?

gdb /home/danfitz/core.6365
bt