Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Representation creation on initialization crashes Eclipse(Sirius Representation Initialization Crash)
Representation creation on initialization crashes Eclipse [message #1814533] Thu, 12 September 2019 18:59 Go to next message
Steve Hickman is currently offline Steve HickmanFriend
Messages: 17
Registered: August 2017
Junior Member
I have defined a lot of different Sirius representations for different parts of an XText model. I am converting several thousand database records into 50+ Xtext models and then importing the models into a project all at the same time. If the Sirius representations have the 'Initialization' box checked, Sirius will try to create all the representations for those models when I first add the modeling project to my workspace. When this happens:
1) I cannot do anything with Eclipse until Sirius finishes. I would prefer that the representations be created in the background at a lower priority than the foreground task so that I can continue to use Eclipse while I wait.
2) If I have enough data, I get this error:
org.eclipse.swt.SWTError: No more handles

I think this error means that Windows ran out of process handles attempting to run parallel threads creating everything. Whatever the error was exactly, it forced me to reboot to clean up the mess.

I don't want to manually create all the representations. Instead I would like them to be automatically generated. However, I must make sure that Eclipse doesn't crash. And I would prefer to not wait 15 minutes before I can use Eclipse again.

Is there a way to
A) lower the priority of representation creation?
B) insure that representation creation does not attempt to use so many resources that it crashes Eclipse?

[Updated on: Thu, 12 September 2019 19:21]

Report message to a moderator

Re: Representation creation on initialization crashes Eclipse [message #1814565 is a reply to message #1814533] Fri, 13 September 2019 10:09 Go to previous message
Axel RICHARD is currently offline Axel RICHARDFriend
Messages: 36
Registered: September 2010
Location: France
Member
Hello Steve,

The "Initialization" checkbox could indeed lead to bad performances, it is a known problem (detailed in the Sirius documentation https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html#diagram_description):

" If Initialization is set, then when the viewpoint which contains this diagram description is enabled, instances of this diagram description will be automatically created on all compatible semantic elements. If Show on startup is set, then when a modeling project is opened which contains instances of this diagram description, they will be opened: if only one such representation exist, it will be opened automatically; if there are more than one, a dialog box will appear to allow the user to select which one(s) to open. WARNING: Then Initialization flag can have a negative impact on performance: if it is set on a given diagram, then when the user enables the viewpoint which defines this diagram Sirius will attempt to find all possible elements in the semantic model on which it may be possible to create such a diagram. This can take a long time on big semantic models. "

You can try to increase the Xmx option of your Eclipse environment (https://developer.ibm.com/answers/questions/378241/what-is-the-cause-of-the-orgeclipseswtswterror-no/).
To dot that, open your eclipse.ini file and edit "-Xmx512m" to a larger number like "-Xmx4096m".
If it still doesn't work, may be the best option in your case would be to uncheck this "Initialization" option and to develop a java program that will create all diagrams programmatically using Eclipse and Sirius APIs.

Best regards,

Axel


Axel Richard
Obeo
Previous Topic:[ObeoDesigner] NodeCreation problem for elements that are contained inside other
Next Topic:Sirius's automatic generation of code from UML diagrams
Goto Forum:
  


Current Time: Fri Nov 15 05:32:53 GMT 2019

Powered by FUDForum. Page generated in 0.02072 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top