Bug 33321 - NPE in IndexManager shutdown
Summary: NPE in IndexManager shutdown
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-26 14:12 EST by Olivier Thomann CLA
Modified: 2003-03-10 11:43 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2003-02-26 14:12:12 EST
Using RC1, I got this running some JUnit plugin tests.

java.lang.NullPointerException
	at
org.eclipse.jdt.internal.core.search.indexing.IndexManager.shutdown(IndexManager.java:509)
	at
org.eclipse.jdt.internal.core.JavaModelManager.shutdown(JavaModelManager.java:1535)
	at org.eclipse.jdt.core.JavaCore.shutdown(JavaCore.java:2986)
	at org.eclipse.core.internal.plugins.PluginRegistry$2.run(PluginRegistry.java:283)
	at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:867)
	at
org.eclipse.core.internal.plugins.PluginRegistry$1.visit(PluginRegistry.java:296)
	at org.eclipse.core.internal.plugins.PluginRegistry.accept(PluginRegistry.java:55)
	at
org.eclipse.core.internal.plugins.PluginRegistry.shutdownPlugins(PluginRegistry.java:299)
	at
org.eclipse.core.internal.plugins.PluginRegistry.shutdown(PluginRegistry.java:265)
	at
org.eclipse.core.internal.runtime.InternalPlatform.loaderShutdown(InternalPlatform.java:517)
	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:324)
	at
org.eclipse.core.internal.boot.InternalBootLoader.shutdown(InternalBootLoader.java:979)
	at
org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:850)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:431)
	at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)

It seems to happen when the tests run really fast and the index manager doesn't
have time to start before it has to shutdown.

Steps to reproduce:
Run the test suite RunAllJDOMTests using RC1. It happens all the time on my machine.
Comment 1 Philipe Mulet CLA 2003-02-27 05:17:24 EST
Offending line is:
for (int i = 0, indexesFilesLength = indexesFiles.length; i < 
indexesFilesLength; i++) {

Added null check on indexesFiles (which can be null in some occasions).
Comment 2 Philipe Mulet CLA 2003-02-27 05:23:19 EST
Fixed
Comment 3 David Audel CLA 2003-03-10 11:43:53 EST
Verified.