-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
cPython Binding Causes Entire Program To Crash in cv2.dnn.NMSBoxes #18856
Copy link
Copy link
Closed
Labels
bugcategory: python bindingsconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete
Milestone
Description
System information (version)
- OpenCV => opencv-python-headless 4.4.0.46
- Operating System / Platform => Ubuntu Linux, x64
Detailed description
Similar to Issue #18835, the Python bindings are failing when calling a function with the wrong arguments.
The major difference is this time it causes the entire Python runtime to crash!
It turns out that the bindings really don't like numpy arrays instead of lists.
Side note, but PyCharm and other linters do not catch the issue since the bindings are not generated with any typing information. It's just run it, and pray that nothing was missed.
Steps to reproduce
import cv2
import numpy
cv2.dnn.NMSBoxes(numpy.empty(0),[],0,0)Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues,
answers.opencv.org, Stack Overflow, etc and have not found solution - I updated to latest OpenCV version and the issue is still there
- There is reproducer code and related data files: videos, images, onnx, etc
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: python bindingsconfirmedThere is stable reproducer / investigation completeThere is stable reproducer / investigation complete