The stack is an area of memory reserved for dynamic allocations and function call return addresses. The program starts with the "stack pointer" at the top of that area, and it grows downwards (towards lower addresses). As the dynamically-used parts are released, the stack pointer moves back up again. Unlike in many other OSes, AmigaOS does not have the capability to expand the stack area once allocated. The best we can do is to swap to another new, bigger stack for critical parts of the code, then swap back again later.
The "guard area" is a set of four longwords at the bottom of the stack area. If the stack grows so much that it reaches the bottom four longwords (without actually overflowing the whole space), then you get that indication. It's just an indication, no more, and it is not the reason that the program stopped.
If the stack went further (into the "red zone"), then you would get the "Stack pointer is outside bounds" message.
You should not continue from a DSI in any case, unless you are desperate. You never know what has been corrupted by the errant program before it finally crashed.
The first thing to try next time you run the program that crashed this way is to increase the stack, either from it's icon or in the shell with the stack command.
If crashes still happen it could be because of a more serious bug in the program (recursion out of control, memeory trash , etc etc).
Not ignoring DSI sounds like good advice, and in most instances I shall follow it from now on.
But opening a file in PageStream Pro 5.0.5.8 gets a DSI almost every time. I'm afraid I'd have to quit using that much-needed program!
Meanwhile, following broadblues suggestion, I have increased its stack from 100000 to 1000000. Will try it shortly, with trepidation; isn't that a pretty big stack?
1000000 is a pretty big stack, but not overly so. It all depends on the type of program and the data it uses, what it does and how it is programmed. And compared to your total system memory, you probably won't have a problem using 1 MB more for a stack - if is helps you.
Of course a DSI is a sign of problems, and the advice to not continue after ignoring one is sound. But e.g. in the case with PageStream, you also have to consider if it makes something possible which otherwise you couldn't do. I would try ignoring the DSI, then save the document often and in several generations (i.e. not overwriting each time). If you can continue working, and end up getting your document done without worse crashes, the benefits have outweighed the risks. And you have minimized the risks by saving often - and of course by not running anything else important simultaneously.
After you're done, reboot the machine to get a fresh start for any other work.
It depends on the program, if it’s a Linux program, there is a chance they use salloc() to allocate memory, allocate memory on stack, this might a problem on AmigaOS. (it's mostly done on temporary buffers, stack is intended to be reused, so its already allocated and there for a lot faster, as well as you don't need to free it after use, it will be freed when the program exits the function.) (in this case 1mb is nothing.)
Program that do allot of recursive functions can also easy run out of stack.
I think most programs, written by normal people will run just fine with default stack.
it might not always help to increase the stack as sub processes has their own stack.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.