Trying to figure out why VisualVM can't snapshot. Procedure:
- Profiler -> Memory settings -> Record allocations stack traces
- Profiler -> Profile -> Memory
- Profiler -> Snapshot
It gives an error Failed to obtain results snapshot. The profiled application terminated Failed to obtain results snapshot. The profiled application terminated
Code
import java.util.ArrayList; import java.util.List; import java.util.Random; public class Main { public static void main(String[] args) { List<Integer> arrayList = new ArrayList<Integer>(); Random random = new Random(System.nanoTime()); try { while (true) { Thread.sleep(100); arrayList.add(random.nextInt()); } } catch (Exception ignored) { } } } And a link to a huge log that does not fit here https://mega.nz/#!4FAzUJLL!7TsC1wgh0g9Vw4wMfh8QlgMGfLLP8s_J2-zMDU_3s0E
The second day I try to find out what the problem is. Help me please.