Community
Participate
Working Groups
Ignoring result of 'Top Components' due to Object 0x2aaabf9e31a0 not found. org.eclipse.mat.SnapshotException: Object 0x2aaabf9e31a0 not found. at org.eclipse.mat.parser.internal.SnapshotImpl.mapAddressToId(SnapshotImpl.java:1451) at org.eclipse.mat.snapshot.model.ObjectReference.getObjectId(ObjectReference.java:56) at org.eclipse.mat.parser.model.AbstractObjectImpl.resolveValue(AbstractObjectImpl.java:237) at org.eclipse.mat.inspections.collections.CollectionUtil$Info.getSize(CollectionUtil.java:92) at org.eclipse.mat.inspections.collections.CollectionsBySizeQuery.execute(CollectionsBySizeQuery.java:104) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.snapshot.query.SnapshotQuery.refine(SnapshotQuery.java:202) at org.eclipse.mat.inspections.component.ComponentReportQuery.addEmptyCollections(ComponentReportQuery.java:434) at org.eclipse.mat.inspections.component.ComponentReportQuery.execute(ComponentReportQuery.java:108) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.inspections.component.TopComponentsReportQuery.execute(TopComponentsReportQuery.java:66) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.query.registry.CommandLine.execute(CommandLine.java:93) at org.eclipse.mat.report.internal.QueryPart.execute(QueryPart.java:96) at org.eclipse.mat.report.TestSuite.execute(TestSuite.java:131) at org.eclipse.mat.report.internal.RunRegisterdReport.execute(RunRegisterdReport.java:50) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:174) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) The problem occurs because a field contains an address of an unknown object. The way the DTFJ parser works is that all objects and classes are found initially and are given ids then the outbound references are built. Any unknown outbound refs are ignored, but they are visible as addresses, not ids when an object is inspected.
A first step is to improve the error message. The ObjectReference.getObjectId() method throws an exception, and doesn't return <0, so we need to catch the exception and rethrow. Ignoring result of 'Top Components' due to Field 'map' of 'java.util.HashSet @ 0x2aaabf525450' contains an illegal object reference: 0x2aaabf9e31a0
Catching the exception in CollectionsBySizeQuery just leads to another exception later. java.lang.ClassCastException: org.eclipse.mat.parser.model.PrimitiveArrayImpl incompatible with org.eclipse.mat.snapshot.model.IObjectArray at org.eclipse.mat.inspections.collections.CollectionUtil$Info.getBackingArray(CollectionUtil.java:231) at org.eclipse.mat.inspections.collections.CollectionFillRatioQuery.getFillRatio(CollectionFillRatioQuery.java:128) at org.eclipse.mat.inspections.collections.CollectionFillRatioQuery.execute(CollectionFillRatioQuery.java:116) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.snapshot.query.SnapshotQuery.refine(SnapshotQuery.java:202) at org.eclipse.mat.inspections.component.ComponentReportQuery.addCollectionFillRatios(ComponentReportQuery.java:532) at org.eclipse.mat.inspections.component.ComponentReportQuery.execute(ComponentReportQuery.java:115) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.inspections.component.TopComponentsReportQuery.execute(TopComponentsReportQuery.java:66) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.query.registry.CommandLine.execute(CommandLine.java:93) at org.eclipse.mat.report.internal.QueryPart.execute(QueryPart.java:96) at org.eclipse.mat.report.TestSuite.execute(TestSuite.java:131) at org.eclipse.mat.report.internal.RunRegisterdReport.execute(RunRegisterdReport.java:50) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:174) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Here is another exception to be handled. org.eclipse.mat.SnapshotException: Field table of java.util.HashMap @ 0x2aaaafee0370 contains int[20] @ 0x2aaaafee0988 instead of an array of objects as a backing array at org.eclipse.mat.SnapshotException.<init>(SnapshotException.java:46) at org.eclipse.mat.inspections.collections.CollectionUtil$Info.getBackingArray(CollectionUtil.java:232) at org.eclipse.mat.inspections.collections.MapCollisionRatioQuery.getCollisionRatio(MapCollisionRatioQuery.java:120) at org.eclipse.mat.inspections.collections.MapCollisionRatioQuery.execute(MapCollisionRatioQuery.java:105) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.snapshot.query.SnapshotQuery.refine(SnapshotQuery.java:202) at org.eclipse.mat.inspections.component.ComponentReportQuery.addHashMapsCollisionRatios(ComponentReportQuery.java:626) at org.eclipse.mat.inspections.component.ComponentReportQuery.execute(ComponentReportQuery.java:148) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.snapshot.query.SnapshotQuery.execute(SnapshotQuery.java:192) at org.eclipse.mat.inspections.component.TopComponentsReportQuery.execute(TopComponentsReportQuery.java:66) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.query.registry.CommandLine.execute(CommandLine.java:93) at org.eclipse.mat.report.internal.QueryPart.execute(QueryPart.java:96) at org.eclipse.mat.report.TestSuite.execute(TestSuite.java:131) at org.eclipse.mat.report.internal.RunRegisterdReport.execute(RunRegisterdReport.java:50) at org.eclipse.mat.query.registry.ArgumentSet.execute(ArgumentSet.java:129) at org.eclipse.mat.ui.QueryExecution$ExecutionJob.run(QueryExecution.java:174) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)