Community
Participate
Working Groups
I get a NPE in PopupMenuExtender#cleanUpContributionCache when running the EMF Facet SWTBot tests on Eclipse 4.2. It didn't happen with Eclipse 3.7. This is maybe linked to a workaround we had to implement for a bug in SWTBot (Bug 261360) that prevents it from reliably simulating clicks in sub-menus. See: https://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/plugins/org.eclipse.emf.facet.util.tests.swtbot/src/org/eclipse/emf/facet/util/tests/swtbot/internal/ContextMenuUtils.java
Created attachment 207532 [details] stacktrace stacktrace : see the "caused by" part
The message associated to the stacktrace is: Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/visible/SET] to handler org.eclipse.e4.ui.services.internal.events.UIEventHandler@6be4cb82 I get a ton of these errors when running our SWTBot tests. To reproduce, you can use this launch configuration: https://dev.eclipse.org/svnroot/modeling/org.eclipse.emft.facet/trunk/tests/org.eclipse.emf.facet.tests/EMFFacet_AllTestsNotInUIThread.launch with all the EMF Facet plug-ins in your workspace This is with: Eclipse SDK Version: 4.1.0 Build id: I20110916-1615
Nicolas, can you try the problem on http://download.eclipse.org/eclipse/downloads/drops4/I20111123-0610/index.php The NPE seems to imply the IEclipseContext for the part that holds this context menu is null. That means it was never rendered, or it has already been disposed by the time this code runs. That's a lot of little dialogs opening on the stack: org.eclipse.emf.facet.widgets.nattable.internal.dialogs.ColumnsToHideDialog.open(ColumnsToHideDialog.java:198) PW
(In reply to comment #3) > Nicolas, can you try the problem on I have tried the EMF Facet build with this platform build, but I am getting errors with org.eclipse.jetty.* bundles that are not found. > The NPE seems to imply the IEclipseContext for the part that holds this context > menu is null. That means it was never rendered, or it has already been > disposed by the time this code runs. This happens when run by SWTBot tests, so it means that lots of views, dialogs and editors are opened and closed very fast. Maybe this triggers a race condition of some sort? > That's a lot of little dialogs opening on the stack I noticed that too in the stacktrace, but I don't know why it's doing that yet. It happens on Hudson, but does not seem to happen when I run the tests locally.
(In reply to comment #4) > I have tried the EMF Facet build with this platform build, but I am getting > errors with org.eclipse.jetty.* bundles that are not found. This is probably caused by the changes to jetty and javax.servlet that are happening in 3.8. > This happens when run by SWTBot tests, so it means that lots of views, dialogs > and editors are opened and closed very fast. Maybe this triggers a race > condition of some sort? The code in question is added in an asyncExec(*), and if the SWT bot is not allowing the events to be processed regularly they could accumulate. We have code like this at checkpoints in our UI tests: while (display.readAndDispatch()) ; I can add some checks the thew asyncExec(*) to validate the context, but if your tests won't even run on 4.2 I don't know how you can confirm that helps. PW
I've released NPE guards for the method in the stack trace: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=f097b46cc771f29fc8abbb29b233745c6e9532ea PW
*** Bug 355161 has been marked as a duplicate of this bug. ***
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.