Bug 574552 - org.eclipse.swt.SWTException: Invalid thread access during start IDE
Summary: org.eclipse.swt.SWTException: Invalid thread access during start IDE
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.20   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 575532 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-30 02:29 EDT by Karel Haruda CLA
Modified: 2022-02-22 10:41 EST (History)
5 users (show)

See Also:


Attachments
.log file (491.83 KB, text/plain)
2021-07-15 02:33 EDT, Karel Haruda CLA
no flags Details
Display constructor stacks using breakpoint (16.76 KB, text/plain)
2021-08-21 22:07 EDT, Christopher Mindus CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karel Haruda CLA 2021-06-30 02:29:38 EDT
Every time, when the eclipse did not finish saving workspace(for example windows force restart because of actualization and eclipse did not save workspace correctly), this issue (org.eclipse.swt.SWTException: Invalid thread access) is raised on next IDE lunch.

Here is contet of .log file .. I found only one solution. Delete .metadata in workspace and configure it all again .. 

!SESSION 2021-06-30 08:06:33.297 -----------------------------------------------
eclipse.buildId=4.20.0.I20210611-1600
java.version=15.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=cs_CZ
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\axspace

!ENTRY org.eclipse.jface 2 0 2021-06-30 08:06:38.889
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2021-06-30 08:06:38.889
!MESSAGE A conflict occurred for CTRL+SHIFT+T:
Binding(CTRL+SHIFT+T,
	ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
		Open a type in a Java editor,
		Category(org.eclipse.ui.category.navigate,Navigate,null,true),
		org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@60c68c7b,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+T,
	ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
		,
		Category(org.eclipse.lsp4e.category,Language Servers,null,true),
		org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@1315d910,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.ui.navigator 2 0 2021-06-30 08:06:47.811
!MESSAGE Can't find Navigator Content Descriptor with id: org.eclipse.jst.servlet.ui.EnhancedJavaRendering

!ENTRY org.eclipse.ui.navigator 2 0 2021-06-30 08:06:47.815
!MESSAGE Can't find Navigator Content Descriptor with id: org.eclipse.jst.servlet.ui.EnhancedJavaRendering

!ENTRY org.eclipse.egit.ui 2 0 2021-06-30 08:06:47.849
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\karel'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.ui.ide 4 4 2021-06-30 08:07:30.675
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
	at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
	at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:683)
	at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:274)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:287)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:265)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree.createAdditionalControls(TaskListFilteredTree.java:619)
	at org.eclipse.mylyn.commons.workbench.AbstractFilteredTree.createFilterControls(AbstractFilteredTree.java:189)
	at org.eclipse.ui.dialogs.FilteredTree.createControl(FilteredTree.java:362)
	at org.eclipse.mylyn.commons.workbench.EnhancedFilteredTree.createControl(EnhancedFilteredTree.java:61)
	at org.eclipse.mylyn.commons.workbench.AbstractFilteredTree.createControl(AbstractFilteredTree.java:91)
	at org.eclipse.ui.dialogs.FilteredTree.init(FilteredTree.java:331)
	at org.eclipse.ui.dialogs.FilteredTree.<init>(FilteredTree.java:289)
	at org.eclipse.mylyn.commons.workbench.EnhancedFilteredTree.<init>(EnhancedFilteredTree.java:48)
	at org.eclipse.mylyn.commons.workbench.AbstractFilteredTree.<init>(AbstractFilteredTree.java:71)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree.<init>(TaskListFilteredTree.java:134)
	at org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.createPartControl(TaskListView.java:590)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:158)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityView.createPartControl(CompatibilityView.java:155)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:365)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:999)
	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:964)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:140)
	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:405)
	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:332)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:91)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:60)
	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:999)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$1.run(PartRenderingEngine.java:544)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:528)
	at org.eclipse.e4.ui.workbench.renderers.swt.ElementReferenceRenderer.createWidget(ElementReferenceRenderer.java:73)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:999)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:659)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:765)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:730)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:714)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:109)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:236)
	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4742)
	at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34)
	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:205)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:203)
	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:133)
	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:75)
	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:63)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:170)
	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:188)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:1380)
	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.hidePart(PartServiceImpl.java:1330)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer.closePart(StackRenderer.java:1182)
	at org.eclipse.e4.ui.workbench.renderers.swt.StackRenderer$3.close(StackRenderer.java:1042)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1960)
	at org.eclipse.swt.custom.CTabFolder.lambda$0(CTabFolder.java:335)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	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:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	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:1461)

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:47.245
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:47.250
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:50.682
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:50.685
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:52.458
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:07:52.461
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:40.071
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:40.075
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:53.139
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:53.142
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:56.844
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:08:56.848
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:09:10.398
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:09:10.402
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:09:22.769
!MESSAGE The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

!ENTRY org.eclipse.m2e.logback.appender 2 0 2021-06-30 08:09:22.772
!MESSAGE The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
!SESSION 2021-06-30 08:14:09.165 -----------------------------------------------
eclipse.buildId=4.20.0.I20210611-1600
java.version=15.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=cs_CZ
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -data E:\axspace

!ENTRY org.eclipse.jface 2 0 2021-06-30 08:14:13.646
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2021-06-30 08:14:13.646
!MESSAGE A conflict occurred for CTRL+SHIFT+T:
Binding(CTRL+SHIFT+T,
	ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
		Open a type in a Java editor,
		Category(org.eclipse.ui.category.navigate,Navigate,null,true),
		org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@73158d35,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system)
Binding(CTRL+SHIFT+T,
	ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
		,
		Category(org.eclipse.lsp4e.category,Language Servers,null,true),
		org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@55a29589,
		,,true),null),
	org.eclipse.ui.defaultAcceleratorConfiguration,
	org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.egit.ui 2 0 2021-06-30 08:14:18.804
!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git
user global configuration and to define the default location to store repositories: 'C:\Users\karel'. If this is
not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and
EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

!ENTRY org.eclipse.ui.ide 4 4 2021-06-30 08:14:51.312
!MESSAGE Not properly disposed SWT resource
!STACK 0
java.lang.Error: SWT Resource was not properly disposed
	at org.eclipse.swt.graphics.Resource.initNonDisposeTracking(Resource.java:172)
	at org.eclipse.swt.graphics.Resource.<init>(Resource.java:120)
	at org.eclipse.swt.graphics.Image.<init>(Image.java:683)
	at org.eclipse.jface.resource.URLImageDescriptor.createImage(URLImageDescriptor.java:274)
	at org.eclipse.jface.resource.DeferredImageDescriptor.createImage(DeferredImageDescriptor.java:79)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:287)
	at org.eclipse.jface.resource.ImageDescriptor.createImage(ImageDescriptor.java:265)
	at org.eclipse.ui.internal.dialogs.ViewLabelProvider.getImage(ViewLabelProvider.java:102)
	at org.eclipse.jface.viewers.ColumnLabelProvider.update(ColumnLabelProvider.java:41)
	at org.eclipse.jface.viewers.ViewerColumn.refresh(ViewerColumn.java:144)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:959)
	at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:126)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:1037)
	at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:427)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
	at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:2111)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:853)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:831)
	at org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:604)
	at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:779)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalInitializeTree(AbstractTreeViewer.java:1599)
	at org.eclipse.jface.viewers.TreeViewer.internalInitializeTree(TreeViewer.java:780)
	at org.eclipse.jface.viewers.AbstractTreeViewer.lambda$1(AbstractTreeViewer.java:1584)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1400)
	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:363)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1361)
	at org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1578)
	at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.inputChanged(FilteredTree.java:966)
	at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:282)
	at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1634)
	at org.eclipse.ui.internal.dialogs.ShowViewDialog.createFilteredTreeViewer(ShowViewDialog.java:226)
	at org.eclipse.ui.internal.dialogs.ShowViewDialog.createDialogArea(ShowViewDialog.java:164)
	at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:767)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1094)
	at org.eclipse.jface.window.Window.open(Window.java:788)
	at org.eclipse.ui.handlers.ShowViewHandler.openOther(ShowViewHandler.java:106)
	at org.eclipse.ui.handlers.ShowViewHandler.execute(ShowViewHandler.java:81)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
	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:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
	at org.eclipse.ui.internal.ShowViewMenu$1.run(ShowViewMenu.java:132)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
	at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1043)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	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:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	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:1461)



-- Configuration Details --
Product: Eclipse IDE 4.20.0.20210612-1200 (org.eclipse.epp.package.jee.product)Installed Features:
 org.eclipse.platform 4.20.0.v20210611-1600
Comment 1 Rolf Theunissen CLA 2021-07-01 14:54:59 EDT
The .log file does not show the invalid thread access error, I expect that the Resource disposal checks are hiding the error.

Would you be able to re-create the error and run with -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=false (either at the command line or edit eclipse.ini)? Such that there is a stacktrace of the invalid thread access.

I expect that the error is caused by the stored workbench.xmi file. Instead of removing the whole .metadata folder, could remove only that file, or use the -clearPersistedState argument that will remove the workbench.xmi.

I expect that the root-case of the bug related to Bug 549902, that is, the auto-saved model contains to many elements. It would be wonderful if you would be able to attach a workbench.xmi which works (before Eclipse is started), and the broken workbench.xmi such that they can be compared.
Comment 2 Karel Haruda CLA 2021-07-15 02:33:06 EDT
Created attachment 286790 [details]
.log file

Here is a log file from metadata directory .. last two errors are Invalid thread access.
Comment 3 Rolf Theunissen CLA 2021-07-15 04:50:55 EDT
IDEApplication creates a (new) Display for the current thread, then it calls IDEWorkbenchAdvisor. IDEWorkbenchAdvisor uses the default display to register a close listener.

Apparently, in this case, the default Display is not the display created by the IDEApplication. That is, there has been another thread that already created a Display.

This is straight forward to fix, by using 'getCurrent' instead of 'getDefault' in IDEWorkbenchAdvisor.

However, I assume that code will be broken in many other places in the workbench. I think it is often assumed that the IDE is connected to the default display. Therefore, somehow it must be assured that the default display is connected to the IDE.

@Lars, this might be the result of startup time improvements, in which the ordering of some initialization is changed. Do you have any clue?
Comment 4 Andrey Loskutov CLA 2021-07-15 07:45:25 EDT
(In reply to Rolf Theunissen from comment #3)
> IDEApplication creates a (new) Display for the current thread, then it calls
> IDEWorkbenchAdvisor. IDEWorkbenchAdvisor uses the default display to
> register a close listener.
> 
> Apparently, in this case, the default Display is not the display created by
> the IDEApplication. That is, there has been another thread that already
> created a Display.
> 
> This is straight forward to fix, by using 'getCurrent' instead of
> 'getDefault' in IDEWorkbenchAdvisor.

Not sure it is easy, that would hide this issue and open a door for other subtle problems. Workbench.getDisplay() would then return other display as Display.getDefault(), and so depending on which code will use which Display to schedule UI tasks via Display.(a)syncExec(), they will end up running with different Display instances, just like here.

Ideally we would have a check in the IDEApplication if there is already a Display created and simply shutdown in that case - but that will made the current problem here worse and we still would not know who created the first one (the bad plugin that was activated before application runs). Or we should think if we can/should change Workbench.createDisplay() to check if there is already Display created and use that one - this could however lead to other interesting problems for the code that expected this method always creates new Display instance.
Comment 5 Lars Vogel CLA 2021-07-27 11:38:12 EDT
(In reply to Rolf Theunissen from comment #3)

> @Lars, this might be the result of startup time improvements, in which the
> ordering of some initialization is changed. Do you have any clue?

Sorry for the late reply, I have never seen this issue so I don't know there this might be coming. Also, this seems to be related how the workbench model is saved, which IIRC was not changed in 4.20.
Comment 6 Karel Haruda CLA 2021-08-08 04:54:52 EDT
For clarification. This error does not manifest itself in
Version: 2021-03 (4.19.0)
Build id: 20210312-0638 

Now I am working on this version and everyting is Ok.

Maybe look for diferences betwen this two versions
Comment 7 Rolf Theunissen CLA 2021-08-21 10:13:05 EDT
*** Bug 575532 has been marked as a duplicate of this bug. ***
Comment 8 Christopher Mindus CLA 2021-08-21 22:07:44 EDT
Created attachment 286984 [details]
Display constructor stacks using breakpoint
Comment 9 Christopher Mindus CLA 2021-08-21 22:29:17 EDT
Sorry, Jira threw away my comment when I attached the stack trace file.

To enter the erroneous state for Display.error(..) to be called from main thread at Eclipse startup, it is quite simple:

1. Debug e.g. the Eclipse Java product (for me under Windows) using a workspace with several projects.

2. When it is started, delete one of the projects from the workspace without deleting the actual files.

3. Stop debugging.

4. Restart debugging.

5. Splash screen is shown.

6. Refresh workspace thread creates Display - and you should have a similar situation as I have.

It is due to display being created from the "Worker-1: Refreshing workspace" thread, before the main thread creates the display (that fails because of wrong thread).

When Display is constructed the first time from Worker-1, the main stack is:

Thread [main] (Suspended)	
	Unsafe.park(boolean, long) line: not available [native method]	
	LockSupport.parkNanos(Object, long) line: 234	
	Semaphore$NonfairSync(AbstractQueuedSynchronizer).doAcquireSharedNanos(int, long) line: 1079	
	Semaphore$NonfairSync(AbstractQueuedSynchronizer).tryAcquireSharedNanos(int, long) line: 1369	
	Semaphore.tryAcquire(long, TimeUnit) line: 415	
	EclipseStarter.updateSplash(Semaphore, EclipseStarter$StartupEventListener) line: 1190	
	EclipseStarter.setStartLevel(int) line: 1145	
	EclipseStarter.startup(String[], Runnable) line: 345	
	EclipseStarter.run(String[], Runnable) line: 251	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 566	
	Main.invokeFramework(String[], URL[]) line: 654	
	Main.basicRun(String[]) line: 591	
	Main.run(String[]) line: 1462	
	Main.main(String[]) line: 1435	


When constructed the 2nd time, the main thread is blocked with the following stack:

Thread [main] (Suspended)	
	waiting for: Class<T> (org.eclipse.swt.graphics.Device) (id=54)	
	Display.findDisplay(Thread) line: 1437	
	Display.getCurrent() line: 1541	
	Workbench.createDisplay() line: 730	
	PlatformUI.createDisplay() line: 168	
	IDEApplication.createDisplay() line: 182	
	IDEApplication.start(IApplicationContext) line: 125	
	EclipseAppHandle.run(Object) line: 203	
	EclipseAppLauncher.runApplication(Object) line: 134	
	EclipseAppLauncher.start(Object) line: 104	
	EclipseStarter.run(Object) line: 401	
	EclipseStarter.run(String[], Runnable) line: 255	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 566	
	Main.invokeFramework(String[], URL[]) line: 654	
	Main.basicRun(String[]) line: 591	
	Main.run(String[]) line: 1462	
	Main.main(String[]) line: 1435
Comment 10 Andrey Loskutov CLA 2021-08-22 04:35:08 EDT
(In reply to Christopher Mindus from comment #8)
> Created attachment 286984 [details]
> Display constructor stacks using breakpoint

Looks like this is caused by subclipse, see similar stack at

https://github.com/subclipse/subclipse/issues/102

com.collabnet.subversion.merge.Activator.getMergeInputProviders(Activator.java:189)
com.collabnet.subversion.merge.Activator.start(Activator.java:124)

The code tries to init images from the activator start() method, but that is of course not guaranteed to be the UI thread. In your case this triggers Display creation, so SWT assumes later the thread from "main" is not the "right" UI thread, but wrong one, because other thread created the display.

The "early" refresh call is coming from workspace that detects previous crash and triggers refreshjob before IDE created the display.

I only wonder why in your case this started to happen with 4.20, at least related code seem to be not changed. Probably 4.20 is affected due recent startup order changes, but this is an unsatisfying answer, especially the assumption was that in 4.20 UI startup should be faster, not slower.

Here the workspace refresh code is faster as the UI code with display creation, before it would be the opposite.

@Christofer: are you sure it is a regression in 4.20, and no a change in your product dependencies (like subclipse) etc? Could you check where the Display is created in 4.19, and why the order there is different?
Comment 11 Rolf Theunissen CLA 2021-08-22 04:50:53 EDT
The bundle activator assumes to be be run on the UI thread. If this activator is started after the main UI thread is created, and it is still run in the refresh job, I would expect a illegal thread access from the work refresh job. That is, Display.getDefault() would be called not an the main thread.
Do you see errors like this in normal startup? Or might the framework have swallowed this error?

Therefore, I assume that normally SVN merge is activated on the UI thread. I can imagine that startup improvements/re-ordering causes this problem to occur. Anybody has a clue?

From respect of Eclipse point of view. There could be more miss-behaving plugins out there. Would we be able to make the miss-behaving plugin throw the invalid thread access, instead of the main application?
Comment 12 Christopher Mindus CLA 2021-08-22 15:43:44 EDT
Checking with Eclipse 4.19, be soon back...
Comment 13 Christopher Mindus CLA 2021-08-22 15:49:25 EDT
Q: Do you see errors like this in normal startup?
A: No.

Q: Or might the framework have swallowed this error?
A: No problems in startup except the main thread creating the Display.

Q: From respect of Eclipse point of view. There could be more miss-behaving plugins out there. Would we be able to make the miss-behaving plugin throw the invalid thread access, instead of the main application?
A: It should be the Eclipse way of handling code, right, with safe-run, etc, causing bad plugins to stop but not the product itself.
Comment 14 Christopher Mindus CLA 2021-08-24 09:29:51 EDT
(In reply to Christopher Mindus from comment #12)
> Checking with Eclipse 4.19, be soon back...

Verified same procedure on Eclipse 4.19 compared to 4.20 (identical plugins SVN, etc), and Eclipse 4.19 does not fail with SWT exception at startup (the main thread creates the Display), not "Worker-1 Refreshing workspace".
Comment 15 Christopher Mindus CLA 2021-08-24 09:36:43 EDT
(In reply to Andrey Loskutov from comment #10)
> (In reply to Christopher Mindus from comment #8)
> > Created attachment 286984 [details]
> > Display constructor stacks using breakpoint
> 
> Looks like this is caused by subclipse, see similar stack at
> 
> https://github.com/subclipse/subclipse/issues/102
> 
> com.collabnet.subversion.merge.Activator.getMergeInputProviders(Activator.
> java:189)
> com.collabnet.subversion.merge.Activator.start(Activator.java:124)
> 
> The code tries to init images from the activator start() method, but that is
> of course not guaranteed to be the UI thread. In your case this triggers
> Display creation, so SWT assumes later the thread from "main" is not the
> "right" UI thread, but wrong one, because other thread created the display.
> 
> The "early" refresh call is coming from workspace that detects previous
> crash and triggers refreshjob before IDE created the display.
> 
> I only wonder why in your case this started to happen with 4.20, at least
> related code seem to be not changed. Probably 4.20 is affected due recent
> startup order changes, but this is an unsatisfying answer, especially the
> assumption was that in 4.20 UI startup should be faster, not slower.
> 
> Here the workspace refresh code is faster as the UI code with display
> creation, before it would be the opposite.
> 
> @Christofer: are you sure it is a regression in 4.20, and no a change in
> your product dependencies (like subclipse) etc? Could you check where the
> Display is created in 4.19, and why the order there is different?

I am sure that it doesn't happen in 4.19, and the SVN error you refer to (https://github.com/subclipse/subclipse/issues/102) is that Eclipse locks at startup, not getting an SWTException.
Comment 16 Christopher Mindus CLA 2021-08-24 11:07:33 EDT
In Eclipse 4.20, after removal of Subclipse plugins, I cannot reproduce this bug. So it is probably due to it creating a Display in thread "Worker-1 Refreshing workspace" from its SVNUIPlugin.start() method that eventually causes its Activator.getMergeInputProviders() to create an image.

But what has changed between Eclipse 4.20 and 4.19 in terms of workspace refreshing thread getting started BEFORE the workbench creates its Display from the main thread?
Comment 17 Christopher Mindus CLA 2021-08-24 11:08:31 EDT
(In reply to Christopher Mindus from comment #16)
> In Eclipse 4.20, after removal of Subclipse plugins, I cannot reproduce this
> bug. So it is probably due to it creating a Display in thread "Worker-1
> Refreshing workspace" from its SVNUIPlugin.start() method that eventually
> causes its Activator.getMergeInputProviders() to create an image.
> 
> But what has changed between Eclipse 4.20 and 4.19 in terms of workspace
> refreshing thread getting started BEFORE the workbench creates its Display
> from the main thread?

Bug reported for Subclipse in https://github.com/subclipse/subclipse/issues/183.
Comment 18 Christopher Mindus CLA 2021-08-24 11:09:34 EDT
Correction, in https://github.com/subclipse/subclipse/issues/188.
Comment 19 Christopher Mindus CLA 2021-08-24 11:09:44 EDT
Correction, in https://github.com/subclipse/subclipse/issues/188.