Path: chuka.playstation.co.uk!news From: "John Wojcik" Newsgroups: scee.yaroze.freetalk.english Subject: Re: [NOISE] Re: I have a problem... Date: Wed, 6 Sep 2000 23:04:47 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 60 Message-ID: <8p6f22$q681@chuka.playstation.co.uk> References: <39B54C37.70610E7E@btinternet.com> <01c01782$948c8bc0$cc9624c3@pal-s-omnibook> <39B5E2CA.E95A0B83@btinternet.com> NNTP-Posting-Host: host213-123-51-186.btinternet.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 hmm... good ol' C. Just when you think you have it under control it springs a surprise on you. I can't see anything glaringly obviously wrong in the code (yet ). Some things you could try. The crashing suggests either a rogue pointer or possibly a bad value being sent to a Yaroze Library routine. One thing I often do in these sort of cases is fall back on good old printf. You say it never gets out of the initgame. I'm assuming this is the first thing your program executes. Try placing printf's along the code before and after each call to the Library routines. Display the contents of any variables you are passing to the functions. Hopefully this should get you to the actual line causing the error. With any luck once located the 'deliberate mistake will be waving its arms right in front of your eyes. At a glance I notice the lines : // initialises the ordering table GsClearOt( 0, 0, &world_ordering_table[output_buffer_index]); GsClearOt( 0, 0, &world_ordering_table[output_buffer_index+1]); does output_buffer_index have the right value ?... I think the compiler/linker ensure all variables are initialized but I always insist on explicitly initialising them myself. Stick a printf before this code and display the value of this var. Other than that.. I cant suggest anything else. ermmm... hold on... maybe you could try adding the parms ( trying to remember the command ) -Xlinker Map -Xlinker mapfile to your linker parms in the makefile. This will create a file ( called mapfile ) containing a breakdown of where the linker has placed your routines / globals in memory. You can check that the min / max memory doesnt conflict with any other loaded data. OK.. thats just about all the things I can think of to suggest for now. It may be of some help.. or it may not.. Good luck Let us know either way how it goes... if you still got probs Im sure someone here can help locate it ahhhh... the joys of C.. dont you just love it John ( QuietBloke ) Chris Wallace wrote in message news:39B5E2CA.E95A0B83@btinternet.com... > > Well,changing most things it doesn't like. I thought it was a memory problem > at one point cos it only did it when adding large arrays (more) but it does > it with quite a few things. Here is the code with initgame() in and the file > with a list of all the definitions of my OT and stuff... > Chris. > > >