Community
Participate
Working Groups
We have a combo box on the toolbar for our editor. If I close the workbench with unsaved changes in this editor, the combo box is disposed before its corresponding ActionContributionItem. This problem does not occur when just closing the editor. Our ActionContributionItem tries to refresh the combo (because doSave() causes a change to our command stack), and runs into a Widget Disposed Error in the former case, but not in the latter. Of course, the simple workaround is to check to see if the combo's been disposed before trying to refresh it. But there should be consistency in the procedure of closing an editor. In particular, it seems the bug here is that the combo box is being disposed before the ActionContributionItem.
Can you attach a stack trace showing when your code is hit (in the case of the widget being disposed)?
Pratik is on vacation for the next two weeks. The stack trace contains "myEditor#doSave()". When we save, we reset the dirty marker on our undo stack, which causes a contribution on the toolbar to refresh itself. At that point, its widget is already disposed. This is strange, because editor#doSave() gets called from the close listener of the Shell. My understanding is that the shell is not disposed until after the close listener has been notified and did not set doit=false. If so, the problem is in workbench code somewhere. Sounds like the EditorActionBarContributor's toolbar was disposed.
Could you attach the stack trace, please?
This may be specific to GTK, I couldn't reproduce on M4/win32.
Hmm, I couldn't reproduce it on GTK with 3.2M4 either.
Moving Dougs bugs
Assigning to component owner PW
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.