title: OpenCV findContours causes Debug Assertion Failed at return
body: <p>I am programming on Visual Studio 2013, using OpenCV v 2.4.8.
  Here is my code</p>
  
  <pre><code>#define _CRT_SECURE_NO_WARNINGS
  
  #include &lt;cv.h&gt;
  #include &lt;highgui.h&gt;
  
  int main(int argc, char* argv[])
  {
      cv::Mat image = cv::imread(argv[1], 0);
      image = image &gt; 100;
      std::vector&lt;std::vector&lt;cv::Point&gt; &gt; contours;
      cv::findContours(image, contours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);
      return 0;
  }
  </code></pre>
  
  <p>Everything is Ok in release mode, and I can't understand why it doesn't work normal in debug mode. It causes debug assertion failed at <code>return 0;</code></p>
  
  <blockquote>
    <p>(Expression : _pFirstBlock == pHead).</p>
  </blockquote>
  
  <p>I suppose something is wrong with contours.</p>
  
  <p>Many thanks in assistance.</p>