Bug 578912 - Null pointer exception running Eclipse bundle explorer on Eclipse 2021-12
Summary: Null pointer exception running Eclipse bundle explorer on Eclipse 2021-12
Status: RESOLVED FIXED
Alias: None
Product: MAT
Classification: Tools
Component: Core (show other bugs)
Version: 1.12   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: 1.13.0   Edit
Assignee: Andrew Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 577157
  Show dependency tree
 
Reported: 2022-02-22 11:59 EST by Andrew Johnson CLA
Modified: 2022-02-22 13:11 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 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.