Riena 5.0.0: No More Handles [message #1269885] |
Wed, 12 March 2014 05:31  |
Eclipse User |
|
|
|
We are experiencing the "No more handles" problem in an SWT Riena application. This is not due to not disposing used Fonts/Colors/Images/etc. (I already tracked resource allocation with Sleak).
The problem could be that Riena seems to instantiate every view and keeps it in memory during the application up time (is that so?). We have some fairly complex masks, and each Composite seems to eat up to 4 handles (after accessing a view, the task-manager shows around 400 more user objects/handles). So after accessing around 2/3 of all views in the application, we run out of handles.
We are using shared views. Is there any way to tell Riena to dispose each view after showing? I know that this will propably result in slower GUI response time, but otherwise our application keeps crashing.
Kind regards,
Frank
|
|
|
|
|
Re: Riena 5.0.0: No More Handles [message #1270802 is a reply to message #1270062] |
Thu, 13 March 2014 10:13   |
Eclipse User |
|
|
|
Hi Frank,
I looked at Riena for Eclipse 4.x and there's still a problem with the view cleanup, so it is not working. I created Bug 430168 for that and we will address it in the near future.
Until the bug is fixed, you can try to work around it:
When a view has to be shown, Riena looks for it in the E4 application model. If the view is not found there, Riena looks up the contribution from the extension registry (plugin.xml) and instantiates the view part. This happens in:
org.eclipse.riena.e4.launcher.part.RienaPartHelper.createPart(ISubModuleNode)
To "clean up" views manually, you can try these steps:
(1) remove the MPart instance from the E4 application model like in org.eclipse.riena.e4.launcher.part.RienaPartHelper.unregisterPart(MPart)
(2) remove the mapping from the ISubModuleNode to the partId by calling subModuleNode.removeContext(RienaPartHelper.KEY_E4_PART_ID)
The next time Riena looks up this view, it should go through the process described above as if this view has never been open. Be very careful with shared views, they're also registered in the ViewInstanceProvider!
For this to work, the RCP view contributions should be in the plugin.xml (the good old Eclipse 3.x way), not in the E4 e4xmi file. In any case, the RienaPartHelper is your friend (bundle org.eclipse.riena.e4.launcher).
I hope this helps!
Cheers,
Jordan
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10368 seconds