# Blue screen stack overflow problem



## Mike (Aug 22, 2003)

Hi there,
Almost everytime I start up my PC.- it come up with the following blue screen message...

"Windows. Terminating thread due to a stack overflow problem. A VxD, possibly recently installed, has consumed too much stack space. Increase the setting of 'MinSP's" in Sys.Ini opf remove recently installed VxD's. there are currently 5 SP's allocated."
I have uninstalled a number of recent applications', but to no avail...
Could you help please?


----------



## Styxx (Sep 8, 2001)

Terminating thread due to a stack overflow problem. A VxD,possibly recently installed,has consumed too much stack space/ Increase the setting of "MinSP's in "System.INI or remove recently installed VxD's. There are currently 5 Sps allocated.

Cause of the error message: 
====== 
This error can occur when Windows 98 encounters an internal overflow of the stacks used by 32-bit Windows device drivers. Please note that this is not related to the "Stacks=" line in the Config.sys file, which is used for 16-bit MS-DOS device drivers.

Stack overflow conditions are indicative of errors in the device driver. Device drivers are allocated 4 kilobytes (one page) of space to be used as a stack. If the device driver uses more than 4 kilobytes of memory, a stack overflow condition occurs.

Windows 98 sets aside a number of extra memory pages (spare stack pages) to be used temporarily to prevent a system "crash" due to a stack overflow condition. When the stack overflow condition has passed, Windows 98 reclaims the temporary page.

If Windows 98 detects that it has run out of spare stack pages, the warning message stated above is displayed. Windows 98 continues to operate normally unless a device driver encounters a stack overflow condition when there are no free spare stack pages.

Resolutions: - 
Review spare stack pages used by 32-bit Windows device drivers.
============= 
Go to start-run, type "sysedit" without the quotation mark and OK to open the System Configuration Editor. Select the system.ini window.

Go to the section and add the following line to the [386Enh] section of the System.ini file.

[386Enh] 
MinSPs=12

Save the system.ini. Exit the System Configuration Editor and restart the computer.

If the problem persists, increase the number of spare stack pages in increments 
of 4 (for example 12, 16, 32, 64). 
NOTE: Each spare stack page requires 4 kilobytes of memory. 
There should never be an odd number. It should be in increments of "4" as noted!!! 
Be aware that, increase the number too high may cause resources lower in the RAM area below 1Mb and have adverse effect in system performance.

Windows98 in default value is MinSPs=8 (which is hidden in the system).
If you've got error from stack pages of MinSPs, you should increase from 8 to 12 and test onwards for your system. The adding of such a line in system.ini will override the default value.


----------



## Styxx (Sep 8, 2001)

This Microsoft Knowledge Base article may be of help to you:

Q145799 How to Troubleshoot Windows Internal Stack Overflow Errors 

--------------------------------------------------------------------------------
The information in this article applies to:

Microsoft Windows Millennium Edition 
Microsoft Windows 98 Second Edition 
Microsoft Windows 98 
Microsoft Windows 95

--------------------------------------------------------------------------------


SUMMARY
This article lists steps to help you troubleshoot problems with stack overflow errors in Windows. 



MORE INFORMATION
Stacks are reserved memory that programs use for processing hardware events. A stack overflow occurs when there is not enough space in memory to run the hardware interrupt routines. Changing the "STACKS=" line in the Config.sys file, eliminating terminate-and-stay-resident program (TSRs), and eliminating hardware conflicts are all possible corrections for this problem. 

When Windows delivers an error message related to an internal stack overflow, it is because there is not enough space in memory either set aside or available to handle the calls being made to the system hardware. There are several things to consider when troubleshooting this problem: 


The startup file Config.sys may not be properly configured for the Windows installation. Try the following values: STACKS=64,512 ;(this is the maximum allowed) FILES=60 BUFFERS=40 If you are using the dual-boot capabilities of Windows, the Config.sys and Autoexec.bat files may not contain the correct configuration to run Windows. When you are dual-booting between Windows 3.x and Windows, these files may not have been renamed back to Config.dos and Autoexec.dos. Examine the Config.sys file to determine if files such as Himem.sys or Emm386.exe are being loaded from a folder other than the Windows folder. If so, boot Windows using the Safe Mode Command Prompt Only option. Rename the Config.sys file to Config.dos and the Autoexec.bat file to Autoexec.dos and the restart the computer. 


Some TSRs may be interfering with Windows. Disable any non-boot device drivers in the Config.sys and Autoexec.bat files. If you are installing from Windows 3.x and getting a stack overflow error, check the Win.ini and System.ini files for non-Windows-based programs or drivers loading. 


There may be an incompatible hardware configuration. Check the port and IRQ settings of the network card, sound card, and modem. Make sure that there are no COM2/COM4 or COM1/COM3 conflicts and that no devices are sharing IRQs. Disable or remove conflicting devices. 


The computer may need a BIOS upgrade. Check the BIOS version and contact the manufacturer of your computer for information about a BIOS upgrade. 


For additional information, please see the following article in the Microsoft Knowledge Base: 
Q82318 Stack Overflow Can Cause Windows to Hang 

Additional query words: 

Keywords : kbenv kberrmsg kbtshoot win95 win98 win98se kbWinME 
Issue type : kbhowto


----------



## Styxx (Sep 8, 2001)

These resolutions were found via search on http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=stack+overflow+problem&btnG=Google+Search for 'stack overflow problem', without the quotation marks.


----------

