🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

[Lesson 1] Heap Corruption [Solved]

Started by
0 comments, last by klee1 14 years, 11 months ago
I've been trying to work through the NeHe tutorials, but I have been having a problem while running the tutorial 1 code in debug mode. On my call to DestroyWindow after exiting from the window, I receive a heap corruption error: "Windows has triggered a breakpoint in lesson1.exe. This may be due to a corruption of the heap, which indicates a bug in lesson1.exe or any of the DLLs it has loaded. This may also be due to the user pressing F12 while lesson1.exe has focus. The output window may have more diagnostic information." The output window yields the following information: "HEAP[lesson1.exe]: HEAP: Free Heap block 1f1478 modified at 1f15f8 after it was freed" This seems to happen in other applications as well when I call the DestroyWindow method. If anyone could help I would be extremely grateful. Note: Using Visual Studio C++ 2008 In order to compile I removed "#include "glaux.h" and "glaux.lib," from the source and project file respectively. [Edited by - klee1 on July 28, 2009 7:18:52 PM]
Advertisement
It turns out that the problem was caused by an error in SetPixelFormat() when constructing the window and just not realized until the destruction of the window.

My problem was fixed by updating my graphics drivers.

This topic is closed to new replies.

Advertisement