www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/24/01:37:25

From: "Roy Taylor" <rtaylor AT nextsteps DOT com>
To: <djgpp AT delorie DOT com>
Subject: Stack, I think...
Date: Mon, 24 May 1999 00:36:01 -0500
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1162
MIME-Version: 1.0
Message-ID: <19990524054358816.AAA172.170@mike-s-toy>
Reply-To: djgpp AT delorie DOT com

I have been making a funky graphics engine which requires the use of
recursive calls.  I may be a little rusty from my old comp sci classes, and
am getting some odd errors.  The basic deal is this:  I send DrawSector a
pointer to the sector to draw, and it draws until it finds a wall that
points to a new sector.  It then calls itself passing the pointer to the
new sector.  One sector works quite well, and when I link two together, it
still works.  So then I rotate the sectors a bit and all of a sudden, the
first recursive call handles a few of the elements of the sector properly
and suddenly goes into fits trying to access random memory.  Needless to
say this crashes...  I have a feeling it is the cause of a stack overflow
of some sort, but I am not sure.  If you have any ideas on how to correct
this they would be greatly appreciated, if not, do you know of a compiler
switch to increase the stack size for functions from within DJGPP,
specifically RHIDE?  Any help any of you could offer would be greatly
appreciated.


                                                                      -Mike
Taylor

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019