Bug 576520

Summary: NPE in Index.query(Index.java:152) on deleting project
Product: [Eclipse Project] JDT Reporter: Gabriele Pezzini <gabriele.pezzini>
Component: CoreAssignee: Andrey Loskutov <loskutov>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: gayanper, loskutov, tjwatson
Version: 4.21Keywords: regression
Target Milestone: 4.22 M3   
Hardware: PC   
OS: All   
See Also: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/186310
https://bugs.eclipse.org/bugs/show_bug.cgi?id=570078
https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=437144de085992ac398c6582dce05c16b64324db
Whiteboard:
Attachments:
Description Flags
Eclipse debug call stack and eclipse error log none

Description Gabriele Pezzini CLA 2021-10-08 04:46:07 EDT
Created attachment 287281 [details]
Eclipse debug call stack and eclipse error log

This error happens while my plugin is running.

My plugin performs these steps

- creates a java project
- performs its task
- deletes the java project created below

It seems to me which the error occurs during the
delete of the java project.

The exception is:
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.index.Index.query(Index.java:152)
	at org.eclipse.jdt.internal.core.index.Index.getMetaIndexQualifications(Index.java:243)
	at org.eclipse.jdt.internal.core.search.indexing.IndexManager$MetaIndexUpdateRequest.execute(IndexManager.java:1772)
	at org.eclipse.jdt.internal.core.search.processing.JobManager.run(JobManager.java:432)
	at java.base/java.lang.Thread.run(Thread.java:834)
Comment 1 Gabriele Pezzini CLA 2021-10-08 04:49:43 EDT
Note which in the previous version of Eclipse using the same plugin does not happes
Comment 2 Eclipse Genie CLA 2021-10-08 11:33:47 EDT
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/186310
Comment 4 Andrey Loskutov CLA 2021-10-23 10:57:44 EDT
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/186310 was
> merged to [master].
> Commit:
> http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/
> ?id=437144de085992ac398c6582dce05c16b64324db

@Gabrielle: would be nice if you could check if this nightly build (or any later one) fixes the problem:

https://download.eclipse.org/eclipse/downloads/drops4/I20211022-1800

If not, please provide new stack trace.
Comment 5 Gabriele Pezzini CLA 2021-10-28 05:16:36 EDT
Hi,
I have tested using the suggested build and the error does not comes.

Thanks.
Comment 6 Andrey Loskutov CLA 2021-10-28 06:53:23 EDT
(In reply to Gabriele Pezzini from comment #5)
> Hi,
> I have tested using the suggested build and the error does not comes.
> 
> Thanks.

Thanks Gabriele for validaton!