| Summary: | UI test failures, NPE in UIEventPublisher.notifyChanged | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Paul Webster <pwebster> | ||||
| Component: | UI | Assignee: | Paul Webster <pwebster> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, ob1.eclipse, remy.suen | ||||
| Version: | 4.1 | ||||||
| Target Milestone: | 4.2 M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Paul Webster
This may be the result of the testing setup (running the tests through VNC)... The tests are currently green on my system, if others see failures then please ping here. Works for me on WinXP too. This occurs in the nightly tests, however ... maybe linux event ordering problem. http://build.eclipse.org/eclipse/e4/build/e4/downloads/drops/4.0.0/I20100617-1536/I20100617-1536/results/html/org.eclipse.e4.ui.tests_linux.gtk.ppc.html PW UI Model Event: org/eclipse/e4/ui/model/ui/ElementContainer/selectedElement/SET args: {OldValue=org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl@1ec21ec2 (elementId: null, tags: []) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null) (label: null, iconURI: null, tooltip: null, context: Anonymous Context, variables: [], bindingContexts: [], x: 0, y: 0, width: 11, height: 30), AttName=selectedElement, EventType=SET, NewValue=org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl@62f062f0 (elementId: null, tags: []) (widget: Shell {}, renderer: org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer@7e607e60, toBeRendered: true, onTop: false, visible: true, containerData: null) (label: null, iconURI: null, tooltip: null, context: Anonymous Context, variables: [], bindingContexts: [], x: 0, y: 0, width: 11, height: 30), Widget=null, ChangedElement=org.eclipse.e4.ui.model.application.impl.ApplicationImpl@1ea01ea0 (elementId: null, tags: null) (widget: null, renderer: null, toBeRendered: true, onTop: false, visible: true, containerData: null) (context: Anonymous Context, variables: null, bindingContexts: [])}
Seems to be caused by a event broker that's left around, listening on a window after the window has been disposed.
PW
OK, I see open on one shell causing an SWT.Activate on another shell. This causes the WBWRenderer inner class to call application.setSelectedElement(window) on a previously used application. The adapter for that application causes the old UIEventPublisher to try and fire the event, but since the app context was disposed it can't find the event broker and NPEs. This could be a test cleanup problem where the previous Shell is not being disposed, although why the current shell.open() should activate a different shell is not clear to me. PW at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:2044) at org.eclipse.swt.widgets.Shell.open(Shell.java:1457) at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer.postProcess(WBWRenderer.java:539) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:494) triggers at org.eclipse.e4.ui.workbench.renderers.swt.WBWRenderer$9.handleEvent(WBWRenderer.java:430) which is pointing at the previous application model. PW *** Bug 325118 has been marked as a duplicate of this bug. *** *** Bug 326080 has been marked as a duplicate of this bug. *** Created attachment 206144 [details]
remove the UI publisher as a listener
Paul, I noticed you pushed a change to master. Can this bug be closed? http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=88425a5ffdbdc6eeb6825bf5daa85965540278b4 Yes, we've accepted this fix for the tests. We'll need to observe our next test output. PW |