consp21@bingvaxu.cc.binghamton.edu (Ken Hoover) (09/01/90)
I have a little program in THINK 3.0 that gives me the "out of memory" error when I run it. This is in THINK Pascal 3.0, but it does the same thing under 2.03: program bombs; const theItemNumber = 259; { yes, there is a DLOG with this ID in the .rsrc file } var theDialog : DialogPtr; itemhit : integer; begin theDialog := getNewDialog (theItemNumber, nil, pointer (-1)); modalDialog (nil, itemhit); disposDialog (theDialog); end. This program crashes on the call to modalDialog with an "out of memory" error if I'm in THINK pascal, and with a system error 01 if I run it as a standalone app. The same program _works_ if I specify a different resource file and resource ID. Is the resource file corrupted in some way? (ResEdit shows everything as being Kosher). I also checked to make sure the resource was found correctly by putting a GetResource call before the GetNewDialog call to make sure that it was actually finding the resource with that ID number. It came back non-NIL, so I assume that it is finding and allocating memory for the resource. Other DLOGs from that file appear to load fine. What's going on here? I'm using a IIx, color, 4m RAM. Removing all INITs doesn't change anything. E-mail responses would be appreciated. - Ken -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ken Hoover - Research Programmer | "In the East there is a great tree- consp21@bingvaxu.cc.binghamton.edu | structure that men call 'Corporate Disclaimer : I claim dis... | Headquarters'..." dat is yours. | - The Tao of Programming - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -