| Summary: | NPE in org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.showStack | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||
| Component: | UI | Assignee: | Hilger Steenblock <hilger.steenblock> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | emoffatt, grant_gayed, hilger.steenblock, Lars.Vogel, remy.suen | ||||
| Version: | 4.8 | ||||||
| Target Milestone: | 4.8 M7 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: |
https://git.eclipse.org/r/120848 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8cf4db4cfa44d355abb32d41e41216d18083adfb |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Olivier Thomann
Olivier, is this something that works 'most of the time' but failed in this case? I'm just trying to get a handle on how hard this would be to repro... Making major since it hoses the workbench... I've just seen this NPE on XP. I don't have a reproducible set of steps either, but my immediate action that repeatedly caused the exception was File > Close All. There were three java editors open at the time, and I had just launched e4, so the editors were open as a consequence of having been left open in the previous session. To clarify, I saw the same NPE, not the SWTException, so the context was probably different from Olivier's. I'm using e4 M5. I got a NPE in TrimStack at line 1120 (and I'm not sure if I had to file a new entry or add it here).
How to reproduce:
1. Starting point is the E4 application com.example.e4.rcp.todo from Lars Vogels e4 training course.
2. Minimize a part like the Details part.
3. Open the Details part in the "overlay mode" (don't know how to call it, please see the attached screenshot for details).
4. Close the application.
5. -> NPE
java.lang.NullPointerException
at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack.showStack(TrimStack.java:1120)
at org.eclipse.e4.ui.workbench.addons.minmax.TrimStack$10.widgetDisposed(TrimStack.java:618)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:124)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
I propose to add a null check in line 916
public void showStack(boolean show) {
Control ctrl = (Control) minimizedElement.getWidget();
if (ctrl==null){
return;
}
Created attachment 273475 [details]
How to reproduce the error
New Gerrit change created: https://git.eclipse.org/r/120848 Gerrit change https://git.eclipse.org/r/120848 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8cf4db4cfa44d355abb32d41e41216d18083adfb Thanks, Hilger for the contribution and Mickael for the review. |