Technical article 109527

Using DOS under Merge, I sometimes get an "internal stack overflow" error.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4

Written · Last revised

Problem

Using a DOS application under Merge, I sometimes get an error "internal stack overflow" when holding down a key on the keyboard.

Cause

When running in a window on the desktop, the X server and the X clients are all consuming CPU cycles, and occasionally they will take enough time that the Merge process does not get the time it needs to process the barrage of keyboard interrupts.

Solution

DOS and Windows were written with the expectation that keyboard interrupts cannot happen faster than the fast repeat rate that keyboards can be programmed to do. With Merge {and especially when running in an X window), due to other activity on the system, the keyboard input can back up. Then, when the Merge process runs again a second or two later, the rate of keyboard interrupts sent to the DOS process momentarily is faster than the average rate, especially if the keyboard's repeat rate is very high.

With normal keyboard use this does not cause problems because you
do not type fast enough to fill the buffers up (unless the system
is completely overloaded).  But if you attempt to barrage the
DOS/Windows process with keyboard interrupts by holding a key
down, especially if the keyboard is set for a very fast repeat
rate, you will generate the "internal stack overflow" error.

You may be able to avoid this problem by setting the keyboard repeat rate slower, increasing the amount of memory allocated to your DOS session, or setting the "stacks" variable higher in your config.sys file.

From the Xinuos technical article database, record 109527. Reproduced with permission. The original is at www.sco.com/ta/109527, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.