Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI crash of ExtendedTableViewer of PeakTable and MeasurmentResult #78

Open
lorenzgerber opened this issue Oct 17, 2019 · 6 comments
Open
Milestone

Comments

@lorenzgerber
Copy link
Contributor

When selecting delete peak(s) / scan identification(s) from the peak list's context menu, a small pop-up appears in the chromatogram editor (Deselect all/Select all).
When the user now, while this pop-up is still visible, right-clicks somewhere else in the chromatogram (for example to start a processor), the selected Processor never starts, instead a UI crash with the following stack trace occours:

!ENTRY org.eclipse.ui 4 0 2019-10-17 11:10:14.528
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:268)
	at org.eclipse.swt.widgets.Display.runPopups(Display.java:4157)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3699)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.chemclipse.rcp.app.ui.internal.support.ApplicationSupportDefault.start(ApplicationSupportDefault.java:26)
	at org.eclipse.chemclipse.rcp.app.ui.Application.start(Application.java:61)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)

This happens consistently. The behaviour can be prevented by first clicking away the pop-up through a left click somewhere else in the chromatogram. But when working with peak lists, it's an annoying behaviour as it increases the number of needed clicks.

The context menu Deselect all/select all refers to the peak list. It seems however not useful to have this pop-up at all in the chain of deleting (a) peak(s).

@laeubi
Copy link
Member

laeubi commented Oct 18, 2019

org.eclipse.swt.widgets.Menu._setVisible(Menu.java:268) seems to be related to SWT, can you try to take a look what the code does on this place for macos/cocoa?

@lorenzgerber lorenzgerber changed the title UI crash related to deleting peaks UI crash of ExtendedTableViewer of PeakTable and MeasurmentResult Oct 18, 2019
@lorenzgerber
Copy link
Contributor Author

The same exception can be produced with the MeasurmentResult table or any other ExtendedTableViewer based table:

  1. right click into the table, a pop up appears
  2. select an entry, another probably 'default value' pop-up appears (select all/deselect all)
  3. while the pop-up is active, right click into the chromatogram editor and select a processor
    -> the above described exception occurs

@lorenzgerber
Copy link
Contributor Author

Screenshot 2019-10-18 at 15 48 12
Screenshot 2019-10-18 at 15 48 20

@laeubi
Copy link
Member

laeubi commented Oct 18, 2019

Under Linux the following happens:

  1. The PopUp Menu appears and is closed after a few miliseconds
  2. the one has to reopen the poup once again and it works fine

Under MacOS, this triggers the Eclipse Bug 552223, because Cocoa works different by not closing the popup on dispose and then works on a disposed instance.

I think this behavior should be fixed, as it requires 3(!) clicks to open the poup menu if the Chromatogram editor does not own the focus and would workaround the cocoa issue.

@laeubi laeubi added this to the 0.9.x milestone Mar 1, 2020
@Mailaender
Copy link
Contributor

Is this still a problem on macOS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants