This article was previously published under Q217168
This article has been archived. It is offered "as is" and will no longer be updated.
An application runs as expected outside of the debugger but causes an application error like this when run in the debugger:
System Process - Application Error The Application failed to initialize properly (0xc00000005)
Another symptom appears if the reserve value specified for the HEAP linker option is smaller than the commit value: The reserve value is silently increased to the commit value.
The heap reserve size is smaller than the commit size. This means that applications that rely on these values (such as the debugger) are not able to load the binary image.
The heap reserve size should always be greater than or equal to the commit size. The linker provided in Service Pack 3 checks these values. If the reserve value is less than the commit value, the linker generates a fatal error. For example, linking with the option /HEAP:0x400,0x1000 causes this error:
LNK1229: Commit size greater than the reserve size in "/HEAP"
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
194022 Visual Studio 6.0 service packs, what, where, why
194295 How to tell that Visual Studio 6.0 service packs are installed
To view the reserve and commit values for an executable, use the dumpbin utility: