Windows – do I get an internal stack overflow error when minimizing and restoring an MS-DOS virtual machine window

microsoft-virtual-pcms-dosstackwindowwindows 7

I am using Windows Virtual PC on a Windows 7 machine. I have created an MS-DOS 6.22 virtual machine with 16 MB RAM and a 2 GB hard disk. Whenever I minimize or otherwise deactivate the window, and then restore or reactivate it, I get an error message, the PC speaker beeps for a second, and the virtual machine completely stops working until I forcefully reboot it:

Internal stack overflow
System halted

(Interestingly, the problem does not occur when I am running Windows 3.1, which runs on top of MS-DOS. I get the error immediately when I try to exit to MS-DOS from Windows.)

I also got a similar error when I tried to install Windows 9x-based operating systems during the first (text-based) phase of installation and performing the same actions, and when attempting to boot such an OS (in this case, Windows 98) into real-mode MS-DOS mode (though in that case I get the error immediately and do not have to perform the actions above to get it):

An internal stack overflow has caused this session to be halted.
Check the STACKS setting in your CONFIG.SYS file, and then try again.

Why does this error occur, and is there any way to fix it?

Best Answer

Very weird that changing the size of a window would affect a virtual machine.

Do you have the latest version of Virtual PC for your OS? If not, is your BIOS have Virtualization enabled?

Windows is known to replace part of DOS; it's not too surprising that Windows might fix something that is broken in DOS. Still, I'd be wary about the stability of any Windows 9x installation that is on top of a machine (even a virtual one) that can't run DOS well.

For info about the STACKS command, see the CONFIG.TXT that comes with Windows 98. (Yes, I spelled that filename correctly.) I'm also wondering if FSCB (File system control blocks) may be another CONFIG.SYS command that is relevant?

It would be interesting to see if other DOS's have this problem. Does FreeDOS work better?

You could also try a different emulator. (e.g., Qemu is open source. VirtualBox might be an option too.)

It seems you're not the only one who has encountered this: Win98 install issue (which shows some sample CONFIG.SYS lines to try), Windows 95 issues with virtualizing (which mentions that having too fast of a processor is known to cause problems).