Community
Participate
Working Groups
Eclipse crashes on startup when it tries to load a fragment that extends a plugin that does not exist. Under Windows, this means that the spash screen turns off, without starting the workbench. No log is written when this occurs. No output is printed to the command line when invoking using eclipse.exe. Starting Eclipse using the command line "java -cp startup.jar org.eclipse.core.launcher.UIMain" will print the NPE stack trace to the console. I am using the Eclipse 20011115 integration build. To reproduce from a fresh installation of Eclipse: - Create a fragment called org.eclipse.bug. The fragment.xml should look like: <?xml version="1.0" encoding="UTF-8"?> <fragment name="Bug Fragment" id="org.eclipse.bug" version="1.0.0" plugin-id="org.eclipse.not.there" plugin-version="1.0.0"> <runtime> <library name="bug.jar"/> </runtime> </fragment> - Start Eclipse from the command prompt using the command: java -cp startup.jar org.eclipse.core.launcher.UIMain - The NPE stack trace should get printed to the console.
Failure case was bad so I released a fix immediately. Problem was in this code in RegistryResolver#linkFragments: IndexEntry ix = (IndexEntry) idmap.get(fragment.getPluginId()); byte matchType = fragment.getMatch(); for (Iterator list = ix.versions().iterator(); list.hasNext() && plugin == null;) { It is possible for "ix" to be null, causing the NullPointerException in the for loop. Also released a fix to the message catalog for this case. Debbie, I CC'd you so you can confirm the fix and add tests if desired. Versions for fix in repo are: org.eclipse.core.internal.plugins.RegistryResolver 1.17 org.eclipse.core.internal.runtime.messages.properties 1.9
A new test has been added to the class BadPluginsTest (badFragment) to test this case. Other tests in the runtime test package have been examined for empty 'catch' clauses in a try/catch construct.
Fixed in v211