Community
Participate
Working Groups
java.lang.NullPointerException at org.eclipse.mat.ui.util.EasyToolBarDropDown.<init>(EasyToolBarDropDown.java:46) at org.eclipse.mat.ui.actions.QueryDropDownMenuAction.<init>(QueryDropDownMenuAction.java:53) at org.eclipse.mat.ui.compare.CompareBasketView$4.menuShown(CompareBasketView.java:272) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4881) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4557) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1627) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2069) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256) at org.eclipse.swt.widgets.Display.runPopups(Display.java:4206) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3748)
Actually, the same error occurs in 3.x. java.lang.NullPointerException at org.eclipse.mat.ui.util.EasyToolBarDropDown.<init>(EasyToolBarDropDown.java:46) at org.eclipse.mat.ui.actions.QueryDropDownMenuAction.<init>(QueryDropDownMenuAction.java:53) at org.eclipse.mat.ui.compare.CompareBasketView$4.menuShown(CompareBasketView.java:272) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4881) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4557) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1610) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2061) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256) at org.eclipse.swt.widgets.Display.runPopups(Display.java:4206) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3748) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
Do you have a few more details about how to reproduce this - does it happen always, which exact version, which steps do you take?
(In reply to comment #2) > Do you have a few more details about how to reproduce this - does it happen > always, which exact version, which steps do you take? Yes, it always happens. Just open the 'Compare Basket' view and then right-click on it and the error will occur. I am using Memory Analyzer version 1.1.0.201105231821.
I've reproduced the problem - the right click is on the empty compare basket view, and the message appears in the error log (no pop-up error appears). java.lang.NullPointerException at org.eclipse.mat.ui.util.EasyToolBarDropDown.<init>(EasyToolBarDropDown.java:46) at org.eclipse.mat.ui.actions.QueryDropDownMenuAction.<init>(QueryDropDownMenuAction.java:53) at org.eclipse.mat.ui.compare.CompareBasketView$4.menuShown(CompareBasketView.java:272) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:241) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058) at org.eclipse.swt.widgets.Control.WM_INITMENUPOPUP(Control.java:4487) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4190) at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:341) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1598) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:2038) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4873) at org.eclipse.swt.internal.win32.OS.TrackPopupMenu(Native Method) at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:256) at org.eclipse.swt.widgets.Display.runPopups(Display.java:4107) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3651) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.mat.ui.rcp.Application.start(Application.java:26) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) There's also another problem. If I add a histogram to the basket, but don't select it, but right click on an empty space in the table, then do 'Compare Tables with all set operations' then I get: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0 at org.eclipse.mat.internal.snapshot.inspections.CompareTablesQuery.execute(CompareTablesQuery.java:106) 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)
I have some fixes: If there are no entries in the table then we shouldn't have a menu. If there no selected entries in the table then queries which expect a table/tree should not be allowed. Also the status message when selecting a query description on the menu didn't appear at the bottom as the IStatusLine should be obtained from the view site, not the editor. This bug also appeared in the inspector view and notes view.