1

I am working on a Netbeans Platform module (jMonkeyEngine plugin to be precise) in which I have used a JavaFX to build the UI a JFXPanel in the TopComponent displays the Javafx content. I have created a new Netbeans FileType and the JavaFX UI is used to modify the contents of the DataObject associated with the FileType. Recently my application has started crashing due to Out Of Memory : Permgen Space error and I cannot pinpoint the exact code causing it primarily as the stack trace points to a different thread and line of code each time this happens. I tried increasing my PermGen space to 1 gb using the -XX:MaxPermSize=1g command line switch but it did not fix the issue. So, I profiled my application using Netbeans Profiler to find any memory leaks but I am completely new to analysing the profiler output/heap dumps. As mentioned, each time the error occurs, the stack trace and heap dumps point to a different thread and a different line of code (sometimes the one's I wrote for the plugin and other times those provided via Netbeans Platform API's). The only thing common in all the heap dump analysis is that there is a sudden increase in the difference between the heap size and used heap space in the VM Telemetry graphs and the 'Time Spent in GC' immediately rises to 100% from being 0-3%. Here are some screenshots : screenshot 1, screenshot 2

You can also see that heap size(red region in the leftmost telemetry graph ) rises to max value specified in the -XX:MaxPermSize when the application crashes.

Does this mean that there is a memory leak in the application?? If so, how can I detect it as the source of the error is different each time it occurs??

Here are the command line switched I am using : -J-Xms32m -J-Xmx256m -J-XX:PermSize=512m -J-XX:MaxPermSize=1g -J-XX:MaxDirectMemorySize=2048m.

Maany
  • 23
  • 3

0 Answers0