🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #231

Re: Please Help - Error 202: Stack overflow error.

#231
From: Mike Copeland
Date: Thu, 02 Sep 1999 00:00
31 lines
2945 bytes
   Not necessarily the cause of a Stack Overflow error, IMO.  It's much 
more likely to be one of the following:
  1. Declaring large local structures (or many) in a subprogram that's 
called - nesting with other subprograms using significant amount of local 
variables...or not.  The issue is that at any given time during the 
program's execution, the _total_amount_ of Stack used cannot exceed the 
limits stated in the $M directive (which has a maximum of 64K bytes).
  2. Extreme nesting of procedures which use together use some local 
variables, so that the total exceeds the Stack limit.  This typically 
involves very convoluted structure/logic, something which might have 
evolved over a long time.  Could be very hard to track down...
  3. One of more recursive procedures which (1) recurse very deeply (due 
to data vagaries) and/or (2) which use a significant amount of local 
variables (such as strings).

> I'd bet you are defining a variable with the same name as the name of
> the variable you are passing in the procedure 
> is this what you have done?
> 
> procedure duck(goose : string);
> var goose : string;
> > 
> > Please help.  I have been working on this program for years.
> > 
> > I have a problem with Turbo Pascal 7.0.  I keep getting the 202 Stack
> > Overflow error.  I tried changing everything with the memory stack size to
> > maximun in the Option.  I was just wondering whether there is any way
> > around this problem.  I tried setting the stack check off {$S-} but the
> > progam became erratic.
> > 
> > As an aside, if I convert it to Turbo C++, would this still be a problem?
Technical Details
Message-ID: <MPG.1238b902d36f18f49896a0@news>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <Pine.WNT.4.10.9908240220250.-1660149-100000@ppp25.hcl.com> <37CE4F62.E567C6A2@xmission.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10a726,2db1283146a1ffaa
X-Google-Attributes: gid10a726,public
X-Google-Thread: 111659,2db1283146a1ffaa
X-Google-Attributes: gid111659,public
X-Google-Thread: 10eb32,2db1283146a1ffaa
X-Google-Attributes: gid10eb32,public
X-Google-Thread: 10c470,2db1283146a1ffaa
X-Google-Attributes: gid10c470,public
X-Google-Thread: 1006de,2db1283146a1ffaa
X-Google-Attributes: gid1006de,public
X-Google-Thread: 108ebd,2db1283146a1ffaa
X-Google-Attributes: gid108ebd,public
X-Google-Thread: 102601,2db1283146a1ffaa
X-Google-Attributes: gid102601,public
X-Google-Thread: 10263e,2db1283146a1ffaa
X-Google-Attributes: gid10263e,public
From: mrcope@primenet.com (Mike Copeland)
Subject: Re: Please Help - Error 202: Stack overflow error.
Date: 1999/09/02
Message-ID: <MPG.1238b902d36f18f49896a0@news>
X-Deja-AN: 520395504
Sender: news@sundevil.az05.bull.com
X-Nntp-Posting-Host: mcopelandpc.az05.bull.com
References: <Pine.WNT.4.10.9908240220250.-1660149-100000@ppp25.hcl.com> <37CE4F62.E567C6A2@xmission.com>
Organization: Bull
Newsgroups: comp.lang.pascal.borland,de.comp.lang.pascal.misc,maus.lang.tpascal,alt.flame.pascal,it.comp.lang.pascal,ctdl.lang.pascal,fr.comp.lang.pascal,borland.public.turbopascal,comp.lang.pascal.misc