title: OpenCV & Flask: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
body: <p>I am currently using Flask and the WebUI module to create a desktop application that uses OpenCV. One problem I am having is every time I try to open the OpenCV camera, it throws an error.</p>
  
  <p>The function that I am calling is:</p>
  
  <pre><code>@app.route('/start-camera')
  def startCamera():
      global cameraState, video
      while cameraState:
          ret, frame = video.read()
          cv2.imshow('Camera', frame)
      return render_template('index.html')
  </code></pre>
  
  <p>The error I get is</p>
  
  <blockquote>
    <p>Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)</p>
  </blockquote>
  
  <p>Does anyone have any advice on how to fix this/get around it? Thanks in advance!</p>