4225_5257@uwovax.uwo.ca (04/21/89)
I have what I hope isn't an impossible question. I have written a fairly simple program (with Charlie Gibbs' A68K assembler) that opens a custom screen with a backdrop borderless window with a menu attached to it. That part of it works fine. Then I open a window in the foreground. It is opened with nw_Flags set to WINDOWDRAG!GIMMEZEROZERO!SUPER_BITMAP. It has borders and a drag bar. That also works fine. Then I revised the program to include a bitmap in this window. I pointed the foreground window's nw_BitMap ptr. to my bitmap structure, and when I run the program, it shows up in the window just like it's supposed to. The problem occurs when I exit the program. Until I added the bitmap, everything worked fine. Now, upon exit, GOMF gives the error as being "location $24 (Hex) corrupted with value $400." This seems to happen as or after all windows/screen/libraries are closed. The program doesn't have any memory leaks, and it returns }ito the CLI{_ quite nicely (except for the error just mentioned{_). Am I doing something wrong regarding the bitmap? It seems to be the source of the problem since the program always worked fine before. Should I be calling some sort of system routine before closing the foreground window? Here's the basic outline of the program: Open custom screen, open backdrop window. Open foreground window (bitmap shows up). Attach menu strip to bachrdrop window. _LVOWaitPort() at the backdrop window's user port. If user selected QUIT menu option, exit loop. Else loop around to waitport. (all messages are replied to properly). Clear menu strip from backdrop window. Close foreground window. Close backdrop window. Close custom screen. Close Graphics, Intuition, Exec libs. ^--------by calling Exit() I'm pretty new at fiddling with Intuition routines. Thanks, ...Steve van der Burg
jesup@cbmvax.UUCP (Randell Jesup) (04/27/89)
In article <2105@uwovax.uwo.ca> 4225_5257@uwovax.uwo.ca writes: > Close Graphics, Intuition, Exec libs. > ^--------by calling Exit() Not a good idea. Exit() is mainly for BCPL programs, and doesn't do much cleanup or library closing (at all). There is no resource tracking of that sort. All Exit() effectively does is pop your stack back to the original position and then RTS back to the code that called you. -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup