c++ - exception in release mode and not in debug mode -


when run code in debug mode no exceptions appear in release mode exception :

unhandled exception @ 0x768b4b32 in realtimeslt.exe: microsoft c++ exception: cv::exception @ memory location 0x003de734..

why problem appear when release ?and how can fix ??

filestorage fs2(filename, filestorage::read); fs2.open(filename, filestorage::read); fs2["mat"] >> mat;   fs2["dmat"]>> dmat;  fs2.release(); 

assuming you're running in vs, choose debug->exceptions , click on 'break when exception thrown'

run app under debugger , see why exception thrown , complaining - it's different in environment app running under.

if need examine variables release build makes hard optimiser confusing debugger. can solve turning off optimizations in release build. however, if timing issue may hide problem.

another option catching exception being thrown , logging internal message - function called 'what()' or similar. point actual problem. you'll want catch exception anyway.

if undefined behavior causing difference between release , debug above wont use.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -