Community
Participate
Working Groups
N20070226-0010 Start Eclipse with: eclipse.exe -data n2 -clean -consolelog -console -showlocation => Errors in log: !ENTRY org.eclipse.ui.workbench 4 2 2007-02-26 10:48:00.968 !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench". !STACK 0 java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Shell.internal_new(Lorg/eclipse/swt/widgets/Display;J)Lorg/eclipse/swt/widgets/Shell; at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:538) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.createSplashWrapper(Workbench.java:573) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2154) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2125) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:459) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:454) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) !ENTRY org.eclipse.ui 4 0 2007-02-26 10:48:01.000 !MESSAGE Could not instantiate splash !STACK 0 java.lang.NoSuchMethodError: org.eclipse.swt.widgets.Shell.internal_new(Lorg/eclipse/swt/widgets/Display;J)Lorg/eclipse/swt/widgets/Shell; at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:538) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.createSplashWrapper(Workbench.java:573) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2154) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2125) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:459) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:454) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
Kim, I guessing that this is a startup issue...
This is very strange. Nothing has changed on either workbench or SWT sides of the code in ages.
Reproduced with I20070227-0800. I am investigating what could cause it. Reassign to myself. I'll move it back to Platform/UI once I know what happened.
The problem might come from PDE/Build. The ui.workbench plugin is compiled with a 64 bit version of swt before the win32 version of swt. ... <classpath id="FOLDER" path="/builds/I200702270800/src/plugins/org.eclipse.swt.gtk.linux.x86_64/@dot/"/> <classpath id="FOLDER" path="/builds/I200702270800/src/plugins/org.eclipse.swt.win32.win32.x86/@dot/"/> ... The 64 bit version of the internal_new method is: public static org.eclipse.swt.widgets.Shell internal_new(org.eclipse.swt.widgets.Display display, long handle); and the 32 bit version is: public static org.eclipse.swt.widgets.Shell internal_new(org.eclipse.swt.widgets.Display display, int handle); So since the 64 bit version is found first, this is the method that is called. So the splash screen should work fine on a 64 bit platform, but won't work on any 32 bit platform. The code that calls the internal new is: String splashHandle = System.getProperty("org.eclipse.equinox.launcher.splash.handle"); //$NON-NLS-1$ if (splashHandle == null) { createSplash = false; return; } // create the splash getSplash(); if (splash == null) { createSplash = false; return; } int handle = new Integer(splashHandle).intValue(); Shell splashShell = Shell.internal_new(display, handle); this code is platform dependent, but the plugin is not platform dependent. Something must have changed in the way the classpath is computed by PDE/Build. The compiler is right in the way it resolves the method invocation. There is nothing we can do to fix this. Moving to PDE/Build for further investigation. It looks like this code should be moved to a platform dependent plugin.
The reflection might also be a way to fix this.
I've changed the code in workbench to work reflectively as a fix for bug 173844. I'm not sure if the PDE build change will hose anyone else but from the workbench perspective this is no longer an issue.
PDE/Build has not made any changes that should affect this, I think we have just been lucky so far. There are issues in pde.build (and I raised bug 175864), however, in this particular case we wouldn't really be able to do anything. The fragments are added to the classpath in the order returned from the osgi resolver. There may or may not have been changes internal to the osgi resolver that changed the order, but there was never any guarantee that they would be returned in any particular order. With ui.workbench claiming to be platform-independent, the order should not matter. ui.workbench is using a method Shell.internal_new whose signature depends on the platform. There are 2 cases here: 1) Shell.internal_new is API. In this case the signature should be the same on all platforms, I suggest changing it to always be long. 2) Shell.internal_new is not API. In this case it is caller beware and the workbench must protect itself, which Kim has already done in comment #6. Moving to SWT to clarify whether or not Shell.internal_new is API. I suspect not, since it has internal in its name :)
SSQ, should they use reflection?
I believe so. Shell.internal_new() is not API.
Andrew, Kim, is this an issue still? Should I just close as WONTFIX or move to some other component?
This isn't an issue any longer.
(In reply to comment #11) > This isn't an issue any longer. > Just in case this matters, I can see this problem with 3.3M6 on gtk-x86_64...
Eek! Jörg, can you post a stack trace please? Steve, do you have a 64 bit GTK machine that we can try this on?
(In reply to comment #13) > Eek! Jörg, can you post a stack trace please? Here it comes: eclipse.buildId=I20070323-1616 java.version=1.5.0_10 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE Framework arguments: -startup /home/jfrantzius/apps/eclipse3.3/M6/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070319.jar Command-line arguments: -os linux -ws gtk -arch x86_64 -startup /home/jfrantzius/apps/eclipse3.3/M6/eclipse/plugins/org.eclipse.equinox.launcher_1.0.0.v20070319.jar -clean -data /home/jfrantzius/Documents/eclipse_workspaces/sgw2 Error Mon Mar 26 12:29:24 CEST 2007 Could not instantiate splash java.lang.NoSuchMethodException: org.eclipse.swt.widgets.Shell.internal_new(org.eclipse.swt.widgets.Display, int) at java.lang.Class.getMethod(Class.java:1581) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:542) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.Workbench.createSplashWrapper(Workbench.java:596) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2205) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2176) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:463) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:458) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:356) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:171) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1141) at org.eclipse.equinox.launcher.Main.main(Main.java:1116)
Yes, contact Grant or Carolyn.