title: Exit code 139 when performing image subtraction
body: <p>I am performing an image subtraction using python. I have images in the form of numpy arrays. The size of the list that carrying all images is 1000. Each numpy array in the list is of 360*640 type. The frame subtraction is happening correct when the number of frames is around 300. </p>
  
  <pre><code>def find_der(frames):
      der = []
      for a in range(len(frames)-1):
          der.append(frames[a + 1] - frames[a])
      return der
  
  framesprocessing = 1000
  for j in range(framesprocessing):
  
      img = cv.QueryFrame(video)
      if img is None:
         print("Images are Not Captured")
      else:
         tmp = cv.CreateImage(cv.GetSize(img), 8, 3)
  
     saveImagesColor = 'Abhiram_images/RGB/frame' + str(i) + '.png'  #Saving the iplimages to the local PC
     cv.SaveImage(saveImagesColor, img)
  
     saveImagesGray = 'Abhiram_images/GRAY/frame' + str(i) + '.png'  #Saving the grayscale images to the local PC
     img1 = cv2.imread(saveImagesColor)
     grayimg = cv2.cvtColor(img1,cv2.COLOR_BGR2GRAY)
     cv2.imwrite(saveImagesGray, grayimg)
     graynumpyimage = np.array(grayimg, dtype='int64')
     grayscale.append(graynumpyimage)
     i += 1
  
  first_der = find_der(grayscale)
  </code></pre>
  
  <p>When I execute the code with frames processing as 1000 I am getting the following output:</p>
  
  <pre><code>Process finished with exit code 139
  </code></pre>
  
  <p>Could you help me how to overcome this error and throw some light when I will get such a kind of error</p>