http://www.lemmster.de/2013-12-19-swterror-no-more-handles-gtk_init_check-failed-running-platform-tests-on-linux.html

SWTError: No more handles [gtk_init_check() failed] running platform tests (on Linux)

Thu 19 December 2013
by Markus A. Kuppe

in eclipse

When running platform tests on Linux (and Mac?) one might encounter the following exception:

org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4445)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:929)
at org.eclipse.swt.widgets.Display.create(Display.java:913)
at org.eclipse.swt.graphics.Device.<init>(Device.java:157)
at org.eclipse.swt.widgets.Display.<init>(Display.java:509)
at org.eclipse.swt.widgets.Display.<init>(Display.java:500)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:1719)
at org.eclipse.e4.ui.tests.workbench.InjectionThreadDomainTest.setUp(InjectionThreadDomainTest.java:84)
at junit.framework.TestCase.runBare(TestCase.java:139)
at junit.framework.TestResult$1.protect(TestResult.java:122)
at junit.framework.TestResult.runProtected(TestResult.java:142)
at junit.framework.TestResult.run(TestResult.java:125)
at junit.framework.TestCase.run(TestCase.java:129)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at junit.framework.TestSuite.runTest(TestSuite.java:255)
at junit.framework.TestSuite.run(TestSuite.java:250)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:131)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
at org.eclipse.pde.internal.junit.runtime.CoreTestApplication.run(CoreTestApplication.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:587)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:198)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:109)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:80)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:372)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:226)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

The underlying cause isn't found in SWT though, but in the .launch configuration's environment setting. In order to run the tests on a dedicated DISPLAY to avoid interferences, tests set the DISPLAY env var explicitly. Thus, an X instance has to be made available. This is easily done by installing Xvfb the X virtual frame buffer (e.g. "sudo apt-get install xvfb") and starting it on 1:0 with "Xvfb :1 &". Voilà, this magically increases the number of handles. ;-)

SWTError: No more handles [gtk_init_check() failed] running platform tests (on Linux)的更多相关文章

  1. 报错:org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:4517)

    在Mars.Kepler的版本裡,時常會出現以下錯誤導致eclipse無法進行運作 Error.log org.eclipse.swt.SWTError: No more handles     at ...

  2. myeclipse启动错误:org.eclipse.swt.SWTError: No more handles

    myeclipse启动错误,生成日志: !SESSION 2014-11-06 09:13:16.296 ----------------------------------------------- ...

  3. eclipse报这个错误org.eclipse.swt.SWTError: No more handles (eclipse 和 TeamViewer 冲突)

    错误:  org.eclipse.swt.SWTError: No more handles     at org.eclipse.swt.SWT.error(SWT.java:4387)     a ...

  4. org.eclipse.swt.SWTError: No more handles的解决办法

    今天装了JBoss Tools 3.1 插件后,eclipse 打开jsp文件老是报错,或者要我关闭: org.eclipse.swt.SWTError: No more handles 网上找了两个 ...

  5. Running Protractor Tests on Docker

    配置这个Protractor环境真是折磨死人了,webdriver-manage update怎么都不成功,即使自己下载好chromederiver放到相应文件夹下,也不能使用.费时三四天终于按照ht ...

  6. org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests

    https://blog.csdn.net/qq_43349162/article/details/115285780 https://blog.csdn.net/Think_and_work/art ...

  7. Eclipse CDT launch failed.Binary not found in Linux/Ubuntu

    转自:http://blog.csdn.net/abcjennifer/article/details/7573916 Linux下出现launch failed.Binary not found的解 ...

  8. launch failed.Binary not found in Linux/Ubuntu解决方案

    Linux下出现launch failed.Binary not found的解决方案: 首先当你把网上关于mingw的解决方案都看晕了的时候,告诉你,别看关于mingw的了.Linux下不用ming ...

  9. (转) launch failed.Binary not found in Linux/Ubuntu解决方案

    原地址: http://blog.csdn.net/abcjennifer/article/details/7573916 Linux下出现launch failed.Binary not found ...

随机推荐

  1. python学习笔记——Thread常用方法

    Thread对象中的一些方法: 以前说过多线程,用到threading模块中的Thread对象,其中的start和run方法比较熟悉了,start()是重载了Thread对象中的run方法,其实作用还 ...

  2. 多线程之----定时器TIMER

    结上一篇  多线程的简单介绍  http://www.cnblogs.com/duanxiaojun/p/6595847.html 在上一讲中我主要是对多线程学习这个系列做了一个大致的学习计划,然后对 ...

  3. 【Hadoop】MapReduce笔记(四):MapReduce优化策略总结

    Cloudera 提供给客户的服务内容之一就是调整和优化MapReduce job执行性能.MapReduce和HDFS组成一个复杂的分布式系统,并且它们运行着各式各样用户的代码,这样导致没有一个快速 ...

  4. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs&qu ...

  5. android opengl es 源码

    [转自:http://blog.csdn.net/happyhell/article/details/6086973] The entire OpenGL ES API on Android is i ...

  6. ASP.NET中MessageBox的实现

    asp.net中没有MessageBox这个控件,固然可以插入Winform里的MessageBox,但一般不提倡,所以只能变通实现,主要有这几种方法: 1.直接利用javascript的alert和 ...

  7. Spring Boot 学习系列(04)—分而治之,多module打包

    此文已由作者易国强授权网易云社区发布. 欢迎访问网易云社区,了解更多网易技术产品运营经验. 明确功能,各司其职 在一个结构清晰的项目中,一个没有module划分的结构显然不是最佳实践.有人会说可以在同 ...

  8. 细说CSS中的display属性

    相信大部分奋战在前端的,尤其在前端攻城的过程中,有一种越陷越深的感觉,不错,一如前端深似海,从此妹子是浮云啊,前端上手容易,深入难啊!下面我就CSS中的display属性讲下我自己所积累的,与大家共享 ...

  9. MyBatis源码解析(一)

    <!-- mybatis文件配置,扫描所有mapper文件 --><!--SqlSessionFactoryBean的初始化参数--> <bean id="sq ...

  10. python操作rabbitmq实现广播效果

    生产方(Fanout_Publisher.py) # __author__ = 'STEVEN' import pika #开启socket connection = pika.BlockingCon ...