We are using AREV in our company's POS system. We
recently re-wrote a bunch of code, making it more
object-oriented, with more function calls to outside
functions. The application runs fine on our development
system, but recently we have been getting a number of
calls from our stores. Several of them are reporting
error messages that appear in the status line that
say 'Program Stack is full.' Near as we can figure,
our function calls are overloading the system program
stack. However, we are in a quandry as how this
can be happening.
Our average platform is 3-5 workstations running
DOS 6.22, with a Netware 3.12 server. The workstations
have approx. 8 MB RAM each, the server's 16 MB.
I spent practically all day today load testing my
system and could not get it to crash, and I only
have 4 MB on a remote-booting network PC.
Is the program stack contigent on the workstation,
the server, or a combination of both?
Any insight would be greatly appreciated.
If I recall correctly there is a maximum of 299
entries allowable in the program stack before the
stack is completely filled. There is a kludgy
patch for this for I think RTP2 (I'm unsure)
whereby the object in SYSOBJ is edited directly.
If you have symbolics which use the {} notation,
switch to @RECORD instead.
You can also mark routines with
EXPENDABLE FUNCTION myfunction(param1,param2)
instead of
FUNCTION myfunction(param1,param2)
and
EXPENDABLE SUBROUTINE myroutine(param1,param2)
instead of
EXPENDABLE myroutine(param1,param2)
Also try placing /XM4096 on the AREV.EXE command
line.
Also use
FLUSH
GARBAGECOLLECT
as frequent program statements, especially
ahead of report programs.
If you are running under Windows 95 on REVG 2B
there is a problem with program stack memory
being released. If you are on AREV you should
be able to get it to work.
If you add a DEBUG statement in your program
ahead of a routine which breaks with the
STACK error every time, then enter
PS
you can see how many entries are in the stack.
If most of the names are *not* programs then you
have to rework your dictionary symbolics.
Hope this helps,
Steve
Matt,
One way to ease the load on the stack is to replace all dictionary references using {} with the appropriate @RECORD position.