Juned Ansari
Juned Ansari

Reputation: 5275

OpenCV- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) on MAC

Getting Error Like

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

when i run below code in pycharm.

import cv2
img = cv2.imread("MyFriends.jpg")
cv2.imshow("TEST",img)
cv2.waitKey(0)

Solution Tried : sudo chmod -R 777 to targetfolder but no change.

Closing and reopening the IDE didn’t help.

Rebooting the laptop didn’t help

Python Version: 3.8.5

opencv version: 4.4.0

enter image description here

Upvotes: 1

Views: 2590

Answers (2)

Gaurav Raj Singh
Gaurav Raj Singh

Reputation: 36

Just checked the previous OpenCV versions. The issue persists on 4.3.0.38, but not on '4.3.0.36'. So whatever is causing it, started on that version.

I guess I continue using '4.3.0.36' for now...

Upvotes: 2

Lewis Morris
Lewis Morris

Reputation: 2134

Usually because you are referencing an object that no longer exists.

Are you realeasing the videocapture too early (if you are using it)

Or

Are you calling cv2.destroyallwindows() whithin your while loop?

Both of these, if inside your while loop, would cause the error.

If the above code is all you have so far...

Try

`import cv2

img = cv2.imread("MyFriends.jpg")

cv2.imshow("TEST",img)

cv2.waitKey(0)

cv2.destroyAllWindows()`

Upvotes: 0

Related Questions