   Anyone have an answer for me would be greatly appreciated
  We are having a problem with our EXE causing a HEAP corruption. The strange part is that debug and release work perfect in Visual Studio when we run it from the VCPROJ. Anybody else have this problem and if so how did you fix it.   
  Have you checked all of your dynamic memory to make sure it is being allocated and deallocated properly? Can't say anything more with such a vague description.   ;Quote:Original post by KSpeckhalsThe strange part is that debug and release work perfect in Visual Studio when we run it from the VCPROJ.How are you running it when the error occurs?   ;  Yeah all the dynamic memory is being deallocated and allocated correctly. I know it is vague it's really strange that it would run with no errors or crashing in debug and release but when we try to run it with the executable it just crashes saying that it is a heap corruption. We even went so far as to comment out most of the code that was dynamically allocated and still we couldn't find what was causing it. It loads up fine and the main menu state works but as soon as we enter the gameplay state it crashes. Let me get back to you guys with a better description when I meet with my group tomorrow. Maybe one of them has a better description.   ;  Oh yeah we run it from both the release exe and debug exe and the same problem occurs.   ;  It sounds to me like the problem is likely related to a buffer or array overflow, i.e. you wrote past the end of an array or possibly a char/string buffer. This is a different class of bugs than memory allocation/deallocation so your examinations probably didn't include the actual culprit code.The strategy you have is pretty good for isolating these bugs: remove as much code as you can, until the problem goes away; then slowly re-add code until the problem resurfaces. That should pinpoint the issue for you.   ;  You could also try putting cout(C++?) statements in your code at various points and run the EXE from the console to try and pinpoint what part of your code is causing the heap corruption.   ;  In VS you can bring up the exceptions dialog from Debug menu->Exceptions (or press ctrl+alt+E). From here you can select which run-time errors will cause VS to pause execution and let you know something has gone wrong.Perhaps one of the exceptions which is "off" by default is happening, like out-of-bounds array access or some kind of access violation.   ;  Try using Application Verifier to investigate heap corruption issues. It basically wraps heap management calls with some corruption detection so that you see the source of the problem sooner, ideally at the point when it actually occurs as opposed to a random time later on an unrelated allocation. It also does a bunch of other types of checks.   