Bug 484912 - Reproducable UI Freeze when editing via Properties view
Summary: Reproducable UI Freeze when editing via Properties view
Status: NEW
Alias: None
Product: EMF
Classification: Modeling
Component: Edit (show other bugs)
Version: 4.5   Edit
Hardware: Macintosh Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 467436 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-12-26 11:56 EST by Jon Passki CLA
Modified: 2016-04-08 14:17 EDT (History)
1 user (show)

See Also:


Attachments
ZIP containing thread dumps, system information, and screenshot (305.21 KB, application/zip)
2015-12-26 11:56 EST, Jon Passki CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Passki CLA 2015-12-26 11:56:50 EST
Created attachment 258908 [details]
ZIP containing thread dumps, system information, and screenshot

On separate occasions I have observed the UI freezing on Mars.1 when editing an EMF instance via the Properties view. The first was going through a Vogella EMF tutorial [0] around section 5.4. The second was going through the Xcore tutorial [1] in the 'Creating a Dynamic Instance' section towards the end. In both cases, I was interacting with the Properties view editor. I've had to force quit Eclipse in both occasions.

During the Xcore tutorial I can have the UI reliably freeze. While the UI temporarily locked up when editing an Author instance, the UI fully freezes when editing the Copyright field of a Book instance. There are thread dumps in both cases via jvisualvm: book_threaddump.txt and author_threaddump.txt. This is Eclipse Mars.1 running on Java 1.8. System details attached as arguments-system.txt. Also attached is a screen shot of the running threads from jvisualvm. These are all attached as a ZIP. Please let me know what other information I can provide to help troubleshoot this issue.

I'm a novice Eclipse developer. I've marked this issue as 'major' since I plan on using the Properties editors. If there are other workarounds to modify EMF instances (maybe ESON assuming I'm using Xcore?) then I'll try those out. However, it seems the Properties editor shouldn't cause such deadlocks.

[0] http://www.vogella.com/tutorials/EclipseEMF/article.html
[1] https://wiki.eclipse.org/Xcore
Comment 1 Jon Passki CLA 2015-12-27 00:35:04 EST
Reseting priority back to 'normal' since I'm unsure on how much it matters right now. I'm interested in learning how to troubleshoot the issue further, however.
Comment 2 Ed Merks CLA 2015-12-27 01:10:53 EST
The Xcore aspects sounds like a duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=467436.  The problem here is that loading and editing a dynamic instance involves loading the Xcore model itself, and that in turn loads a huge number of resources to represent classes on the classpath.  This gigantic resource set is just very slow to edit, but is not representative of the behavior  you'd see in your own generated editor.  The tutorial you followed should not lead to such problems, but I don't see any thread dumps which seem related to that.   The one stack dump has no EMF things in it, but a bunch of threads doing RMI things and the main thread handling a mouse down event on a tree in some native code.  I'm not sure what to make of that.  The other dump looks like a reflective editor busy visiting all children of the tree in the UI thread; that's definitely slow for an Xcore dynamic instance as in https://bugs.eclipse.org/bugs/show_bug.cgi?id=467436.
Comment 3 Ed Merks CLA 2015-12-27 01:13:47 EST
If you find that for your own model's generated editor you have lock ups and long freezes, I'll be interested to help with that.  Note that EMF can generate an editor that does live validation and it does that in a background thread, that helps offload the loading of a large resource set to the background thread, assuming the resource set might be large, which for typical use cases, is not the case...
Comment 4 Jon Passki CLA 2015-12-27 01:39:00 EST
(In reply to Ed Merks from comment #2)
> The Xcore aspects sounds like a duplicate of
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=467436.  The problem here is
> that loading and editing a dynamic instance involves loading the Xcore model
> itself, and that in turn loads a huge number of resources to represent
> classes on the classpath.  This gigantic resource set is just very slow to
> edit, but is not representative of the behavior  you'd see in your own
> generated editor.  The tutorial you followed should not lead to such
> problems, but I don't see any thread dumps which seem related to that.   The
> one stack dump has no EMF things in it, but a bunch of threads doing RMI
> things and the main thread handling a mouse down event on a tree in some
> native code.  I'm not sure what to make of that.  The other dump looks like
> a reflective editor busy visiting all children of the tree in the UI thread;
> that's definitely slow for an Xcore dynamic instance as in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=467436.

Agree, seems similar. Is there enough information to consider this a duplicate?

(In reply to Ed Merks from comment #3)
> If you find that for your own model's generated editor you have lock ups and
> long freezes, I'll be interested to help with that.  Note that EMF can
> generate an editor that does live validation and it does that in a
> background thread, that helps offload the loading of a large resource set to
> the background thread, assuming the resource set might be large, which for
> typical use cases, is not the case...

Will keep that in mind, thanks.
Comment 5 Ed Merks CLA 2016-04-08 14:17:01 EDT
*** Bug 467436 has been marked as a duplicate of this bug. ***