Bug 20435 - NPE when searching java method
Summary: NPE when searching java method
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P2 major (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-17 08:45 EDT by Carsten Kaiser CLA
Modified: 2002-09-19 10:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carsten Kaiser CLA 2002-06-17 08:45:56 EDT
While trying to search declarations of a java method in a working set on stable 
build F3 I get the following error message:

!SESSION Jun 17, 2002 14:29:45.708 ---------------------------------------------
java.version=1.3.1_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Command-line arguments: -os win32 -ws win32 -arch x86 -install file:D:/eclipse/
!ENTRY org.eclipse.jdt.ui 4 1 Jun 17, 2002 14:29:45.708
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
	at java.lang.Thread.setPriority(Unknown Source)
	at 
org.eclipse.jdt.internal.core.search.processing.JobManager.performConcurrentJob
(JobManager.java:247)
	at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:400)
	at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute
(JavaSearchOperation.java:86)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:64)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1361)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:98)
Comment 1 Jerome Lanneluc CLA 2002-06-17 09:54:47 EDT
This appears to be a very rare race condition. The code were the NPE is thrown 
is:
  if (this.thread != null) {
    this.thread.setPriority(originalPriority); // line 247
  }
The 'thread' field is only set to null on shut down, or if a RuntimeException 
is thrown by the background indexer (and this is only temporary, as a new 
thread is created right away). A subsequent search should work.

Another possibility is a JIT bug. In this case, there is nothing we can do.

Comment 2 Philipe Mulet CLA 2002-06-20 07:46:49 EDT
Need to investigate, post 2.0
Comment 3 Philipe Mulet CLA 2002-07-25 06:59:34 EDT
Reopening
Comment 4 Philipe Mulet CLA 2002-07-25 07:00:52 EDT
Clearing resolution
Comment 5 Jerome Lanneluc CLA 2002-08-13 10:57:56 EDT
Fixed in HEAD by using a local variable to avoid the race condition.
Comment 6 David Audel CLA 2002-09-19 10:41:12 EDT
Verified