Java 在 17.10 上因信号 5 而崩溃

Java 在 17.10 上因信号 5 而崩溃

我在使用 Eclipse Oxygen 时经常遇到崩溃的情况。

在此处输入图片描述 在此处输入图片描述 在此处输入图片描述

这是我的 JDK 版本:

noob@zimus:~$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

我在 Eclipse 日志中也发现了这一点:

!SESSION 2018-04-09 19:53:49.595 -----------------------------------------------
eclipse.buildId=4.7.3.M20180301-0715
java.version=1.8.0_161
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

!ENTRY org.eclipse.jface 2 0 2018-04-09 19:54:31.946
!MESSAGE Ignored reentrant call while viewer is busy. This is only logged once per viewer instance, but similar calls will still be ignored.
!STACK 0
java.lang.RuntimeException
    at org.eclipse.jface.viewers.ColumnViewer.checkBusy(ColumnViewer.java:761)
    at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:528)
    at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:349)
    at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1492)
    at org.eclipse.jface.viewers.StructuredViewer.setFilters(StructuredViewer.java:1624)
    at org.eclipse.ui.internal.navigator.NavigatorFilterService.updateViewer(NavigatorFilterService.java:268)
    at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider.setWorkingSetFilter(WorkingSetActionProvider.java:280)
    at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider.setWorkingSetFilter(WorkingSetActionProvider.java:263)
    at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider.setWorkingSet(WorkingSetActionProvider.java:317)
    at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$3.propertyChange(WorkingSetActionProvider.java:229)
    at org.eclipse.ui.internal.navigator.extensions.ExtensionStateModel.firePropertyChangeEvent(ExtensionStateModel.java:147)
    at org.eclipse.ui.internal.navigator.extensions.ExtensionStateModel.setBooleanProperty(ExtensionStateModel.java:97)
    at org.eclipse.ui.internal.navigator.resources.actions.WorkingSetActionProvider$4.run(WorkingSetActionProvider.java:350)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4577)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4186)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
    at org.eclipse.jface.window.Window.open(Window.java:794)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.showInputDialog(LogonServiceUI.java:429)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.logOnInternal(LogonServiceUI.java:267)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.logOnInternalAndRunInitialClientCompatibilityCheck(LogonServiceUI.java:198)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.ensureLoggedOnInternal(LogonServiceUI.java:162)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.ensureLoggedOn(LogonServiceUI.java:117)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.ensureLoggedOn(LogonServiceUI.java:109)
    at com.sap.adt.destinations.ui.internal.logon.LogonServiceUI.ensureLoggedOn(LogonServiceUI.java:73)
    at com.sap.adt.projectexplorer.ui.internal.tree.AbapRepositoryPackageTreeContentProvider.checkLogonState(AbapRepositoryPackageTreeContentProvider.java:109)
    at com.sap.adt.projectexplorer.ui.internal.tree.AbapRepositoryPackageTreeContentProvider.getChildren(AbapRepositoryPackageTreeContentProvider.java:120)
    at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:95)
    at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:241)
    at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.getChildren(SafeDelegateTreeContentProvider.java:93)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$1.run(NavigatorContentServiceContentProvider.java:157)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.internalGetChildren(NavigatorContentServiceContentProvider.java:143)
    at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.getChildren(NavigatorContentServiceContentProvider.java:129)
    at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren(AbstractTreeViewer.java:1356)
    at org.eclipse.jface.viewers.TreeViewer.getRawChildren(TreeViewer.java:341)
    at org.eclipse.jface.viewers.StructuredViewer.getFilteredChildren(StructuredViewer.java:901)
    at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren(AbstractTreeViewer.java:618)
    at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$0(AbstractTreeViewer.java:812)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:792)
    at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:595)
    at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:763)
    at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand(AbstractTreeViewer.java:1482)
    at org.eclipse.jface.viewers.TreeViewer.handleTreeExpand(TreeViewer.java:880)
    at org.eclipse.jface.viewers.AbstractTreeViewer$3.treeExpanded(AbstractTreeViewer.java:1494)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:133)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1374)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1357)
    at org.eclipse.swt.widgets.Tree.gtk_test_expand_row(Tree.java:2396)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2008)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:5614)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9282)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1328)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2116)
    at org.eclipse.swt.browser.WebKit$Webkit2JavascriptEvaluator.evaluate(WebKit.java:1272)
    at org.eclipse.swt.browser.WebKit.evaluate(WebKit.java:1332)
    at org.eclipse.swt.browser.WebKit.execute(WebKit.java:1150)
    at org.eclipse.swt.browser.Browser.execute(Browser.java:534)
    at com.sap.adt.featureexplorer.ui.internal.views.FeatureExplorerHtmlView$1.run(FeatureExplorerHtmlView.java:261)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4577)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4186)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1472)

大家都能建议如何解决这个问题吗?

答案1

我解决这个问题的建议是将您的第三方 Eclipse Oxygen 替换为原生 Ubuntu 软件,并将您的 Oracle Java Runtime Environment 替换为推荐用于编程的原生 Ubuntu OpenJDK Development Kit (JDK)。我认为 Oracle Java SE Runtime Environment 8 是导致崩溃的软件,但我建议也安装 Eclipse snap 包。

打开终端并输入:

sudo apt install openjdk-8-jdk  
sudo snap install --classic eclipse # this will install Eclipse Oxygen  

当有更新可用时,这两个应用程序都会自动更新。

请注意,经典限制中的 snap 行为就像一个传统打包的应用程序,具有对系统的完全访问权限,并且 Eclipse 插件会安装到目录中/snap/eclipse/current/plugins

Eclipse Oxygen 还支持 openjdk-9-jdk。我在 Eclipse Oxygen 中同时使用 openjdk-8-jdk 和 openjdk-9-jdk。

相关内容