Community
Participate
Working Groups
If you open a dump with an UnreachableObjectsHistogram, run the Unreachable Objects Histogram query, then open a dump without the UnreachableObjectsHistogram, then bring up the query browser with control-Q then select the UnreachableObjectsHistogram from the history then a query dialog appears. Typing anything into the -histogram field gives Event loop exception java.lang.NullPointerException at org.eclipse.mat.query.registry.QueryContextImpl.convertToValue(QueryContextImpl.java:44) at org.eclipse.mat.internal.snapshot.SnapshotQueryContext.convertToValue(SnapshotQueryContext.java:183) at org.eclipse.mat.ui.internal.query.arguments.TextEditor.editingDone(TextEditor.java:154) at org.eclipse.mat.ui.internal.query.arguments.TextEditor$2.modifyText(TextEditor.java:120) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
The main problem is that queries are shown in the history which are not valid and are not satisfiable by that dump. There is no converter available to convert a String from the user into the UnreachableObjectsHistogram. The error message could be slightly better. Main fix: Ensure the QueryHistoryProvider doesn't return unsuitable queries. Also give a better error message if for some reason an unsuitable query is somehow selected.
Fix has now been applied. It is still possible to run the query on a dump without an Unreachable Objects Histogram by typing control-Q unreachable_objects This gives an error message in the dialog of java.lang.IllegalArgumentException: org.eclipse.mat.snapshot.UnreachableObjectsHistogram This is not very helpful. Would this be better? Impossible to convert any string to org.eclipse.mat.snapshot.UnreachableObjectsHistogram, query is not suitable for this snapshot
Error message is now: Impossible to convert any string to org.eclipse.mat.snapshot.UnreachableObjectsHistogram, query is not suitable for this snapshot