On Wednesday, 26 June 2013 at 07:55:29 UTC, Namespace wrote:
Today Mike Parker figured out that it happens only if scope(exit) is used in combination with glPopAttrib. But

That's not exactly what I was getting at. The problem isn't with scope(exit) or, I believe, glPopAttrib. It just so happens that the way your test case was set up, that particular line was the last to be executed before going back up the callstack to exit the app. Adding a writeln statement within that scope(exit) block caused the access violation to appear somewhere else (which happened to also be a scope(exit) glPopAttrib in another function). Adding a writeln there shifted it into the Windows kernel. This is a classic sign of a memory corruption bug.

Reply via email to