I don't know what to think of this. Attached is my project. When I compile as release, everything seems to work as expected but when I run through the debugger, I get an access violation soon after the breakpoint. I've looked over the code many many times but I haven't found anything wrong.