Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Plugins causes failure when eclipse is run in a headless mode #88

Open
truhlikfredy opened this issue Jun 26, 2018 · 0 comments
Open

Plugins causes failure when eclipse is run in a headless mode #88

truhlikfredy opened this issue Jun 26, 2018 · 0 comments

Comments

@truhlikfredy
Copy link
Collaborator

When building in a headless mode the whole build works fine and when it's finished in the end it will fail here:

!ENTRY org.eclipse.osgi 4 0 2018-06-26 22:03:19.829
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]
	at org.eclipse.swt.SWT.error(SWT.java:4559)
	at org.eclipse.swt.widgets.Display.createDisplay(Display.java:955)
	at org.eclipse.swt.widgets.Display.create(Display.java:942)
	at org.eclipse.swt.graphics.Device.<init>(Device.java:174)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:566)
	at org.eclipse.swt.widgets.Display.<init>(Display.java:557)
	at org.eclipse.swt.widgets.Display.getDefault(Display.java:2228)
	at com.googlecode.cppcheclipse.ui.Console.getConsoleOutputStream(Console.java:84)
	at com.googlecode.cppcheclipse.core.command.AbstractCppcheckCommand.<init>(AbstractCppcheckCommand.java:72)
	at com.googlecode.cppcheclipse.core.command.VersionCommand.<init>(VersionCommand.java:14)
	at com.googlecode.cppcheclipse.core.ProblemProfile.<init>(ProblemProfile.java:49)
	at com.googlecode.cppcheclipse.core.CppcheclipsePlugin.getInternalNewProblemProfile(CppcheclipsePlugin.java:162)
	at com.googlecode.cppcheclipse.core.CppcheclipsePlugin.getNewProblemProfile(CppcheclipsePlugin.java:131)
	at com.googlecode.cppcheclipse.core.Checker.<init>(Checker.java:55)
	at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.initChecker(Builder.java:164)
	at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.processFile(Builder.java:199)
	at com.googlecode.cppcheclipse.ui.Builder$ResourceVisitor.visit(Builder.java:122)
	at org.eclipse.core.internal.resources.Resource$2.visit(Resource.java:120)
	at org.eclipse.core.internal.resources.Resource$1.visitElement(Resource.java:84)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:82)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:87)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:87)
	at org.eclipse.core.internal.watson.ElementTreeIterator.doIteration(ElementTreeIterator.java:87)
	at org.eclipse.core.internal.watson.ElementTreeIterator.iterate(ElementTreeIterator.java:129)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:94)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:52)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:117)
	at org.eclipse.core.internal.resources.Resource.accept(Resource.java:105)
	at com.googlecode.cppcheclipse.ui.Builder.processResource(Builder.java:306)
	at com.googlecode.cppcheclipse.ui.Builder.fullBuild(Builder.java:316)
	at com.googlecode.cppcheclipse.ui.Builder.build(Builder.java:255)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:330)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:405)
	at org.eclipse.core.internal.resources.Project$1.run(Project.java:566)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:544)
	at org.eclipse.core.internal.resources.Project.build(Project.java:120)
	at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder$1.run(HeadlessBuilder.java:285)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2262)
	at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.buildConfigurations(HeadlessBuilder.java:293)
	at org.eclipse.cdt.managedbuilder.internal.core.HeadlessBuilder.start(HeadlessBuilder.java:567)
	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 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	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)

Looks like the plugin always assumes the display to be present:
https://github.com/kwin/cppcheclipse/blob/master/com.googlecode.cppcheclipse.ui/src/com/googlecode/cppcheclipse/ui/Console.java#L84

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant