| Summary: | Top Components report fails due to unknown object | ||
|---|---|---|---|
| Product: | [Tools] MAT | Reporter: | Andrew Johnson <andrew_johnson> |
| Component: | Core | Assignee: | Project Inbox <mat.core-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | ||
| Version: | 1.0 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Andrew Johnson
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) |