Prevent program from crashing when showing allocation stack traces
Question Why does VisualVM terminate my program when attempting to view object allocation stack trace, and how do I fix it? I'm cleaning up an application which has a few memory problems, the biggest being creating a bunch of short-lived int[] which causes GC to fire like crazy: When I right click int[] and choose Take Snapshot and Show Allocation Stack Traces , my application closes and a warning box pops up saying Failed to obtain results snapshot. The application terminated : The closest thing I found on the subject was a bug report which recommended running my profiled application with