opencv has triggered a breakpoint Invalid address specified to RtlValidateHeap
I wrote some code in C++ and OpenCV 2.49 in Visual Studio 2013: cv::Mat mask = Mat::zeros(tmp.size(), CV_8UC1); modify mask that some elements are zeros and some elements are 255's cv::vector<cv::vector<cv::Point> > contours; cv::vector<cv::Vec4i> hierarchy; cv:findContours(mask, contours, CV_RETR_CCOMP, CV_CHAIN_APPROX_NONE); cv::imshow("Mask", mask); When the method ends, following error appears: Invalid address specified to RtlValidateHeap( 004D0000, 02EBD9D8 ) Project.exe has triggered a breakpoint. I searched at stackoverflow and other platforms but can't find an answer! I added the correct opencv path to the "path" environment variable: C:\opencv\build\x86\vc12\bin and also to the project configurations: C:\opencv\build\x86\vc12\lib If I use merge/split from the opencv api it causes the same error, but in this case it is possible to allocate ther vector before going into the method. Then it works. In this case it's not possible to allocate the vector before, because i don't now the size. I think the problem is that opencv allocates the memory and that's not in the correct heap, but i checked all dll's and paths. Do you have any other ideas? Thanks in advance! EDIT: I replaced the opencv folder with a new downloaded opencv and it works, don't ask me why!
Is the cv::vector declaration valid? You should try std::vector instead of them. Based on the given code, it is hard to decide what is causing the trouble. Could you provide more details? Also note that this "function modifies the image while extracting the contours". You should also check the properties below: Right click on the Project Properties - Configurational Properties - General: set Plattform Toolset to Visual Studio 2013 (v120) Configurational Properties - C/C++ - Code Generation - set Runtime Library: Multi-threaded Debug DLL (/MDd) for debug builds or Multi-threaded DLL (/MD) for release build
OpenCV error in flann knnmatch
How to mix up a stereo image with EmguCV?
Declare a cv::Mat member in managed c++ class
Calculate focus to map world point on imageplane
Forcing cmake to use a specific OpenCV version
In Javacv cvCreateFileCapture is not able to read the video from the memory
get information from connectedComponentsWithStats in opencv via c++ [duplicate]
What are some good sources for tutorials on structure from motion using OpenCV in Python? [closed]
Kinect Point Cloud To Color Space Transform
OpenCV + OpenGL Using solvePnP camera pose - object is offset from detected marker
opencv Unable to record video from camera to a file
opencv3.2 dnn module error
Why Dense SIFT produces these keypoints?
OpenCV: How to get the GMM co-variance matrix?
Where can I find the full forms of abbreviations used in OpenCV?
Build a Lab color model in opencv