Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: daverh@ix.netcom.com (David Hathaway) Newsgroups: scea.yaroze.programming.2d_graphics Subject: Re: Help! Lockup on load. Date: Tue, 26 Aug 1997 21:30:55 GMT Organization: SCEA News Server Lines: 54 Message-ID: <5tvho3$pn83@scea> References: <5tsgpp$m6f2@scea> NNTP-Posting-Host: pas-ca10-23.ix.netcom.com X-Newsreader: Forte Free Agent 1.0.82 daverh@ix.netcom.com (David Hathaway) wrote: >HELP!!! I have the following code in my program: > enum > { > SPRITE1, > SPRITE2, > SPRITE3, > SPRITE4, > SPRITE5, > SPRITE6, > SPRITE7, > SPRITE8, > //SPRITE9, > NUMBER_OF_SPRITES > }; > unsigned long TIM_ADDRESS[NUMBER_OF_SPRITES]; >Everything works fine UNTIL I uncomment SPRITE9, then the program no >longer loads. It downloads to the Yaroze but never starts up. I have >a printf as the first line of code in my program, but it never shows >up on my PC: > printf("Starting program.\n"); >Anyone have any ideas? This is a very strange bug. I've been trying >to debug it, but I can't seem to get the debugger working either >(packet errors). >Thanks, > Dave >p.s. I also tried using #DEFINEs instead of enums and got the same >results. I figured it out myself. When I added more members to the array, the compiler/linker was putting the array in a section called COMMON (I got this info from the mapfile) and then the system (Yaroze) would hang when I down loaded the program into it. Before, the array wasn't in the map file at all. I don't know why it's not, but it works. I fixed the problem by simply making the array static. Strange bug but the 'fix' works. Dave