Community
Participate
Working Groups
build 0506-0200 linux-gtk Not sure if its related to bug 56816 or bug 58042. Stack traces are a little different. I upgraded my dev to this build and started. I shutdown and got an error saying that there were problems storing the workbench state. (nothing in the console or log) I rebooted my machine. On the next startup I got the following stack trace in the console and all my perspectives and customizations were reset. Will attach log file.
Created attachment 10446 [details] log file
This doesn't seem to be a duplicate.
It seems that the presentation's control is being disposed prior to StackPresentation.dispose() being called. This will cause all sorts of unpleasant leaks. I added some Assert statements to check for this case, and discovered that it is happening all over the place (suddenly, many of the test suites started failing). This is probably causing all sorts of seemingly unrelated problems (widget disposed errors, NPEs, etc.) due to callbacks getting sent to disposed presentation objects. Increasing severity and priority.
CC'ing Nick.
Created attachment 10468 [details] Additional assertions for premature disposals This patch adds assertions for premature disposal of presentation widgets. This causes a whole slew of test failures.
Looks like this isn't as severe as I feared. It seems that EditorSashContainer is simply maintaining two independent lists of children and they're losing synch. This means the problem only applies to Editors. (Nick, thanks for all your help on this one.)
This appears to be a bug in our error handling code. It should only happen if something else throws an exception during startup... it is still important, but can be deferred until after M9.
This bug might be a duplicate of bug 61585 (or vice versa). The stack traces are similar. We do not have reproducible steps, but as you pointed out, it does look like an error handling issue.
*** Bug 61585 has been marked as a duplicate of this bug. ***
Here's the stack trace: at org.eclipse.ui.internal.presentations.BasicStackPresentation.layout(BasicStackPresentation.java:616) at org.eclipse.ui.internal.presentations.BasicStackPresentation.setControlSize(BasicStackPresentation.java:650) at org.eclipse.ui.internal.presentations.BasicStackPresentation.selectPart(BasicStackPresentation.java:798) at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:666) at org.eclipse.ui.internal.PartStack.setSelection(PartStack.java:649) at org.eclipse.ui.internal.EditorWorkbook.setSelection(EditorWorkbook.java:131) at org.eclipse.ui.internal.PartStack.updateContainerVisibleTab(PartStack.java:768) at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:272) at org.eclipse.ui.internal.EditorWorkbook.createControl(EditorWorkbook.java:122) at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:392) at org.eclipse.ui.internal.EditorArea.createControl(EditorArea.java:344) at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:392) at org.eclipse.ui.internal.PerspectivePresentation.activate(PerspectivePresentation.java:156) at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:641) at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:1983) at org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:1879) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:84) at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:1866) at org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1435) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1206) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1173) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1084) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:604) at org.eclipse.core.runtime.Platform.run(Platform.java:545) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1017) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:167) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:648) at org.eclipse.ui.internal.Workbench.init(Workbench.java:807) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1301)
Reading my own comments above, it's not clear what the problem is. Here's more info for the curious: 1. Presentation objects are currently not able to deal with their widgets being disposed before their public dispose() method is called. They will leak listeners if this happens, and those listeners will throw exceptions. 2. EditorStack is never being disposed (due to comment 6), so the presentation's dispose() method never gets called. The easiest way to reproduce this leak is if an exception is thrown on shutdown and WorkbenchWindow.hardClose needs to destroy its widgets in its finally block, without running the nornmal cleanup code.
Okay... issue 1 has been fixed in head. Issue 2 is a duplicate of bug 59571. Therefore, the NPE should no longer occur but there is still a resource leak. Note: I never figured out how to reproduce this through the UI, but if you programatically dispose a composite that contains a DefaultPartPresentation, everything gets cleaned up correctly.
Note: you can test that the new disposal code is running by running the test suites and putting a conditional breakpoint inside DefaultPartPresentation.widgetDisposed that only triggers when this instanceof DefaultEditorPresentation. Due to bug 59571, the test suites will always dispose the editor presentation by blowing away its widgets. It should be possible to verify: 1. DefaultPartPresentation.dispose() is not on the stack (this is not correct behavior, but it is the case that would have caused problems) 2. All the listeners are being removed 3. No exceptions are thrown
*** Bug 65867 has been marked as a duplicate of this bug. ***