Bug 43984 - NPE in background search
Summary: NPE in background search
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-01 09:42 EDT by Tod Creasey CLA
Modified: 2003-11-20 10:48 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 Tod Creasey CLA 2003-10-01 09:42:56 EDT
20030930

Not sure how I got this one as I was loading from the repository at the time I 
got it. The background build was going on at the time.

java.lang.NullPointerException
	at java.lang.Thread.setPriority(Thread.java:875)
	at 
org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob
(JobManager.java:275)
	at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames
(SearchEngine.java:697)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache.search
(AllTypesCache.java:430)
	at 
org.eclipse.jdt.internal.corext.util.AllTypesCache$TypeCacher.doSearchTypes
(AllTypesCache.java:132)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache$TypeCacher.run
(AllTypesCache.java:98)
Comment 1 Jerome Lanneluc CLA 2003-10-01 09:55:21 EDT
Thread.setPriority(int) cannot throw a NPE. This sounds like a JIT problem.
Comment 2 Philipe Mulet CLA 2003-10-05 05:47:22 EDT
Could this be a problem during shutdown ? If not then pls dispose.
Comment 3 Philipe Mulet CLA 2003-10-05 05:47:54 EDT
or maybe indexing crash recovery ?
Comment 4 Kent Johnson CLA 2003-10-23 14:23:16 EDT
I don't see how this is anything but a VM bug.
Comment 5 Kent Johnson CLA 2003-10-28 16:18:07 EST
I just got the same walkback after I ran a test workspace & then quit a few 
seconds later (I selected the toggle to exit on close in the dialog that popped 
up).

The line 882 in Thread.setPriority is:
	if (newPriority > group.getMaxPriority())

The method Thread.exit(), nulls out the field group. So it looks like a base 
class library bug... they don't check in setPriority if the group is still set.

java.lang.NullPointerException
	at java.lang.Thread.setPriority(Thread.java:882)
	at 
org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob
(JobManager.java:275)
	at org.eclipse.jdt.core.search.SearchEngine.searchAllTypeNames
(SearchEngine.java:701)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache.search
(AllTypesCache.java:430)
	at 
org.eclipse.jdt.internal.corext.util.AllTypesCache$TypeCacher.doSearchTypes
(AllTypesCache.java:132)
	at org.eclipse.jdt.internal.corext.util.AllTypesCache$TypeCacher.run
(AllTypesCache.java:98)
Comment 6 Kent Johnson CLA 2003-10-29 15:02:17 EST
Added workaround... we will only reset the priority if the thread is still 
alive.
Comment 7 David Audel CLA 2003-11-20 10:48:08 EST
Verified.