Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355011 - Deadlock on creating console in the build thread
Summary: Deadlock on creating console in the build thread
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.10 M1   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 16:56 EDT by Stephan Herrmann CLA
Modified: 2018-11-20 00:51 EST (History)
4 users (show)

See Also:


Attachments
Thread dump during the freeze (22.45 KB, text/plain)
2011-08-17 16:56 EDT, Stephan Herrmann CLA
no flags Details
another similar freeze (30.45 KB, text/plain)
2013-07-11 06:48 EDT, Stephan Herrmann CLA
no flags Details
project to reproduce (2.71 KB, application/x-zip-compressed)
2018-09-12 17:24 EDT, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-08-17 16:56:29 EDT
Created attachment 201674 [details]
Thread dump during the freeze

Eclipse got stuck while the progress dialog showed two tasks:

- building workspace said something like "launching delegate"

- user action is waiting for background work

I'm not sure whom to blame, filing against platform UI is just a guess.
I'll attach the stacks of that time.


In there I can see three threads wanting UI access:
main: 
  OverrideImportsAction (jdt.ui) is calling ProgressManager.runInUI()

Worker-3:
  an AntLaunchDelegate triggered from an AutoBuildJob tries to connect
  to a new console view where reading the color preferences requires
  the UI thread

Worker-8
  the debug view's label provider triggers creating an Image, which, too,
  requires the UI thread

Additionally, there seems to be some congestion via scheduling rules:
the job in the main thread seems to be waiting for some resources?

One thing looks funny to my outsider's eye: It seems runInUI can enter 
syncExec without checking availability of required resources?


The good news: clicking on cancel for both tasks in the progress dialog
resolved the deadlock and all came back to normal.
Comment 1 Stephan Herrmann CLA 2013-07-11 06:48:54 EDT
Created attachment 233361 [details]
another similar freeze

I just saw a similar blocking again, at least the part from ant.ui looks the same.
Again cancelling all jobs brought Eclipse back to life.

Question for SWT guys: is it legal to create a Color instance in a non-UI thread?

If not we may want to move this to ant component so they protect the access to
their ColorManager with a sync exec or s.t.? Not sure if that would improve, but
looks strange to block the UI via this path...
Comment 2 Leo Ufimtsev CLA 2018-02-14 15:49:25 EST
Does the issue still occur?

Adding our Color expert Eric to CC.
Comment 3 Eric Williams CLA 2018-02-14 16:04:11 EST
(In reply to Stephan Herrmann from comment #1)
> Question for SWT guys: is it legal to create a Color instance in a non-UI
> thread?

Disclaimer: I am not 100% sure about the following, but my thoughts:

I would say no. Resources like Colors/GC's/etc. are all resources that map (usually) to the OS GUI toolkit (GTK in this case). This would mean that freeing/creating these resources would require synchronizing with the UI thread, which kind of defeats the purpose (and opens up a bunch of different issues).

There are some relevant details about creating SWT resources outside the UI thread in this article, under the "finalization" section: https://www.eclipse.org/articles/swt-design-2/swt-design-2.html
Comment 4 Andrey Loskutov CLA 2018-02-14 16:05:45 EST
Color is SWT resource and must be created/disposed on UI thread only.
Comment 5 Andrey Loskutov CLA 2018-02-14 16:10:02 EST
I would say the ant launch must be fixed, to not run UI code in non UI context.
Comment 6 Stephan Herrmann CLA 2018-02-14 16:12:35 EST
(In reply to Andrey Loskutov from comment #5)
> I would say the ant launch must be fixed, to not run UI code in non UI
> context.

Thanks, moving ...

This would be the relevant stack part to check:

"Worker-3" prio=10 tid=0x09808800 nid=0x127b in Object.wait() [0xb0f21000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at org.eclipse.swt.internal.Lock.lock(Lock.java:34)
	- locked <0x61995568> (a org.eclipse.swt.internal.Lock)
	at org.eclipse.swt.internal.gtk.OS.gdk_colormap_get_system(OS.java:3645)
	at org.eclipse.swt.graphics.Color.init(Color.java:247)
	at org.eclipse.swt.graphics.Color.<init>(Color.java:108)
	at org.eclipse.ant.internal.ui.ColorManager.getColor(ColorManager.java:44)
	at org.eclipse.ant.internal.ui.AntUIPlugin.getPreferenceColor(AntUIPlugin.java:170)
	at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.getColor(AntConsoleColorProvider.java:41)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:511)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:497)
	at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.connect(AntConsoleColorProvider.java:61)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.<init>(ProcessConsole.java:186)
Comment 7 Sarika Sinha CLA 2018-02-16 04:35:25 EST
Not sure it should be fixed in Ant or Platform Debug. As Ant uses Process Console from Platform Debug to connect which tries setting the color for IOConsoleOutputStream.
Comment 8 Sarika Sinha CLA 2018-03-02 08:26:51 EST
Will try to spend time in M7.
Comment 9 Stephan Herrmann CLA 2018-07-14 07:21:02 EDT
I'm removing the "needinfo", which Leo set a while ago. Hope that's ok :)
Comment 10 Sarika Sinha CLA 2018-09-03 03:02:09 EDT
After re-evaluation, Ant seems to be a better place.

So I guess just putting in the syncExec block might work.
Comment 11 Eclipse Genie CLA 2018-09-03 05:02:34 EDT
New Gerrit change created: https://git.eclipse.org/r/128528
Comment 12 Andrey Loskutov CLA 2018-09-03 14:55:01 EDT
(In reply to Eclipse Genie from comment #11)
> New Gerrit change created: https://git.eclipse.org/r/128528

The patch makes sense (I wonder SWT allowed to init colors in non UI thread anyway) but it will not fix the deadlock. It will hang now at syncExec() because main thread is locked by the build thread. 

The build job which owns workspace rule tries to do some UI things with console, but this can be only done in the main thread, which is waiting for the workspace lock, so deadlock can't be solved via syncExec.

"Worker-11" prio=10 tid=0xb2f36c00 nid=0xc6a in Object.wait() [0xb0ffe000]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x61599938> (a org.eclipse.swt.internal.Lock)
    at java.lang.Object.wait(Object.java:503)
    at org.eclipse.swt.internal.Lock.lock(Lock.java:34)
    - locked <0x61599938> (a org.eclipse.swt.internal.Lock)
    at org.eclipse.swt.internal.gtk.OS.gdk_colormap_get_system(OS.java:3718)
    at org.eclipse.swt.graphics.Color.init(Color.java:250)
    at org.eclipse.swt.graphics.Color.<init>(Color.java:108)
    at org.eclipse.ant.internal.ui.ColorManager.getColor(ColorManager.java:44)
    at org.eclipse.ant.internal.ui.AntUIPlugin.getPreferenceColor(AntUIPlugin.java:170)
    at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.getColor(AntConsoleColorProvider.java:41)
    at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:512)
    at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:498)
    at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.connect(AntConsoleColorProvider.java:61)
    at org.eclipse.debug.internal.ui.views.console.ProcessConsole.<init>(ProcessConsole.java:187)
    at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.launchChanged(ProcessConsoleManager.java:145)
    at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.run(LaunchManager.java:447)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.notify(LaunchManager.java:428)
    at org.eclipse.debug.internal.core.LaunchManager.fireUpdate(LaunchManager.java:1017)
    at org.eclipse.debug.core.Launch.fireChanged(Launch.java:388)
    at org.eclipse.debug.core.Launch.addProcess(Launch.java:351)
    at org.eclipse.ant.internal.launching.launchConfigurations.AntProcess.<init>(AntProcess.java:48)
    at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate.runInSameVM(AntLaunchDelegate.java:275)
    at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:260)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:858)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:707)
    at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:700)
    at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:181)
    at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:169)
    at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:88)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

The problem can probably be solved by changing the part of the  org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.launchChanged(ILaunch) which initializes console to run via job, decoupling build (holding WS lock) from console init (requiring UI lock). I will push a patch in a moment.
Comment 13 Eclipse Genie CLA 2018-09-03 15:01:09 EDT
New Gerrit change created: https://git.eclipse.org/r/128581
Comment 14 Andrey Loskutov CLA 2018-09-03 15:05:04 EDT
(In reply to Eclipse Genie from comment #13)
> New Gerrit change created: https://git.eclipse.org/r/128581

This should resolve deadlock. Note: I haven't tested this in debugger yet.
Comment 15 Sarika Sinha CLA 2018-09-04 00:05:31 EDT
Thanks Andrey!!
Comment 17 Andrey Loskutov CLA 2018-09-12 17:19:56 EDT
Steps to reproduce.

1 Create Java project with ant builder configured to run on save.
2 Create breakpoint at 
org.eclipse.ant.internal.ui.ColorManager.getColor(RGB) line 48 (before syncExec())
3 Make sure Console view was not opened before.
4 In the Java project, change a line in Java file and save.
5 The breakpoint will hit.
6 Don't resume, but change the Java file and save again.

Now thanks to the first patch from Sarika, we have not a deadlock but still few times error below logged, describing exact the deadlock case we had here before:

!ENTRY org.eclipse.ui 4 4 2018-09-12 23:04:12.705
!MESSAGE To avoid deadlock while executing Display.syncExec() with argument: org.eclipse.ant.internal.ui.ColorManager$$Lambda$493/1701130604@ebf94d1, thread Worker-4: Building workspace will interrupt UI thread.
!SUBENTRY 1 org.eclipse.ui 4 4 2018-09-12 23:04:12.705
!MESSAGE Worker-4: Building workspace thread is an instance of Worker or owns an ILock
!STACK 0
java.lang.IllegalStateException: Call stack for thread Worker-4: Building workspace
	at sun.management.ThreadImpl.dumpThreads0(Native Method)
	at sun.management.ThreadImpl.getThreadInfo(ThreadImpl.java:448)
	at org.eclipse.ui.internal.UILockListener.reportInterruption(UILockListener.java:209)
	at org.eclipse.ui.internal.UILockListener.interruptUI(UILockListener.java:179)
	at org.eclipse.ui.internal.PendingSyncExec.waitUntilExecuted(PendingSyncExec.java:85)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:156)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4594)
	at org.eclipse.ant.internal.ui.ColorManager.getColor(ColorManager.java:48)
	at org.eclipse.ant.internal.ui.AntUIPlugin.getPreferenceColor(AntUIPlugin.java:198)
	at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.getColor(AntConsoleColorProvider.java:44)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:558)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.connect(ProcessConsole.java:542)
	at org.eclipse.ant.internal.ui.console.AntConsoleColorProvider.connect(AntConsoleColorProvider.java:67)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsole.<init>(ProcessConsole.java:220)
	at org.eclipse.debug.internal.ui.views.console.ProcessConsoleManager.launchChanged(ProcessConsoleManager.java:152)
	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.run(LaunchManager.java:434)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.debug.internal.core.LaunchManager$LaunchNotifier.notify(LaunchManager.java:417)
	at org.eclipse.debug.internal.core.LaunchManager.fireUpdate(LaunchManager.java:1039)
	at org.eclipse.debug.core.Launch.fireChanged(Launch.java:469)
	at org.eclipse.debug.core.Launch.addProcess(Launch.java:423)
	at org.eclipse.debug.core.model.RuntimeProcess.<init>(RuntimeProcess.java:128)
	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntRuntimeProcess.<init>(RemoteAntRuntimeProcess.java:29)
	at org.eclipse.ant.internal.launching.launchConfigurations.RemoteAntProcessFactory.newProcess(RemoteAntProcessFactory.java:38)
	at org.eclipse.debug.core.DebugPlugin.newProcess(DebugPlugin.java:783)
	at org.eclipse.jdt.launching.AbstractVMRunner.newProcess(AbstractVMRunner.java:181)
	at org.eclipse.jdt.internal.launching.StandardVMRunner.run(StandardVMRunner.java:514)
	at org.eclipse.jdt.launching.JavaLaunchDelegate.launch(JavaLaunchDelegate.java:159)
	at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate.runInSeparateVM(AntLaunchDelegate.java:584)
	at org.eclipse.ant.internal.launching.launchConfigurations.AntLaunchDelegate.launch(AntLaunchDelegate.java:251)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:862)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:720)
	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:715)
	at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.launchBuild(ExternalToolBuilder.java:186)
	at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.doBuildBasedOnScope(ExternalToolBuilder.java:174)
	at org.eclipse.core.externaltools.internal.model.ExternalToolBuilder.build(ExternalToolBuilder.java:93)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:802)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:223)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:266)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:319)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:322)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:374)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:395)
	at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
	at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SUBENTRY 1 org.eclipse.ui 4 4 2018-09-12 23:04:12.722
!MESSAGE UI thread waiting on a job or lock.
!STACK 0
java.lang.IllegalStateException: Call stack for thread main
	at org.eclipse.ant.internal.ui.ColorManager.lambda$0(ColorManager.java:48)
	at org.eclipse.ant.internal.ui.ColorManager$$Lambda$493/1701130604.run(Unknown Source)
	at org.eclipse.ui.internal.PendingSyncExec.run(PendingSyncExec.java:61)
	at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:171)
	at org.eclipse.ui.internal.UISynchronizer.lambda$0(UISynchronizer.java:153)
	at org.eclipse.ui.internal.UISynchronizer$$Lambda$419/1916444703.run(Unknown Source)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3933)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3564)
	at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.runEventLoop(EventLoopProgressMonitor.java:128)
	at org.eclipse.ui.internal.dialogs.EventLoopProgressMonitor.isCanceled(EventLoopProgressMonitor.java:102)
	at org.eclipse.core.internal.jobs.ThreadJob.isCanceled(ThreadJob.java:147)
	at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:276)
	at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:205)
	at org.eclipse.core.internal.jobs.ImplicitJobs.begin(ImplicitJobs.java:95)
	at org.eclipse.core.internal.jobs.JobManager.beginRule(JobManager.java:311)
	at org.eclipse.core.internal.resources.WorkManager.checkIn(WorkManager.java:124)
	at org.eclipse.core.internal.resources.Workspace.prepareOperation(Workspace.java:2243)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2290)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2322)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:131)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:76)
	at org.eclipse.ui.internal.editors.text.WorkspaceOperationRunner.run(WorkspaceOperationRunner.java:66)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.executeOperation(TextFileDocumentProvider.java:461)
	at org.eclipse.ui.editors.text.TextFileDocumentProvider.saveDocument(TextFileDocumentProvider.java:764)
	at org.eclipse.ui.texteditor.AbstractTextEditor.performSave(AbstractTextEditor.java:5006)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.performSave(CompilationUnitEditor.java:1275)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.doSave(CompilationUnitEditor.java:1329)
	at org.eclipse.ui.texteditor.AbstractTextEditor$TextEditorSavable.doSave(AbstractTextEditor.java:7114)
	at org.eclipse.ui.Saveable.doSave(Saveable.java:223)
	at org.eclipse.ui.internal.SaveableHelper.doSaveModel(SaveableHelper.java:343)
	at org.eclipse.ui.internal.SaveableHelper.lambda$1(SaveableHelper.java:196)
	at org.eclipse.ui.internal.SaveableHelper$$Lambda$459/2144584587.run(Unknown Source)
	at org.eclipse.ui.internal.SaveableHelper.lambda$3(SaveableHelper.java:274)
	at org.eclipse.ui.internal.SaveableHelper$$Lambda$460/656805788.run(Unknown Source)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:440)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:356)
	at org.eclipse.ui.internal.WorkbenchWindow.lambda$4(WorkbenchWindow.java:2249)
	at org.eclipse.ui.internal.WorkbenchWindow$$Lambda$462/870227333.run(Unknown Source)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:72)
	at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2247)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:281)
	at org.eclipse.ui.internal.SaveableHelper.runProgressMonitorOperation(SaveableHelper.java:262)
	at org.eclipse.ui.internal.SaveableHelper.saveModels(SaveableHelper.java:207)
	at org.eclipse.ui.internal.SaveableHelper.savePart(SaveableHelper.java:151)
	at org.eclipse.ui.internal.WorkbenchPage.saveSaveable(WorkbenchPage.java:3957)
	at org.eclipse.ui.internal.WorkbenchPage.saveEditor(WorkbenchPage.java:3971)
	at org.eclipse.ui.internal.handlers.SaveHandler.execute(SaveHandler.java:57)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:294)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:96)
	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.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:164)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:497)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:490)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:207)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:584)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:653)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:443)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$2(KeyBindingDispatcher.java:386)
	at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1193)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1054)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1064)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1106)
	at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1102)
	at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1489)
	at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4888)
	at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:353)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4768)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:348)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4784)
	at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
	at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2309)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3559)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)
	at org.eclipse.ui.internal.Workbench$$Lambda$24/1108367077.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
	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:391)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
	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:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1474)

The patch https://git.eclipse.org/r/128581 fixes this error.
Comment 18 Andrey Loskutov CLA 2018-09-12 17:24:12 EDT
Created attachment 275797 [details]
project to reproduce
Comment 20 Eclipse Genie CLA 2018-09-14 04:44:36 EDT
New Gerrit change created: https://git.eclipse.org/r/129413
Comment 22 Andrey Loskutov CLA 2018-09-18 09:37:34 EDT
I think we are done now.
Comment 23 Sarika Sinha CLA 2018-11-20 00:51:45 EST
Verified using
Eclipse SDK

Version: 2018-12 (4.10)
Build id: I20181119-0600