Debian 9:org.eclipse.swt.SWTError:打开 Eclipse 后立即不再有句柄

Debian 9:org.eclipse.swt.SWTError:打开 Eclipse 后立即不再有句柄

我最近换了笔记本电脑并安装了 Debian 9。在新机器上,打开 Eclipse 安装程序后几乎立即收到以下错误消息:

org.eclipse.swt.SWTError:没有更多句柄,位于 org.eclipse.swt.SWT.error(SWT.java:4725),位于 org.eclipse.swt.SWT.error(SWT.java:4614),位于 org.eclipse.swt.SWT.error(SWT.java:4585),位于 org.eclipse.swt.widgets.Widget.error(Widget.java:532),位于 org.eclipse.swt.widgets.Control.drawBackground(Control.java:235),位于 org.eclipse.swt.widgets.Control.windowProc(Control.java:6800),位于 org.eclipse.swt.widgets.Display.windowProc(Display.java:6132),位于org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:4166) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1429) 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:1585) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4661) at org.eclipse.oomph.setup.internal.installer.AbstractSimpleDialog.show(AbstractSimpleDialog.java:155) at org.eclipse.oomph.setup.internal.installer.InstallerApplication.run(InstallerApplication.java:250) at org.eclipse.oomph.setup.internal.installer.InstallerApplication.start(InstallerApplication.java:408) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) 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:660) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1468) 在 org.eclipse.equinox.launcher.Main.main(Main.java:1441)

当我下载没有安装程序的 Eclipse (2019-06) 时,我可以成功打开 Eclipse,但在第一次单击(在文本编辑器或工具栏中)后,我得到了

未处理的事件循环异常没有更多句柄

进而

内部错误 发生 SWTError。建议您退出工作台。后续错误可能会发生,并可能在无警告的情况下终止工作台。有关更多详细信息,请参阅 .log 文件。

您想退出工作台吗?

日志文件:

!SESSION 2019-07-02 16:32:14.505 ----------------------------------------------- eclipse.buildId=4.12.0.I20190605-1800 java.version=1.8.0_212 java.vendor=Oracle Corporation BootLoader 常量:OS=linux、ARCH=x86_64、WS=gtk、NL=en_US 框架参数:-product org.eclipse.epp.package.java.product 命令行参数:-os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product

这是日志文件 /home/xxxxx/eclipse-workspace/.metadata/.bak_0.log 的延续 创建时间:2019-07-02 16:32:42.144

!ENTRY org.eclipse.ui 4 0 2019-07-02 16:32:42.144 !MESSAGE 状态处理期间发生错误 !STACK 0 org.eclipse.swt.SWTError: 没有更多句柄 at org.eclipse.swt.SWT.error(SWT.java:4725) at org.eclipse.swt.SWT.error(SWT.java:4614) at org.eclipse.swt.SWT.error(SWT.java:4585) at org.eclipse.swt.widgets.Widget.error(Widget.java:532) at org.eclipse.swt.widgets.Control.drawBackground(Control.java:235) at org.eclipse.swt.widgets.Control.windowProc(Control.java:6800) at org.eclipse.swt.widgets.Display.windowProc(Display.java:6132) at org.eclipse.swt.internal.gtk.GTK._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.GTK.gtk_main_do_event(GTK.java:4166) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1429) 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:1585) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4661) at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.showStatusAdapter(WorkbenchErrorHandler.java:84) at org.eclipse.ui.statushandlers.WorkbenchErrorHandler.handle(WorkbenchErrorHandler.java:52) at org.eclipse.ui.internal.ide.IDEWorkbenchErrorHandler.handle(IDEWorkbenchErrorHandler.java:105) at org.eclipse.ui.internal.WorkbenchErrorHandlerProxy.handle(WorkbenchErrorHandlerProxy.java:34) at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:214) at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:256) at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:266) at org.eclipse.ui.application.WorkbenchAdvisor.eventLoopException(WorkbenchAdvisor.java:325) at org.eclipse.ui.internal.ExceptionHandler.handleException(ExceptionHandler.java:65) at org.eclipse.jface.window.Window.runEventLoop(Window.java:827) at org.eclipse.jface.window.Window.open(Window.java:799) at org.eclipse.ui.internal.dialogs.AboutDialog.lambda$0(AboutDialog.java:134) at org.eclipse.swt.custom.BusyIndi​​cator.showWhile(BusyIndi​​cator.java:72) at org.eclipse.ui.internal.dialogs.AboutDialog.buttonPressed(AboutDialog.java:130) at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:622) at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5874) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5138) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4663) 在 org.eclipse.jface.window.Window.runEventLoop(Window.java:823) 在 org.eclipse.jface.window.Window.open(Window.java:799) 在 org.eclipse.ui.internal.about.AboutHandler.execute(AboutHandler.java:31) 在 org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283) 在 org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:95) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:498) 在org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:320) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:254) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:498) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:488) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:392) at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580) at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) 在 org.eclipse.swt.widgets.Display.sendEvent(Display.java:5874) 在 org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1400) 在 org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:5138) 在 org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4663) 在 org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173) 在 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)在 org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062) 在 org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) 在 org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635) 在 org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) 在 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559) 在 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) 在org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155) 在 org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137) 在 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) 在 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498) 在 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660) 在 org.eclipse.equinox.launcher.Main.basicRun(Main.java:597) 在 org.eclipse.equinox.launcher.Main.run(Main.java:1468) 在 org.eclipse.equinox.launcher.Main.main(Main.java:1441)

我阅读了所有能找到的资料,并尽可能地尝试了解决方案,但到目前为止,对我都不起作用。特别是,我尝试了这些帖子中的解决方案: eclipse org.eclipse.swt.SWTError:没有更多句柄 https://stackoverflow.com/questions/2018553/swt-no-more-handles

我没有安装任何插件,没有安装带有多台显示器的硬件,错误与我自己编写的任何程序无关(我甚至无法打开文件)。我无法按照此处的建议将编辑器更改为窗口生成器(https://stackoverflow.com/questions/15594590/eclipse-bug-unhandled-event-loop-exception-no-more-handles) 因为 Eclipse 崩溃得太快了。

任何帮助都将不胜感激!

答案1

我在家里也遇到了同样的问题。我能够通过以 root 身份在终端中执行以下命令来解决这个问题:

im-config

我通过以下两个屏幕确认了“是”。

我在不同的选择中选择了cjkv。 选择屏幕

我确认了 OK

我重新启动了电脑,问题已经解决。

相关内容