Memory leaks
As reported by Jörg, using the following steps (and without assigning additional memory), the heap space runs out of memory:
However, now, when I try to complete the whole demo, I run into a OutOfMemoryError (see below). Here is the way to consistently reproduce the error:
- Run TouchCORE, load FCBank_ready_for_demo
- Open GUI feature, reuse “Observer” (select push), use “mapping view” to map Subject to Account, modify to withdraw, Observer to AccountWindow, update to refreshWindow
- Save GUI, go back to concern
- Open Transfer feature, reuse “Security/Authentication”, select AccessBlocking, AutoLogout, Password, PasswordExpiry
- Use “mapping view” to map Authenticatable to User, ProtectedClass to AccountManager, ProtectedMethod to Transfer
- Save Transfer, go back to concern
- Reopen Transfer, click WeaveAll
Exception in thread "Animation Thread" java.lang.OutOfMemoryError: Java heap space
I profiled the app using JProfiler and there seem to be many memory leaks. The ones I could identify are the following:
- When closing an aspect scene, only the current view (since it is a child of the scene) is destroyed. However, there are several views (e.g., state views, message view container and any message view that was opened) that are currently not displayed and therefore not destroyed.
- When removing an instantiation, the hidden container and buttons are not destroyed.
- Whenever the feature model changes, it is replotted. Here, all children are removed and new ones created. I.e., a FeatureView is removed and a new one instantiated. However, removing it from the parent does not destroy it.
- In
DisplayConcernScene
a listener is registered for each feature and the feature model. However, when the scene is destroyed, the listener is not removed.
Comments (4)
-
reporter -
reporter - edited description
Adds another memory leak found in instantiations.
-
reporter References #280: Adds proper destruction of hidden mappings container and buttons, which were never destroyed.
→ <<cset 975a881fc60e>>
-
During the demo session at Modellierung 2016, I ran TouchCORE over a long time, and only ran out of memory approximately every 45 minutes. Of course this is still not perfect, but already a lot better than it used to be :)
- Log in to comment
References #280: Adds destruction of all views when the aspect scene is destroyed.
→ <<cset 8df36ab5bade>>