I am using OpenCV with VC++. The function is doing what it ought do but throwing an exception which is causing access violation in reading a location and refers to ntdll.dll. What would I missing for being unable to handle the exception when the code is doing what it should do ?
void cl::first()
{
Mat a=imread("C:\\1.jpg");
Mat b;
cvtColor(a,b,CV_RGB2BGR);
imwrite("C:\\2.jpg",b);
return ;
}
Exception
First-chance exception at 0x77551e86 (ntdll.dll) in app.exe: 0xC0000005:
Access violation reading location 0x43819ccc. Unhandled exception at 0x77551e86 (ntdll.dll)
in app.exe: 0xC0000005: Access violation reading location 0x43819ccc.
The program '[4500] app.exe: Native' has exited with code -1073741819 (0xc0000005).