When the software code being executed can no longer operate, the result is code crash. The crashed code can belong to a standalone application or a routine operating system service or operation. Code crash can occur for a number of reasons, but is mostly a result of:
Incorrect memory addressing
Accessing unauthorized system resources
Accessing unallocated memory space
Some applications continue to operate even after the codes crash, but most are closed by the operating system. At that point, a dialog box informs the user of the problem, and suggests investigation or debugging.