Reputation: 103
I have a project running in MSVC 2005. After building the project in Debug mode I get a .exe file.
When I press F5 I could run the Application. But when I press Ctrl+F5 I get the following error
[The instruction at "0x7c911909" referenced memory at "0xfffffff8". The memory could not be "read"]
Can some one explain me why this is happening.
By right even if I press Ctrl+F5 I should be able to run the Application.
Upvotes: 0
Views: 112
Reputation: 340218
I can't explain what's happening because there's not really enough information. However, you might be able to find more about the problem by setting a breakpoint at address 0x7c911909
, running under the debugger and seeing if that tells you anything. Note that that address is pretty high, so it might not really be valid, or it might be a system DLL address (particularly if you're running on a Win64 system). Still a stack trace might be informative.
Upvotes: 0
Reputation: 9635
Without seeing code a guess: You have an uninitialized pointer somewhere. If I remember correctly, running in debug mode allocates memory differently, one of the things it does is set allocated memory to certain values.
With the standard heap, it just grabs memory and returns it to you, so you get any old garbage.
Details on the debug heap: http://msdn.microsoft.com/en-us/library/974tc9t1(v=vs.80).aspx
Upvotes: 1