I have been getting the error below when compiling and running my application for 64-bit release (release just has optimisation level -O2 on that debug does not).
-O2