Stack overflow on cv::InputArray:type(int) (Bug #2268)
Description
1vector < vector<Point> > contours;
2contours.clear(); - ok
3OutputArrayOfArrays &ref = contours;
4ref.clear(); << start
call stack:
opencv_core249d.dll!cv::_InputArray::type(int i) Line 1194 + 0xd bytes C++ opencv_core249d.dll!cv::_InputArray::type(int i) Line 1194 + 0xf bytes C++ opencv_core249d.dll!cv::_InputArray::type(int i) Line 1194 + 0xf bytes C++ opencv_core249d.dll!cv::_OutputArray::clear() Line 1563 + 0xf bytes C++ > win32.exe!ContourDetect::getContours(cv::Mat & img) Line 94 + 0x15 bytes C++
keep calling:
1int k = kind();
Visual Studio says that:
kind = 0x01381c62 cv::_InputArray::type(int) ????? how
Associated revisions
Merge pull request #2268 from ilya-lavrenov:tapi_pow
History
Updated by Andrey Kamaev over 12 years ago
Please, use wiki formatting creating tickets.
- Description changed from vector < vector<Point> > contours; contours.clear(); - ok OutputA... to <pre><code class="cpp"> vector < vector<Point>... More
Updated by Reto Grieder over 12 years ago
Could this be related to issue #2218?
I also got a stack overflow related to the kind() function when I compiled with OPENCV_CAN_BREAK_BINARY_COMPATIBILITY, but didn't add that flag to my own program.
Updated by Reto Grieder over 12 years ago
Addendum: I've created a new ticket with a better description because the old one was closed: #2358
Updated by Vadim Pisarevsky over 12 years ago
Variables of types InputArray, OutputArray, InputArrayOfArrays etc. must not be declared explicitly. They are only intended to be used as proxy types for passing parameters to OpenCV functions. Instead, use vector<vector<Point>> or any other type that can be converted to OutputArrayOfArrays.
- Status changed from Open to Cancelled
Updated by Vadim Pisarevsky over 12 years ago
- Target version changed from 3.0 to 2.4.3