There are several criteria. In general, unhandled exceptions are the top killer. There are other errors, but they get pretty technical.
Two, an application becomes unresponsive if messages dispatched to it are not retrieved. Windows attaches a timer to messages to each application. If it is not handled, then that's when you get the unresponsive message.
Three, applications can also explicitly tell Windows to kill the application process give certain non fatal errors. Often this is to prevent data corruption.
Which program is it that hangs?
Aparently, there is a way to turn this off. By coincidence, I was reading the perfmon team blog and ran into this article. It give steps to explicitly turn off "ghosting" for an application. I'll cut and paste the steps also.
To download the Application Compatibility Toolkit, visit the following
Microsoft Web site:
To create a custom Application Compatibility database:
Install and run the Compatibility Administrator Tool.
Right-click Custom Database, and then click New.
Right-click the new database, and then click Rename.
Type noghost as the name of the database. (You can name this
whatever you want.)
Right-click New Database, click Create New, and then click
Application Fix. Type the name of the program to be fixed.
Type the name of the program manufacturer.
Locate and then select the appropriate program (.exe) file.
In the Compatibility Modes window, click None, and then click Next.
In the Compatibility Fixes list, click NoGhost.
Click either Test Run or Finish. Clicking Test Run starts the
program with the application compatibility setting. Clicking Finish
adds the compatibility fix to your database.
On the File menu, click Save to save the database. Or, copy the
database to the C:\Windows\AppPatch folder.
Right-click the database, and then click Install. Or, run the
sdbinst c:\windows\apppatch\noghost.sdb -q command to install the
I verified the steps myself. . .