A crash is an application failure: the app either stops completely or remains running but no longer responds to requests. Crashes often occur only under specific conditions, making reproduction difficult. section 1.2.4
Use the symptom to choose an investigation path:
- For a complete stop, look for unrecoverable errors such as OutOfMemoryError and inspect a heap dump. section 1.2.4
- For an unresponsive app, distinguish a crash from a performance problem; profiling, logging, or a thread dump may be more suitable than a debugger. section 2.3
- Try to reproduce the failure in an environment where you can observe it and confirm a solution. section 1.2.4
Intentional memory crash
A Java program repeatedly adds Product objects containing random String values to a static list. The list keeps growing until heap memory fills and an OutOfMemoryError occurs.
