title: Fatal Signal in android 6.0 but works in android 4.0 to android 5.1
body: <p><strong>What I do:</strong>
  1. I write the opencv sample face detection code in c++ and call from android using wrapper.</p>
  
  <p>2.I used android native camera and pass image(Mat) to the c++ face detection method.</p>
  
  <p>3.It working in android 4.0 to android 5.1 but while running in android 6.0, the application crashes</p>
  
  <p>4.I tried putting log inside the method where the application crashes(ie) in c++ source code.</p>
  
  <p>5.Sample code</p>
  
  <pre><code>std::vector&lt;cv::Rect_&lt;double&gt;&gt; res_dbl;
  Rect detect_faces(Mat&amp; image)
  {
  LOGD("START");
      vector&lt;Rect&gt; res;
      Mat im(image.size(),CV_8UC1);
      if(image.channels()==3)
      {
          cvtColor(image,im,COLOR_BGR2GRAY);
      }
      else
      {
          image.copyTo(im);
      }
  
      cascade.detectMultiScale(im, res, 1.1,2,CASCADE_FIND_BIGGEST_OBJECT,Size(image.cols/3,image.rows/3));
  
  for (int i = 0; i &lt; res.size(); i++) {
  
  
  }
      if(res.size()==0){return Rect(0,0,0,0);}
     res_dbl.push_back(cv::Rect_&lt;double&gt;(res[0].x,res[0].y,res[0].width,res[0].height));
    LOGD("END");
     return res[0];
  
  }
  </code></pre>
  
  <p>6.While calling the above method using</p>
  
  <blockquote>
    <p>Rect faceROI=detect_faces(captured_image);</p>
  </blockquote>
  
  <p>The log "END" is shown ,but its not returning ,while running in android 6.0.</p>
  
  <p>7.I also tried in different devices(with android 6.0).</p>
  
  <p><strong>What I need to know:</strong></p>
  
  <p>1.Whether I need to add any flag in Application.mk file?</p>
  
  <p>2.Does I need to make any changes in the above code?</p>
  
  <p>please help me to solve this issue.</p>
  
  <p><strong>UPDATE :</strong></p>
  
  <p>1.I build many opencv project in c++ and call from android using wrapper.</p>
  
  <p>2.Only few simple projects(like face detection) are working in Android 6.0 many projects crashing in Android 6.0 but working in Android 4.4 to Android 5.1 </p>
  
  <p>3.Is there any changes to be done in c++ code while building the dynamic library in Android 6.0</p>