我正在用VC++使用OpenCV。該函數正在做它應該做的事情,但在讀取位置時拋出異常導致訪問衝突,並引用ntdll.dll。當代碼正在做它應該做的事時,我會因爲無法處理異常而丟失什麼?訪問衝突讀取位置 - opencv/VC++
void cl::first()
{
Mat a=imread("C:\\1.jpg");
Mat b;
cvtColor(a,b,CV_RGB2BGR);
imwrite("C:\\2.jpg",b);
return ;
}
異常
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).
重複:http://stackoverflow.com/questions/2623163/opencv-2-0-c-api-using-imshow-returns-unhandled-exception-and-bad-flag – ArtemStorozhuk