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

Eclipse Oxygen fails to start after installing ECD #23

Open
EVi1b7wO opened this issue Jul 8, 2017 · 3 comments
Open

Eclipse Oxygen fails to start after installing ECD #23

EVi1b7wO opened this issue Jul 8, 2017 · 3 comments

Comments

@EVi1b7wO
Copy link

EVi1b7wO commented Jul 8, 2017

Hi,

after installing v2.9.7 in Eclipse Oxygen, Eclipse will refuse to startup for a second time with an NPE
at org.sf.feeling.decompiler.SetupRunnable.setupPartListener(SetupRunnable.java:61). Tested earlier versions including v2.9.2 which all suffer by the same Issue.

To restore Eclipse the complete .metadata directory needs to be deleted. I'm running a minimal JDT installation with SVN integration based on the Eclipse Platform Runtime Binary.

!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(SWT.java:4533)
at org.eclipse.swt.SWT.error(SWT.java:4448)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4497)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4110)
at org.eclipse.swt.widgets.Display.release(Display.java:4162)
at org.eclipse.swt.graphics.Device.dispose(Device.java:235)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:167)
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 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: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)
Caused by: java.lang.NullPointerException
at org.sf.feeling.decompiler.SetupRunnable.setupPartListener(SetupRunnable.java:61)
at org.sf.feeling.decompiler.SetupRunnable.run(SetupRunnable.java:43)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
... 18 more

@cnfree
Copy link
Owner

cnfree commented Jul 8, 2017

I committed a new version 2.9.9 that fixed this bug. Please update to this version, thanks.

@EVi1b7wO
Copy link
Author

EVi1b7wO commented Jul 9, 2017

Now it's failing with an NPE at another location.

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
[..]
Caused by: java.lang.NullPointerException
at org.sf.feeling.decompiler.JavaDecompilerPlugin$3.run(JavaDecompilerPlugin.java:407)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:37)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)

Should'nt you be using Display.getDefaut().asyncExec in the SetupRunable instead of Display.getDefault().timerExec?

Also may you please update the master branch to the source you are building from? all the latest releases show ae6e8d and that is not the actual source.

Thanks

@cnfree
Copy link
Owner

cnfree commented Jul 10, 2017

I don't know why PlatformUI.getWorkbench( ).getActiveWorkbenchWindow( ) in your eclipse return null value, that's not a normal state.

So I had to use Display.getDefault( ).timerExec:

public void run( )
	{
		try
		{
			if ( PlatformUI.getWorkbench( ) == null
					|| PlatformUI.getWorkbench( ).getActiveWorkbenchWindow( ) == null
					|| PlatformUI.getWorkbench( ).getActiveWorkbenchWindow( ).getActivePage( ) == null )
			{
				Display.getDefault( ).timerExec( 1000, new Runnable( ) {

					public void run( )
					{
						SetupRunnable.this.run( );
					}
				} );
			}
			else
			{
				checkDecompilerUpdate( );
				checkClassFileAssociation( );
				setupPartListener( );
				checkDecompilerExtension( );
			}
		}
		catch ( Throwable e )
		{
			Logger.debug( e );
		}
	}

And I build a version 2.9.11, you can try it. But I don't make sure that It can work on your eclipse correctly.

For some reasons, I don't commit the decompiler code on this site, you can clone the master branch at https://github.com/cpupk/ecd, thanks.

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

2 participants