Ubuntu cmd build: No more handles [gtk_init_check() failed]

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ubuntu cmd build: No more handles [gtk_init_check() failed]

4,669 Views
gsj889
Contributor I
Trying to run a build on a docker container with mcuxpresso already installed (https://gist.github.com/mneil/f0894b715c43a5387b15a30afd7015e1)
 
I am running:
mcuxpressoide -nosplash --launcher.suppressErrors -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data /home/jenkins/wsp -import /home/jenkins/myproject -build myproject
 
 It seems like the ide is still trying to bring up the UI even though I am running over terminal...any thoughts on what I can be missing?
 
!SESSION 2020-10-10 22:52:05.053 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -application org.eclipse.cdt.managedbuilder.core.headlessbuild -import /home/jenkins/myproject -build myproject
Command-line arguments: -os linux -ws gtk -arch x86_64 -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data /home/jenkins/wsp -import /home/jenkins/myproject -build myproject

!ENTRY com.nxp.mcuxpresso.core.datamodels 1 0 2020-10-10 22:52:08.031
!MESSAGE Recreating part support. No part support available.

!ENTRY com.crt.log 1 0 2020-10-10 22:52:08.115
!MESSAGE Unable to find part support for NXP MIMXRT1052xxxxB in project myproject Resetting to generic part for core cm7.
 
!ENTRY org.eclipse.osgi 4 0 2020-10-10 22:52:11.662
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
at org.eclipse.swt.SWT.error(SWT.java:4746)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:1117)
at org.eclipse.swt.widgets.Display.create(Display.java:1057)
at org.eclipse.swt.graphics.Device.<init>(Device.java:175)
at org.eclipse.swt.widgets.Display.<init>(Display.java:623)
at org.eclipse.swt.widgets.Display.<init>(Display.java:614)
at org.eclipse.swt.widgets.Display.getDefault(Display.java:2278)
at org.eclipse.jface.preference.PreferenceConverter.<clinit>(PreferenceConverter.java:100)
at org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants.initializeDefaultValues(AbstractDecoratedTextEditorPreferenceConstants.java:745)
at org.eclipse.ui.editors.text.TextEditorPreferenceConstants.initializeDefaultValues(TextEditorPreferenceConstants.java:291)
at org.eclipse.ui.internal.editors.text.EditorsPluginPreferenceInitializer.initializeDefaultPreferences(EditorsPluginPreferenceInitializer.java:44)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:307)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:310)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:134)
at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:374)
at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:225)
at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:279)
at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:372)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:626)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:769)
at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:41)
at org.eclipse.core.runtime.preferences.DefaultScope.getNode(DefaultScope.java:77)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultPreferences(ScopedPreferenceStore.java:222)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferenceNodes(ScopedPreferenceStore.java:251)
at org.eclipse.ui.preferences.ScopedPreferenceStore.contains(ScopedPreferenceStore.java:308)
at org.eclipse.ui.texteditor.ChainedPreferenceStore.getVisibleStore(ChainedPreferenceStore.java:466)
at org.eclipse.ui.texteditor.ChainedPreferenceStore.contains(ChainedPreferenceStore.java:141)
at org.eclipse.xtext.builder.EclipseOutputConfigurationProvider.getBoolean(EclipseOutputConfigurationProvider.java:173)
at org.eclipse.xtext.builder.EclipseOutputConfigurationProvider.createAndOverlayOutputConfiguration(EclipseOutputConfigurationProvider.java:144)
at org.eclipse.xtext.builder.EclipseOutputConfigurationProvider.createAndOverlayOutputConfiguration(EclipseOutputConfigurationProvider.java:153)
at org.eclipse.xtext.builder.EclipseOutputConfigurationProvider.getOutputConfigurations(EclipseOutputConfigurationProvider.java:112)
at org.eclipse.xtext.builder.BuilderParticipant.getOutputConfigurations(BuilderParticipant.java:652)
at org.eclipse.xtext.builder.BuilderParticipant.build(BuilderParticipant.java:247)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant$DeferredBuilderParticipant.build(RegistryBuilderParticipant.java:162)
at org.eclipse.xtext.builder.impl.RegistryBuilderParticipant.build(RegistryBuilderParticipant.java:70)
at org.eclipse.xtext.builder.impl.XtextBuilder.doBuild(XtextBuilder.java:392)
at org.eclipse.xtext.builder.impl.XtextBuilder.addInfosFromTaskAndBuild(XtextBuilder.java:322)
at org.eclipse.xtext.builder.impl.XtextBuilder.fullBuild(XtextBuilder.java:429)
at org.eclipse.xtext.builder.impl.XtextBuilder.build(XtextBuilder.java:202)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:833)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:220)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:343)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:470)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:565)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:603)
at org.eclipse.core.internal.resources.Project.build(Project.java:124)
at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager$2.buildProject(ManagedBuildManager.java:4565)
at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager$2.run(ManagedBuildManager.java:4542)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2292)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2312)
at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager.buildConfigurations(ManagedBuildManager.java:4574)
at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager.buildConfigurations(ManagedBuildManager.java:4454)
at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.buildConfigurations(HeadlessBuilder.java:282)
at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.start(HeadlessBuilder.java:560)
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:401)
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:657)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:594)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
2 Replies

3,909 Views
superspud9
Contributor II

I came across this exact issue.  I was able to solve it by removing any mention of xtext from my .project file.  I removed two entries from there, one in the builders section and one in the natures section.  After doing that, I was able to get headless builds working without having to setup X11

4,632 Views
gsj889
Contributor I

Just in case, the issue here was that...even though I was using a terminal I to setup X11. This solved my issue:

https://gist.github.com/cschiewek/246a244ba23da8b9f0e7b11a68bf3285

0 Kudos
Reply