Silverfrost Forums

Welcome to our forums

Runtime-Stack-Error

29 Aug 2005 4:03 #288

Dear Paul,

a few weeks ago Dr. Matthes sent you a CD-ROM with his program PATRA which he could not get to work with FTN95 2.54 [32766]. You detected several link errors (unresolved externals). In the meantime Dr. Matthes 'cleaned' his program and it can now be linked without any problems. However the original problem still occurs: when his arrays become to big, a stack error occurs. A problem which I could not solve by simply increasing the stack size via the SLINK command '-stack:...'. Dr. Matthes advised me to change the PARAMETER mstp in HS.FOR to a smaller value (for example 1000000) and then we don't encounter any problems (the program runs without any error). I have run several tests and monitored during its start the task manager). Here are the results I obtained on my system: Windows XP Pro, 512 MB RAM, max. 2 GB paging file.

mstp=100 000 → PATRA.EXE starts, no Runtime-Stack-Error; paging file: grows up to 1.03 GB. mstp=500 000 → PATRA.EXE starts, no Runtime-Stack-Error; paging file: grows up to 1.22 GB. mstp=1 000 000 → PATRA.EXE starts, no Runtime-Stack-Error; paging file: grows up to 1.47 GB. mstp=1 500 000 → PATRA.EXE starts, no Runtime-Stack-Error; paging file: grows up to 1.71 GB. mstp=1 900 000 → PATRA.EXE starts, no Runtime-Stack-Error; paging file: grows up to 1.95 GB. mstp=2 000 000 → PATRA.EXE starts a with Runtime-Stack-Error; paging file: grows up to 1.97 GB. I have tried to change the stack size using the appropriate SLINK command, but couldn't get rid of the error. Even worse, after several starts of PATRA the PC 'freezes' and a cold reboot becomes necessary.

Dr. Matthes needs PATRA with mstp being up to 5 000 000 in size. His PC is equipped with 2 GB of RAM and he even thinks of extending it to 3 or 4 GB.

Do you have an idea why his program doesn't work on my PC although I increased the stack to huge sizes? Do you think that this makes sense simply to extend his PC's RAM? My impression is that the error is to be found in SALFLIBC.DLL. I have the source file available however I don't know how to send it to you (it should be available to you only).

Please let me know. Thank you.

Kind regards

Joerg Kuthe

-- QT software GmbH Gaeblerstrasse 2 D-13086 Berlin Tel. 030/9290087-0 Fax. -2 eMail: admin@qtsoftware.de WWW http://www.qtsoftware.de

--

31 Aug 2005 3:33 #296

If you are using an operating system like Windows XP and have version 4.8 of FTN95, then you can increase the available address space from 2GB to 3GB. To do this you need to add the /3GB flag to your boot.ini. You also need to compile without /DEBUG (/CHECK, /UNDEF etc) or use the (unsafe) /3GB option with SLINK.

On a 64-bit machine it may be possible to extend the address space to 4GB but I have not tested this. Above 4GB you will need to use a 64-bit machine with a 64-bit compiler.

Please login to reply.