If the program compiles perfectly in Debug mode but runs into “Access Violation” problems in Release, there are configurations in Debug mode haven’t been done in Release mode.

A simple way to deal with this: open the “.vcxproj” file with Notepad, change the configurations of Release to the same as in the Debug mode.