"Exception thrown at 0x00000000774EF23C (ntdll.dll) in opencv_solution.exe: 0xC0000005: Access violation reading location 0x00000EB7503F7BA8.

asked 2017-12-21 00:42:50 -0500

updated 2017-12-21 06:28:51 -0500

berak gravatar image

I used MSVC 2015 version , and prebuilt opencv-3.3.1-vc14 library for windows x64

I am getting follwing issue while using openCV library version opencv-3.3.1-vc14 by downloading it from openCv site

"Exception thrown at 0x00000000774EF23C (ntdll.dll) in opencv_solution.exe: 0xC0000005: Access violation reading location 0x00000EB7503F7BA8.

If there is a handler for this exception, the program may be safely continued."

This issue occurs only in case of debuggimg/step in mode , in case i press Ctrl + F5 issue does not occur.

I used a simple openCV example avalable on their site :

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "opencv2/highgui/highgui.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, const char** argv)
{
Mat img = imread("C:\\Users\\abha.jaswal\\Desktop\\Penguins.jpg", CV_LOAD_IMAGE_COLOR);

if (img.empty())
{
cout << "Image cannot be loaded..!!" << endl;
return -1;
}

Mat imgH = img + Scalar(75, 75, 75); //increase the brightness by 75 units
//img.convertTo(imgH, -1, 1, 75);

Mat imgL = img + Scalar(-75, -75, -75); //decrease the brightness by 75 units
//img.convertTo(imgL, -1, 1, -75);

namedWindow("Original Image", CV_WINDOW_AUTOSIZE);
namedWindow("High Brightness", CV_WINDOW_AUTOSIZE);
namedWindow("Low Brightness", CV_WINDOW_AUTOSIZE);

imshow("Original Image", img);
imshow("High Brightness", imgH);
imshow("Low Brightness", imgL);

waitKey(0);

destroyAllWindows(); //destroy all open windows

return 0;
}

Even if i run a empty main function like same error occurs:

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include "opencv2/highgui/highgui.hpp"
#include <iostream>

using namespace cv;
using namespace std;

int main(int argc, const char** argv)
{
return 0;
}

It gives me same error : its a weird bug .

Is there any solution to avoid this?

https://opencv-srf.blogspot.in/2013/0... used for installing openCV on visual studio

edit retag flag offensive close merge delete

Comments

it's not your code. check the linker settings again, please. likely, you use opencv_world331d.lib with a RELEASE project, or the release libs with a DEBUG build.

berak gravatar imageberak ( 2017-12-21 06:32:11 -0500 )edit