-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible memory leak: instances not released from memory after closing #57
Comments
This is most likely a memory leak in TornadoFX. |
I'm using TornadoFx version: 1.7.20 I agree it might have something to do with how I'm switching between views, or possibly something to do with the TornadoFX EventBus. Here's a simplified version of what i'm working on, with the same menu structure and a few drag and drop examples: https://github.com/xcporter/memtest It's just graphics, so hopefully that can rule out anything coming from the http client. In this smaller version, things started acting weird once I had two instances open at once. Then, when I closed one of the instances, several "scala-execution-context-global" threads opened. When I closed the last instance, some threads finally closed, except for one of the scala threads from the first closing. |
1.) 2.) 3.) Edit: I'm sure the issue is not related to JPro or the threads created by scala and the web framework |
Thank you for the marvelous tools! An objective memory test is exactly what I've been looking for... I'm closing since it's definitely an issue with the UI that doesn't show up unless it's cohabiting a jvm with other instances. That and the EventBus is definitely misconfigured. I've set up JMemoryBuddy and TestFX, following the setup from SpaceFX loosely, and translating to Kotlin on the way. I have yet to get a result on any tests other than "uncollectable"--am I using this correctly? The SpaceFX example had a function called workaround that added and removed a blank stage, so perhaps I'll try that route.
|
related: edvin/tornadofx#1251 |
To comment on your JMemoryBuddy-test. The workaround function in SpaceFX is a workaround a bug in JavaFX: openjdk/jfx#153 |
Java version : 13.0.1
JavaFX version : 11.0.2+1
JPro version : 2019.2.2
I'm building a tornadoFX/javaFX app, which is served via jpro. I've been chasing this memory leak for a few weeks now, and after closing a few thread leaks that were my fault, I'm fairly certain it has to do with the way the app is served. I'm noticing that the largest objects tend to be NIO HeapByteBuffers referenced to javafx eventually.
Here's the code I'm using to launch the app and set up scope:
Is there something more I should be doing to release these instances from memory when the window closes? Or perhaps I'm missing something in the jvm args?
Here's a heap profile, letting it idle for a few cycles, starting a new window, waiting then logging in. Max activity was two concurrent users. After closing all windows and opening one more, the amount the GC clears was reduced by about 20mB, the same occurs every time a new instance is opened.
The text was updated successfully, but these errors were encountered: