Bug 577897 - 202-12 -> 4.22: File Search: NullPointerException
Summary: 202-12 -> 4.22: File Search: NullPointerException
Status: CLOSED DUPLICATE of bug 577741
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.22   Edit
Hardware: PC Linux
: P3 major with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo, regression
Depends on:
Blocks:
 
Reported: 2021-12-20 02:24 EST by Frank Reichart CLA
Modified: 2022-03-21 16:34 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Reichart CLA 2021-12-20 02:24:37 EST
Once updated version 2020-12 to this version (4.22), File Search in Workspace generates

An internal error occurred during: "File Search".
java.lang.NullPointerException
 
Reproducibility: always (regardless of search options like file name patterns).
Note: other search classes (tabs) are not affected.

-- Configuration Details --
Product: Eclipse IDE 4.22.0.20211202-1200 (org.eclipse.epp.package.php.product)Installed Features:
 org.eclipse.platform 4.22.0.v20211124-1800
Comment 1 Thomas Wolf CLA 2021-12-20 03:09:14 EST
There should be more details in the Eclipse log. Please post the log entry including the exception stack trace. The Eclipse log file is in your workspace in folder .metadata.
Comment 2 Andrey Loskutov CLA 2021-12-20 03:12:08 EST
Most likely duplicate of bug 577741
Comment 3 Frank Reichart CLA 2021-12-21 01:42:13 EST
Thanks a lot! Log entry (which re-occurs per use of File Search) is quite meaningful. Following the last entry of the previous version directly followed (genuine order, nothing cut) by the initial occurrence of the NullPointer Exception with the new version

!SESSION 2021-12-12 09:07:26.609 -----------------------------------------------
eclipse.buildId=4.21.0.I20210906-0500
java.version=11.0.13
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.php.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.php.product

!ENTRY org.eclipse.wst.sse.ui 2 2 2021-12-12 09:07:35.986
!MESSAGE Configuration element ConfigurationElementHandle [name: proposalComputerExtendedActivation, id: org.eclipse.wst.jsdt.web.ui.ContentAssistProposals, handle id: 4624, namespace: org.eclipse.php.ui] intented to extend an existing completion proposal computer specified an invalid completion proposal computer ID org.eclipse.wst.jsdt.web.ui.ContentAssistProposals
!SESSION 2021-12-19 11:10:01.028 -----------------------------------------------
eclipse.buildId=4.22.0.I20211124-1800
java.version=11.0.13
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.php.product
Command-line arguments:  -data file:/home/ref8st/Documents/Development/PHP/php-workplace/ -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.php.product

!ENTRY org.eclipse.wst.sse.ui 2 2 2021-12-19 11:10:30.902
!MESSAGE Configuration element ConfigurationElementHandle [name: proposalComputerExtendedActivation, id: org.eclipse.wst.jsdt.web.ui.ContentAssistProposals, handle id: 11931, namespace: org.eclipse.php.ui] intented to extend an existing completion proposal computer specified an invalid completion proposal computer ID org.eclipse.wst.jsdt.web.ui.ContentAssistProposals

!ENTRY org.eclipse.e4.ui.workbench 2 0 2021-12-19 11:10:33.450
!MESSAGE Removing PartDescriptorImpl with the "org.eclipse.search.SearchResultView" id and the "Classic Search" label.It points to the non available "bundleclass://org.eclipse.ui.workbench/org.eclipse.ui.internal.e4.compatibility.CompatibilityView" class. Bundle might have been uninstalled

!ENTRY org.eclipse.core.jobs 4 2 2021-12-19 11:54:18.438
!MESSAGE An internal error occurred during: "File Search".
!STACK 0
java.lang.NullPointerException
	at java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
	at java.base/java.util.Comparators$NullComparator.compare(Comparators.java:83)
	at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:360)
	at java.base/java.util.TimSort.sort(TimSort.java:234)
	at java.base/java.util.Arrays.sort(Arrays.java:1515)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:417)
	at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:450)
	at org.eclipse.search.core.text.TextSearchEngine$1.search(TextSearchEngine.java:60)
	at org.eclipse.search.internal.ui.text.FileSearchQuery.run(FileSearchQuery.java:236)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
!SESSION 2021-12-19 11:54:59.820 -----------------------------------------------
eclipse.buildId=4.22.0.I20211124-1800
java.version=11.0.13
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.php.product
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.php.product

Had tried to find a duplicate prior to posting, but unfortunately could not find one.
Comment 4 Frank Reichart CLA 2021-12-27 19:49:46 EST
Have now tried to download a fresh copy of 2021-12 using the existing workspace: same symptom, although I have noticed that the File Search option "Selected resources" does not throw the exception, just "Workspace" and "Enclosing projects".
Comment 5 Frank Reichart CLA 2021-12-27 20:04:00 EST
Have tried to open another (existing) workspace confirming the workspace migration dialog. There File Search works without throwing an exception. So the symptom seems to be related with the workspace that was migrated tpgether with the IDE.
Comment 6 Frank Reichart CLA 2021-12-27 21:45:47 EST
Have created a new workspace, in there created a new (PHP) project and imported the artifacts of the migrated workspace. This works around the issue. File Search is again functional. So the issue seems to be related with migrating a workspace containing PHP projects, as the Java workspace migrated in comment #5 was not affected.
Comment 7 Sebastien Nadeau CLA 2022-02-25 15:10:46 EST
Got similar bug here, File Search in Workspace, File name patterns * and *.properties (does not happen with *.java or *.jsp):

Spring Tool Suite 4 

Version: 4.13.1.RELEASE
Build Id: 202201311654

!ENTRY org.eclipse.core.jobs 4 2 2022-02-25 14:17:26.240
!MESSAGE An internal error occurred during: "File Search".
!STACK 0
java.lang.NullPointerException
	at java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
	at java.base/java.util.Comparators$NullComparator.compare(Comparators.java:83)
	at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
	at java.base/java.util.TimSort.sort(TimSort.java:234)
	at java.base/java.util.Arrays.sort(Arrays.java:1515)
	at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:353)
	at java.base/java.util.stream.Sink$ChainedReference.end(Sink.java:258)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:417)
	at org.eclipse.search.internal.core.text.TextSearchVisitor.search(TextSearchVisitor.java:450)
	at org.eclipse.search.core.text.TextSearchEngine$1.search(TextSearchEngine.java:60)
	at org.eclipse.search.internal.ui.text.FileSearchQuery.run(FileSearchQuery.java:236)
	at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:94)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Comment 8 Sebastian Zarnekow CLA 2022-03-18 14:16:06 EDT
Please make sure that you have org.eclipse.search in 3.14.100 or better in your environment available.

*** This bug has been marked as a duplicate of bug 577741 ***
Comment 9 Sebastien Nadeau CLA 2022-03-21 16:34:42 EDT
Indeed, the latest STS contains org.eclipse.search_3.14.0.v20211108-0804.jar. I will wait for the next update and see if it's fixed.