[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wolf 3d-- bug? -- the culprit?
In article <34EC3DF9.80AE3648@swbell.net>, rubywand@swbell.net wrote:
> This is pretty interesting. Are we talking about situations where
> an application does more than one _SetTSPtr for the same toolset?
>
> Could you explain the bug in more detail and explain the fix?
Here's the situation in detail:
According to Apple IIgs Technical Note #101, applications that patch a
toolbox function using GetTSPtr/SetTSPtr should not remove the patch
themselves; the Tool Locator removes the patch for you when you call
TLShutDown.
Unfortunately, when TLShutDown is called, the Tool Locator is disposing of
the toolset in question (in Wolf 3D's case, the Window Manager) without
marking the toolset as unloaded internally. So it keeps calling Window
Manager functions even though the toolset has been unloaded.
As soon as that memory is overwritten, the system will crash.
This doesn't seem to happen every time, and I don't know the specifics on
when it does happen and exactly how it happens (Nate tracked down the
precise location of the bug), but I take his word for it because I've
stepped through in GSBug and watched things to to hell in the Toolbox. :)
--
--
Sheppy