Acces Violation Memory Error when call absDIff

i make new project copy the emtyExample and take as guide from the openCvExample and copy the code, but in my new project when call the absDiff the aplication crash!! but in the opencvExample Run ok. Plis Help Me!

Can you post your code?