New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenCV 4.4.0 macOS Catalina "segmentation fault" #18079
Comments
|
❯ sw_vers 2.----
|
Try to add "python" executable itself ( Do you have other python apps which can work with camera? Do them work? |
I have the same exact problem as @azataiot . When I updated opencv-python to 4.4.0.40, I got segmentation fault on sw_vers:
Python 3.8.2 None of the apps regarding Python (Terminal, Python binary, ...) is listed in Security & Privacy > Privacy > Camera. (And I can't whitelist any app manually, because there's no option for adding to the list). |
UPDATE: (temp fix) Just checked the previous versions. The issue persists on I guess I continue using '4.3.0.36' for now... |
@azataiot Could you confirm that it crashes on
Please also try these builds (check |
But I do believe that the problem has something related to Video Capture, because it worked well except trying to capture video from the default camera. And I tried to add a usb camera so that I can check whether it is the problem of the camera, but external camera did not work also. |
@azataiot You have BTW, without stacktrace info it is hard to move forward here. |
@alalek Ok so I decided to do a deep debug tomorrow, and let me try to find which part of the CV is causing the problem, then may it will be helpful. Just several minutes before I tried to run the same problem on my Mac book air and it has the os version of 10.15.5, and got the same problem, so I do think it is CV in somewhere causing the problem. If possible, can you give me some internal commands or tools to debug the code in CV ( much more specifically? Or should I run some kind of testing codes either?) |
I've been able to reproduce the issue on OSX 10.15.6 with opencv-python 4.4.0.40 package from pip (installed in conda environment) 😢 :
Problem is not reproduced with opencv 4.4.0 from conda-forge conda channel. But it seems that build from conda-forge does not use Qt highgui backend. cc @skvark |
Found similar problem: https://riverbankcomputing.com/pipermail/pyqt/2020-January/042419.html Looks like Qt looks for Qt bundle ('org.qt-project.QtCore') and can not find it. Not sure if it is possible to trick it somehow, as I understand Perhaps it is possible to define |
Yeah, I looked into Qt sources too. That PyQt link was helpful. The issue surfaced in the latest |
Now, as I tested a lot, I can confirm that the problem was produced by 'cv2.imshow()'. |
I just encountered similar problem in pycharm. I was using latest version of opencv-python and python 3.7. When i use cv2.imshow(), i got the err: So I installed the 4.3.0.36 version, then cv2.VideoCapture and cv2.imshow() works |
I can confirm, This works fine when, rolling back to version 4.3.0.36 Please fix this. |
This issue cannot be fixed in this repository. It's very specific to the unofficial |
Almost a similar problem I am facing now. The ML/DL Python code was working fine until Mac OS Catalina 10.15.5 is updated to Catalina 10.15.6. After update "zsh: segmentation fault" thrown with a popup window message "Python quit unexpectedly". Details given below. Unfortunately I cannot downgrade my Mac to the older version Catalina 10.15.5 as the system is completely formatted and installed Catalina 10.15.6. Any suggestion to fix this issue?.
|
This works fine with Catalina 10.15.6. Thank you very much. |
I can confirm both the issue and the workaround, thank you very much |
Please try to upgrade to the new 4.4.0.42 release which should have this issue fixed. |
I've checked package 42 and it works fine. Thank you! |
opencv-python version 4.5.4.58 still presents this very same issue on Manjaro Linux as of november 2021. After having dowgraded to opencv-python 4.5.3.56 the issue is resolved |
Thanks, I faced this issue on ubuntu 20.04, default install.
|
@magiwanders @bestel74 Please follow the issue here: opencv/opencv-python#572 This issue is related to macOS and has been fixed. |
PIP opencv-python package issue: opencv/opencv-python#376
System information (version)
Model Name: MacBook Air
Model Identifier: MacBookAir7,2
Processor Name: Dual-Core Intel Core i5
Processor Speed: 1.8 GHz
Number of Processors: 1
Total Number of Cores: 2
L2 Cache (per Core): 256 KB
L3 Cache: 3 MB
Hyper-Threading Technology: Enabled
Memory: 8 GB
python --version
Python 3.8.5 [3.7,3.6]
❯ pip --version
pip 20.2.2 from /Users/xxx/.pyenv/versions/3.8.5/envs/AI-3.8.5/lib/python3.8/site-packages/pip (python 3.8)
Python 3.8.5 (default, Aug 12 2020, 19:20:20)
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Detailed description
Got "[1] 26545 segmentation fault " While running the official OpenCV documentation tutorial code from https://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_video_display/py_video_display.html
Tested Code:
Error message:
"""
python test.py
[1] 60134 segmentation fault python test.py
╭─ ~/Projects/cv2 ✘ SEGV AI-3.8.5 3.8.5 21:39:57
"""
What I've. tried :
Steps to reproduce
Issue submission checklist
answers.opencv.org, Stack Overflow, etc and have not found solution
The text was updated successfully, but these errors were encountered: