Hey there, I have recently been building an asteroids game. Before last night, it would close down fine when I pressed the relevant button to do so but now for some reason it is giving the following error message:
Windows has triggered a breakpoint in Asteroids.exe.
This may be due to a corruption of the heap, which indicates a bug in Asteroids.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while Asteroids.exe has focus.
The output window may have more diagnostic information.
I assume it is to do with the dynamic memory I have been using but I do not know how to resolve the issue. Has anyone got any ideas?
Are you compiling a debug version of the app? Have you searched your code for any break points you may have inserted by mistake? They should stand out, usually as marks in the left margin of your code.
No there are no break points at all in my program. It is not a natural breakpoint, if I open the program from within visual studio using Ctrl+F5, it works fine.
But as soon as I open it how I normally do (just pressing F5), it stops working :s
Although if I clean and rebuild the solution, the first time I run it using F5 it works fine. Once it has closed down; when I try to run again by F5 it gives the message in the first post.
When it does give this error message, it opens up: crt0dat.c and from time to time: free.c
EDIT: I don't know if this is related, but I just realised that the solution is not rebuilding itself to adapt to any changes when I start it (with either F5 OR Ctrl+F5). This is shown by when I do something major like change the menu it loads up first. I edited it so it should load up the Main Menu rather than the Help File Menu (which I was working on) and when I started it, it started up on the Help File Menu still. I tried this multiple times and it was only when I cleaned the solution and built it would it actually update the change and start on the correct menu.