Bug 495664 - Potential deadlock on representation creation if auto-save is enabled
Summary: Potential deadlock on representation creation if auto-save is enabled
Status: NEW
Alias: None
Product: Sirius
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2016-06-08 05:44 EDT by Pierre-Charles David CLA
Modified: 2016-06-09 05:04 EDT (History)
1 user (show)

See Also:


Attachments
Sample project (2.60 KB, application/zip)
2016-06-08 05:52 EDT, Pierre-Charles David CLA
no flags Details
The JVM stack during the deadlock (23.63 KB, text/plain)
2016-06-08 05:53 EDT, Pierre-Charles David CLA
no flags Details
Screenshot (181.10 KB, image/png)
2016-06-08 05:55 EDT, Pierre-Charles David CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre-Charles David CLA 2016-06-08 05:44:13 EDT
Steps to reproduce, using a Neon-based package (which introduces auto-save via bug #34076):

1. Enable auto-save in the preferences (General > Editors > Auto-save), with a small delay (5s) for easier testing.
2. Create a modeling project with an ecore model and Ecore Tool's 'Design' viewpoint.
3. Create a class diagram on the root package of the ecore, and create a sub-package inside it, say 'P1'. Save.
4. Select the diagram in the model explorer, extract it into a separate aird, for example fragment.aird.
5. Open the ecore using the EMF tree editor, and in the properties view, rename 'P1' into 'P2' in the properties view. DO NOT SAVE THE CHANGE.
6. In the model explorer, select P1 and right click, create reprentation. When the popup asking for the representation title appears, hit enter. A second dialog will appear, asking in which aird to store the new representation. Wait.
7. After 5s, auto-save is triggered in the EMF tree editor => deadlock. No solution except killing the whole Java process.
Comment 1 Pierre-Charles David CLA 2016-06-08 05:52:33 EDT
Created attachment 262302 [details]
Sample project

Sample project corresponding to step 4 above. Import it, open the existing diagram, and go directly to step 5.
Comment 2 Pierre-Charles David CLA 2016-06-08 05:53:31 EDT
Created attachment 262303 [details]
The JVM stack during the deadlock
Comment 3 Pierre-Charles David CLA 2016-06-08 05:55:22 EDT
Created attachment 262304 [details]
Screenshot

Screenshot of how it looks once the deadlock happens. Note that the "OK" button in the "Analysis selection" dialog looks like it would be clickable (the buttons on the other dialogs are disabled), but it does not actually respond to mouse clicks.
Comment 4 Pierre-Charles David CLA 2016-06-08 06:09:52 EDT
See bug #486644 for details about the auto-save behavior in Neon, instead of the original #34076 whose scope was too broad and vague.