Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Alert problems Message-ID: <7577@hoptoad.uucp> Date: 7 Jun 89 18:34:33 GMT References: <18282@unix.cis.pittsburgh.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Distribution: usa Organization: Eclectic Software, San Francisco Lines: 20 I can't really diagnose your problem here. However, I felt I should mention that learning at least the basics of MacsBug (or TMON) is critical to Mac programming. If you install MacsBug, then you will be able to see where in your code the address error occurs. I assume that Lightspeed Pascal puts out the neccessary end-of-function symbols that will allow you to interpret your code. And as Rich points out, an address error is an attempt to use an odd pointer to access a two or four byte value. Free memory doesn't come into it. Nor should it matter whether or not you pass NIL to wStorage in a GetNewWindow call -- that is just "the straw that breaks the camel's back". Somewhere else in your code, you are corrupting the application heap, most likely, and that is why GetNewWindow fails if it has to allocate the storage itself (that is, if you pass wStorage = NIL). There are a number of commands, notably ATHC, in MacsBug that will help you determine where the corruption happens. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Mere opinion without supporting argument is no more than the American Bandstand school of literary evaluation." -- Tom Maddox