Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 578912

Summary: Null pointer exception running Eclipse bundle explorer on Eclipse 2021-12
Product: [Tools] MAT Reporter: Andrew Johnson <andrew_johnson>
Component: CoreAssignee: Andrew Johnson <andrew_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.12   
Target Milestone: 1.13.0   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/191070
https://git.eclipse.org/c/mat/org.eclipse.mat.git/commit/?id=d7025926fb6a5e282d964d787408142c7bb3b92b
Whiteboard:
Bug Depends on:    
Bug Blocks: 577157    

Description Andrew Johnson CLA 2022-02-22 11:59:57 EST
Install Eclipse 2021-12 (java-2021-12)
Install MAT
Acquire a dump 
Run the Eclipse Bundle Explorer query.

Result:
Cannot invoke "org.eclipse.mat.inspections.collectionextract.ExtractedCollection.iterator()" because the return value of "org.eclipse.mat.inspections.collectionextract.CollectionExtractionUtils.extractList(org.eclipse.mat.snapshot.model.IObject)" is null (java.lang.NullPointerException)

java.lang.NullPointerException: Cannot invoke "org.eclipse.mat.inspections.collectionextract.ExtractedCollection.iterator()" because the return value of "org.eclipse.mat.inspections.collectionextract.CollectionExtractionUtils.extractList(org.eclipse.mat.snapshot.model.IObject)" is null
	at org.eclipse.mat.inspections.osgi.model.EquinoxBundleReader2.isFragment(EquinoxBundleReader2.java:165)
	at org.eclipse.mat.inspections.osgi.model.EquinoxBundleReader2.getBundleDescriptors(EquinoxBundleReader2.java:141)
	at org.eclipse.mat.inspections.osgi.model.EquinoxBundleReader2.readOSGiModel(EquinoxBundleReader2.java:106)
	at org.eclipse.mat.inspections.osgi.BundleRegistryQuery.execute(BundleRegistryQuery.java:93)
	at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:138)
	at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:182)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
	
	
eclipse.buildId=4.22.0.I20211124-1800
java.version=17.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB
Framework arguments:  -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -data file:/C:/Users/AndrewJohnson/eclipse-workspace/ -product org.eclipse.epp.package.java.product
Comment 1 Eclipse Genie CLA 2022-02-22 12:44:04 EST
New Gerrit change created: https://git.eclipse.org/r/c/mat/org.eclipse.mat/+/191070
Comment 3 Andrew Johnson CLA 2022-02-22 13:06:41 EST
See bug 573026 changing how module revisions are stored to use NamespaceList
This isn't a regular collection, so code needs to be changed to properly extract the list.