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.