Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354158 - [Table] "Widget is disposed" when closing UML model editor
Summary: [Table] "Widget is disposed" when closing UML model editor
Status: ASSIGNED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EMF-Facet (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: Nicolas Bros CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 355218
Blocks:
  Show dependency tree
 
Reported: 2011-08-08 11:53 EDT by Nicolas Bros CLA
Modified: 2020-05-01 11:26 EDT (History)
2 users (show)

See Also:
gdupe: indigo+
gdupe: iplog+


Attachments
stacktraces (10.14 KB, text/plain)
2011-08-08 11:53 EDT, Nicolas Bros CLA
gdupe: iplog-
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bros CLA 2011-08-08 11:53:06 EDT
Created attachment 201089 [details]
stacktraces

- Open a UML model with the UML editor
- Select a Class and do "Edit in a table editor"
- Close the UML editor

This results in a "Widget is disposed" exception from SWT, a broken table editor, and other exceptions when you click on other views or editors in Eclipse (because of a NPE in NatTableWidget#usesTmpResource).

See attached stacktraces.
Comment 1 Nicolas Bros CLA 2011-08-19 09:29:42 EDT
The problem comes from the UMLEditor : when it is closed, it doesn't remove its listener on its CommandStack, which is shared with the NatTableWidget.
Then, when the NatTableWidget tries to execute a command on this CommandStack, the UMLEditor is notified and tries to update itself while disposed.
Comment 2 Nicolas Bros CLA 2011-08-25 05:30:22 EDT
I tested on my laptop today and I couldn't reproduce the bug. I'm wondering whether this could be a race-condition, or maybe another commit fixed this bug too.

I will test again on my main PC with the latest version.
Comment 3 Nicolas Bros CLA 2011-09-07 09:51:29 EDT
(In reply to comment #2)
> I will test again on my main PC with the latest version.

I have tested again, and the issue is still happening.

I have added a "known problems" section in the documentation with a workaround for this issue.
Comment 4 Nicolas Bros CLA 2011-10-03 10:40:13 EDT
Note: the issue also happened in EMF Facet unit tests. I had to modify the tests so that they close the table editor/view before the UML editor.