Code: Select all
junk=form_alert(1,"[ Running all tests will | benchmark your machine and | save the results as | your default values. | Do you wish to continue ?][ NO | YES ]")
open "debugFA.txt" for output as #1
My problem is, while the form_alert shows the box, and the file returns a number relating to what button was clicked (YES/NO) then it just goes crazy and my program crashes with "stack overflow". But I think that isn't the issues exactly as the error line numbers are random, like mostly if my code is 2,000 lines long, it will report a error at line 2,200, or even report errors on blank lines in my program.
I have increased the stack sizes, but had no effect. What seems to be happening is when the form_alert is called, it seems to corrupt the stack somehow. My code never returns from that subroutine and just seems to run random stuff after that which then leads to the stack overflow and then crashes.
If I REM out that form_alert line, then everything works fine. No crashes, no problems. But as soon as I put back in form_alert, it just goes mental. It is like the "END SUB" is being ignored and the program just carrys on running what ever code comes next and leads to the crash. Though it isn't the sub routine calls or returns as they work fine without form_alert.
So my question is, has anyone any idea why/how that could even happen ??