Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!samsung!caen!kuhub.cc.ukans.edu!markv From: markv@kuhub.cc.ukans.edu Newsgroups: comp.sys.amiga.programmer Subject: Re: Refresh GList hang... Message-ID: <28392.27aedb37@kuhub.cc.ukans.edu> Date: 5 Feb 91 22:20:07 GMT References: Organization: University of Kansas Academic Computing Services Lines: 31 In article , halcyon!elf@sumax.seattleu.edu (Elf Sternberg) writes: > I've been trying to get this damn program to run for two days > now. It's the first one I've written using AddGList (or AddGadget, I've > tried both) and yet every time I get to RefreshGList (or RefreshGadgets) > the system hangs. Once, I was about to get a SYSTEM_REQUEST but the > system froze before the text could be printed. > Has anyone else had this problem? I've only got three active > gadgets on the screen, anyway. I had a similar problem, but intermittant. Make DARN SURE all your linked elements end with a foo->NextXXX = NULL; Sometimes you get lucky and the the pointer will point a 0ed memory before things get completely hosed, but... And it can take some work. I personally always used AllocMem(foo, foo | MEMF_CLEAR); or calloc() (I even do a #define malloc(x) calloc(x,1)) to get a cleared block so I am okay if I miss one. In general, esp. with Intuition stuff, look for problems in linkage (bad pointer, etc) and bounds errors (like Text() rendering past the edge of a bitmap, or bad gadget loc/size) if you get serious problems that totally hose your system (My last problem once killed Kickstart on our 3000!). -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark Gooderum Only... \ Good Cheer !!! Academic Computing Services /// \___________________________ University of Kansas /// /| __ _ Bix: mgooderum \\\ /// /__| |\/| | | _ /_\ makes it Bitnet: MARKV@UKANVAX \/\/ / | | | | |__| / \ possible... Internet: markv@kuhub.cc.ukans.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~