Sporadic crashes are always tough. We finally traced ours using heap dumps and MAT.
Steps:
- Enable
-XX:+HeapDumpOnOutOfMemoryError
- Analyze dump using Eclipse MAT
- Identify retained sets and suspect dominatorsMAT helped visualize object retention trees, revealing a listener registration leak.
It’s like archaeology — but with memory graphs.