ADC Home > Reference Library > Technical Q&As > Legacy Documents > Tools >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Crashes on Quit in MPW 3.4a7


Q: In MPW Shell 3.4a7, in a routine disposeGlobals called during Quit, a disposePtr call is made on a locked handle. This sometimes causes crashes on Quit.

A: This is fixed in MPW Shell 3.4b2. The crashes occurred because the memory for the environment globals was allocated using NewHandleClear, then LockHHi'd, and then the handle was de-referenced and stored as the pointer to the block. At termination time, this pointer was picked up by disposeGlobals and passed to DisposePtr. Since this particular address is already a de-referenced handle, it can cause the crash you experienced.

In MPW Shell 3.4b2, the pointer to the environment globals is the argument to a RecoverHandle call (to retrieve the real handle for the block of memory), which is then passed to DisposeHandle.

[Jun 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.