Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subclipse causes Eclipse 4.20 to get SWTException at startup after unclean shutdown #188

Open
minduch opened this issue Aug 24, 2021 · 5 comments

Comments

@minduch
Copy link

minduch commented Aug 24, 2021

This bug was reported in Eclipse 4.20, but it looks like it's Subclipse causing the problem. If performing the same thing as described in Bug ID 574552, see comments no 9 and no 10 in the bug Eclipse report 574552.

The problem is that SVNUIPlugin.start causes Display creation in Eclipse when creating images in non-SWT thread ("Worker-1 Refreshing workspace"), you can see it in the stacks for first and second call to Display constructor in attached file bug574552-Display-constructor-stacks.txt.

When Subclipse is removed from the Eclipse 4.20 installation, attempting to reproduce the error seems not to be possible as described in comment no 9.

Thread [Worker-1: Refreshing workspace] (Suspended (breakpoint at line 565 in Display))	
	owns: Class<T> (org.eclipse.swt.graphics.Device) (id=55)	
	Display.<init>(DeviceData) line: 565	
	Display.<init>() line: 556	
	Display.getDefault() line: 1692	
	Display.lambda$0() line: 523	
	1633766923.run() line: not available	
	Device.getDevice() line: 84	
	Image(Resource).<init>(Device) line: 117	
	Image.<init>(Device, ImageFileNameProvider) line: 683	
	URLImageDescriptor.createImage(boolean, Device) line: 274	
	URLImageDescriptor(ImageDescriptor).createImage(boolean) line: 287	
	URLImageDescriptor(ImageDescriptor).createImage() line: 265	
	Activator.getMergeInputProviders() line: 204	
	Activator.start(BundleContext) line: 125	
	BundleContextImpl$2.run() line: 814	
	BundleContextImpl$2.run() line: 1	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 806	
	BundleContextImpl.start() line: 763	
	EquinoxBundle.startWorker0() line: 1028	
	EquinoxBundle$EquinoxModule.startWorker() line: 371	
	EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 605	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 468	
	SecureAction.start(Module, Module$StartOptions...) line: 511	
	EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117	
	ClasspathManager.findLocalClass(String) line: 572	
	EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 345	
	BundleLoader.findLocalClass(String) line: 401	
	BundleLoader.findClass(String) line: 480	
	EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 170	
	EquinoxClassLoader(ClassLoader).loadClass(String) line: 522	
	EquinoxBundle.loadClass(String) line: 622	
	EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 196	
	ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 920	
	ConfigurationElement.createExecutableExtension(String) line: 246	
	ConfigurationElementHandle.createExecutableExtension(String) line: 63	
	SVNUIPlugin.getMergeProviders() line: 732	
	SVNUIPlugin.start(BundleContext) line: 449	
	BundleContextImpl$2.run() line: 814	
	BundleContextImpl$2.run() line: 1	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 806	
	BundleContextImpl.start() line: 763	
	EquinoxBundle.startWorker0() line: 1028	
	EquinoxBundle$EquinoxModule.startWorker() line: 371	
	EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 605	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 468	
	SecureAction.start(Module, Module$StartOptions...) line: 511	
	EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117	
	ClasspathManager.findLocalClass(String) line: 572	
	EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 345	
	BundleLoader.findLocalClass(String) line: 401	
	BundleLoader.findClass(String) line: 480	
	EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 170	
	EquinoxClassLoader(ClassLoader).loadClass(String) line: 522	
	EquinoxBundle.loadClass(String) line: 622	
	EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 196	
	ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 920	
	ConfigurationElement.createExecutableExtension(String) line: 246	
	ConfigurationElementHandle.createExecutableExtension(String) line: 63	
	SVNProviderPlugin.getMessageHandlers() line: 240	
	SVNProviderPlugin.start(BundleContext) line: 155	
	BundleContextImpl$2.run() line: 814	
	BundleContextImpl$2.run() line: 1	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 806	
	BundleContextImpl.start() line: 763	
	EquinoxBundle.startWorker0() line: 1028	
	EquinoxBundle$EquinoxModule.startWorker() line: 371	
	EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 605	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 468	
	SecureAction.start(Module, Module$StartOptions...) line: 511	
	EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 117	
	ClasspathManager.findLocalClass(String) line: 572	
	EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 345	
	BundleLoader.findLocalClass(String) line: 401	
	BundleLoader.findClass(String) line: 480	
	EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 170	
	EquinoxClassLoader(ClassLoader).loadClass(String) line: 522	
	EquinoxBundle.loadClass(String) line: 622	
	EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 196	
	ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 920	
	ConfigurationElement.createExecutableExtension(String) line: 246	
	ConfigurationElementHandle.createExecutableExtension(String) line: 63	
	RepositoryProvider.newProvider(String) line: 739	
	RepositoryProvider.mapNewProvider(IProject, String) line: 197	
	RepositoryProvider.mapExistingProvider(IProject, String) line: 267	
	RepositoryProvider.getProvider(IProject) line: 542	
	TeamHookDispatcher.getProvider(IResource) line: 96	
	TeamHookDispatcher.getRuleFactory(IProject) line: 102	
	Rules.factoryFor(IResource) line: 101	
	Rules.refreshRule(IResource) line: 178	
	Folder(Resource).refreshLocal(int, IProgressMonitor) line: 1552	
	RefreshJob.runInWorkspace(IProgressMonitor) line: 166	
	RefreshJob(InternalWorkspaceJob).run(IProgressMonitor) line: 42	
	Worker.run() line: 63	
@minduch
Copy link
Author

minduch commented Aug 24, 2021

I think this bug is a duplicate of #183, but this description is "better" because it shows why Eclipse fails starting as described in #183.

@markphip
Copy link
Contributor

Unfortunately there is no one that regularly contributes to this product any more :( If someone submits a PR I always try to find the time to get it merged and I did manage to get everything automated so that PR's and merges publish builds so it is easy to try them out.

FWIW, Eclipse 4.20 still works fine for me. I guess that is good news in terms of the scope of the problem and the people affected but it does make it more difficult to know if a PR really fixes the problem.

@minduch
Copy link
Author

minduch commented Aug 24, 2021

Yes, Subclipse works fine with Eclipse 4.20 as long as it shuts down properly.

If it is halted e.g. due to JVM termination, you get this bug all the time when you restart Eclipse. I know that some files could be deleted in the .metadata/.plugins directory to cure the workspace refresh, but I can't seem to make that work. Do you know what files they were?

Otherwise, the only way to fix it is to delete the .metadata directory and re-import all existing projects again. This is a sad thing when you have tons of projects...

@markphip
Copy link
Contributor

Thanks, if someone ever submits a PR, I will try killing my Eclipse process to see if I can recreate the problem and then try again using the PR.

@twwwt
Copy link

twwwt commented Sep 16, 2021

I have just tried Eclipse 4.21.0 (2021-09) on an Ubuntu Linux 20.04 and using OpenJDK 11.0.11. I'm not sure, but I think the situation got worse. On a fresh installation and fresh workspace, immediately after installing Subclipse 4.3.3 (via the Eclipse Marketplace), Eclipse hangs/freezes after startup. More precisely, the startup procedure seems finished but as soon as I click on any menu item, the UI freezes. This is very likely caused by Subclipse, since it is the only plugin that was added to the fresh installation and workspace, which was even completely empty (i.e. no projects existed).

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

No branches or pull requests

3 participants