Page 1 of 1

Stack in linker

Posted: Mon Jun 15, 2015 12:37 am
by gradosic
Hi Folks!

I recently had some problems with “stack overflow” in my programs so I decide to enlarge /STACK in linker to 10MB ( /STACK: 10485760, 10485)… Now I’m experiencing new problems that my app runs out of memory so new problem for me. Does anyone use this STACK feature in linker and how to measure what’s the right size of stack. And if anyone use this please write me how much of stack did you put because in Alaska help there is no detailed explanation.


Thanks, Goran

Re: Stack in linker

Posted: Mon Jun 15, 2015 1:43 am
by Tom
Hi, Goran.

"Stack overflow" comes in the context of a not-ending recursion. Check the XppFatal.log for the cause.

Anyway, this is what I use:

/STACK:5000000,10000

Re: Stack in linker

Posted: Mon Jun 15, 2015 5:22 am
by rdonnay
I have never had a stack overflow unless it was caused by an error in recursion.
I believe that the stack defaults to 1000. It is nearly impossible to write code that would blow that stack.

Re: Stack in linker

Posted: Mon Jul 06, 2015 8:56 am
by gradosic
Hi Roger,

Till now there was no problem with alaska 1.9, but after we change to 2.0 we expereiencing big, big problems with stack overflow and shutting down program WITHOUT ANY ERROR !!!

for example, DC print;
------------------------------------------------
Export_File='C:\TEMP\Prijemni list-kalkulacija '+Slozi_Broj(AllTrim(UT->Sifra),ID,DATUM)+".PDF"
FErase(Izlazna_Datoteka)
IF cOption = "PREVIEW"
DCPRINT ON SIZE 60, 155 TO oGrcPrinter FONT '9.Arial CE' NOSTOP ORIENTATION 2 TITLE 'Prijemni list-kalkulacija '+Slozi_Broj(AllTrim(UT->Sifra),ID,DATUM) CANCELENABLE BUSYMESSAGE 'Pripremam dokument' NAME "Bullzip PDF Printer" OUTFILE (Izlazna_Datoteka) ACROBAT NOSPAWN
ELSE
DCPRINT ON SIZE 60, 155 TO oGrcPrinter FONT '9.Arial CE' NOSTOP ORIENTATION 2 TITLE 'Prijemni list-kalkulacija '+Slozi_Broj(AllTrim(UT->Sifra),ID,DATUM) CANCELENABLE BUSYMESSAGE 'Pripremam dokument'
ENDIF

if I print to printer (not preview) everything is OK, but if cOption is Preview i receive this error:

FATAL ERROR LOG
Stack Overflow
SYS Thread-ID: 688
Module: EH
Error Codes: EH: 12 Sub: 0(0) OS: 0 XPP: 16
Call Stack of Thread 1 (688):
PREGLED_PRIMKE(5564)
(B)PRIMKE(59)
(B)DC_MergeBlocks(184)
ŽXBPBROWSEŽIŽHANDLEEVENT(1909)
ŽDC_XBPBROWSEŽIŽHANDLEEVENT(1141)
ŽDC_GETLISTŽIŽEVENTLOOP(4661)
ŽDC_GETLISTŽIŽREADGUI(3841)
DC_READGUI(111)
PRIMKE(129)
(B)MAIN(1067)
ŽDC_GETLISTŽIŽEVENTLOOP(4661)
ŽDC_GETLISTŽIŽREADGUI(3841)
DC_READGUI(111)
MAIN(1459)
Call Stack of GUI Thread (984):
Call Stack of Thread 3 (1412):
LOCK_RADSTA(1134)
Call Stack of Thread 4 (1460):
LOCK_DUPLI(1103)
Call Stack of Thread 5 (1552):
ŽJD_MAGICHELPTHREADŽIŽEXECUTE(95)
(B)ŽJD_MAGICHELPTHREADŽIŽINIT(41)
Call Stack of Thread 6 (1588):
Call Stack of Thread 7 (2688):
_CANCELDIALOG(944)
(B)ŽDC_PRINTERŽIŽINIT(889)
File: C:ĐTHORĐthor.exe
TimeStamp: 20150706 17:33
End of FATAL ERROR LOG.

Re: Stack in linker

Posted: Mon Jul 06, 2015 10:13 am
by rdonnay
Take out the CANCELENABLE and BUSYMESSAGE and see if you still get the error.

Re: Stack in linker

Posted: Wed Jul 08, 2015 1:07 am
by gradosic
HI Roger,

I't the same even I mooved those 2 commands.

FATAL ERROR LOG
Stack Overflow
SYS Thread-ID: 688
Module: EH
Error Codes: EH: 12 Sub: 0(0) OS: 0 XPP: 16
Call Stack of Thread 1 (688):
PREGLED_PRIMKE(5564)
(B)PRIMKE(85)
ŽDC_XBPPUSHBUTTONŽIŽACTION(2482)
(B)ŽDC_XBPPUSHBUTTONŽIŽINIT(2018)
ŽXBPPUSHBUTTONŽIŽHANDLEEVENT(1522)
ŽDC_GETLISTŽIŽEVENTLOOP(4661)
ŽDC_GETLISTŽIŽREADGUI(3841)
DC_READGUI(111)
PRIMKE(129)
(B)MAIN(1067)
ŽDC_GETLISTŽIŽEVENTLOOP(4661)
ŽDC_GETLISTŽIŽREADGUI(3841)
DC_READGUI(111)
MAIN(1459)
Call Stack of GUI Thread (984):
Call Stack of Thread 3 (1412):
LOCK_RADSTA(1129)
Call Stack of Thread 4 (1460):
LOCK_DUPLI(1098)
Call Stack of Thread 5 (1552):
ŽJD_MAGICHELPTHREADŽIŽEXECUTE(95)
(B)ŽJD_MAGICHELPTHREADŽIŽINIT(41)
Call Stack of Thread 6 (1588):
File: C:ĐTHORĐthor.exe
TimeStamp: 20150707 15:17
End of FATAL ERROR LOG.

Re: Stack in linker

Posted: Fri Jul 10, 2015 5:49 am
by rdonnay
I suggest that you contact Alaska Software support.

Send them an email to support@alaska-software.com.