Community
Participate
Working Groups
I have the following setup A <- B <- C with only a dependency specified in A. I exclude a dependency from B, save, put focus on the dep hierarchy page, undo, save, close the editor (last 3 steps need to be done quickly), and you get the following exception. org.eclipse.core.runtime.AssertionFailedException: assertion failed: ContentViewer must have a content provider when input is set. at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:266) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1664) at org.eclipse.m2e.editor.pom.DependencyTreePage.loadData(DependencyTreePage.java:195) at org.eclipse.m2e.editor.pom.DependencyTreePage.loadData(DependencyTreePage.java:1033) at org.eclipse.m2e.editor.pom.DependencyTreePage$16.runInUIThread(DependencyTreePage.java:1045) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3586) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3279) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438) at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Created attachment 190562 [details] Check widget disposed status This is a timing issue that the hierarchy page has, it uses a listener for maven change events from builds to trigger updates the viewers, as this all happens asynchronously the user can close the wizard while the jobs are running. The attached patch adds a few simple checks before touching widgets to make sure they aren't disposed. It might not catch every case but I think it should be sufficient.
(In reply to comment #1) > Created attachment 190562 [details] > Check widget disposed status > > This is a timing issue that the hierarchy page has, it uses a listener for > maven change events from builds to trigger updates the viewers, as this all > happens asynchronously the user can close the wizard while the jobs are > running. > > The attached patch adds a few simple checks before touching widgets to make > sure they aren't disposed. It might not catch every case but I think it should > be sufficient. matt, the attached patch only touches the UIIntegrationTestCase class and the commit message says "Fix for broken test". Your comment in the issue leads me to believe you attached the wrong thing here?
Yep, not sure how I lost that change. I've recreated it and pushed it. To test this: 1) Open a POM with a dependency 2) Flip to the dependency hierarchy view 3) quickly in sequence remove the dependency, save and close the editor Prior to the change if step-3 was performed quickly enough asynchronous jobs would touch the disposed viewers. http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=cdf5bfa6cfc385504bc3b1ed9fe31a544cbf7651
verified
Moved to https://github.com/eclipse-m2e/m2e-core/issues/