pyskl
pyskl copied to clipboard
Importing pyskl.models causes segmentation fault in OpenCV
When I try to display a frame that was processed by pyskl using OpenCV I get a segmentation fault in cv2.imshow
.
I constructed a minimal Example to facilitate repoducing the error:
import cv2
# the line causing the problem. Without it everything works as expected
import pyskl.models
webCam = cv2.VideoCapture(0)
ret, frame = webCam.read()
if not ret:
#failed to capture frame from web cam
exit(1)
cv2.imshow("Test",frame)
webCam.release()
Running the Program using gdb gives the following information:
Starting program: /tmp/pyskl/bin/python minExample.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff43ff6c0 (LWP 171269)]
[New Thread 0x7ffff1bfe6c0 (LWP 171270)]
[New Thread 0x7fffef3fd6c0 (LWP 171271)]
[New Thread 0x7fffecbfc6c0 (LWP 171272)]
[New Thread 0x7fffea3fb6c0 (LWP 171273)]
[New Thread 0x7fffe7bfa6c0 (LWP 171274)]
[New Thread 0x7fffe53f96c0 (LWP 171275)]
[Detaching after vfork from child process 171279]
[Detaching after vfork from child process 171280]
[Detaching after vfork from child process 171284]
[Detaching after vfork from child process 171285]
[Detaching after vfork from child process 171286]
[New Thread 0x7fff50dff6c0 (LWP 171287)]
[New Thread 0x7fff505fe6c0 (LWP 171288)]
[New Thread 0x7fff4ddfd6c0 (LWP 171289)]
[New Thread 0x7fff4b5fc6c0 (LWP 171290)]
[New Thread 0x7fff46dfb6c0 (LWP 171291)]
[New Thread 0x7fff445fa6c0 (LWP 171292)]
[New Thread 0x7fff41df96c0 (LWP 171293)]
[New Thread 0x7fff3f0876c0 (LWP 171294)]
[New Thread 0x7fff368866c0 (LWP 171295)]
[New Thread 0x7fff3e8866c0 (LWP 171296)]
[New Thread 0x7fff3e0856c0 (LWP 171297)]
[New Thread 0x7fff3d8846c0 (LWP 171298)]
[New Thread 0x7fff3d0836c0 (LWP 171299)]
[New Thread 0x7fff3c8826c0 (LWP 171300)]
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007fff5440d3e6 in ?? () from /tmp/pyskl/lib/python3.10/site-packages/decord/../decord.libs/libxcb-77222338.so.1.1.0
#0 0x00007fff5440d3e6 in ?? () from /tmp/pyskl/lib/python3.10/site-packages/decord/../decord.libs/libxcb-77222338.so.1.1.0
#1 0x00007fff5440cf9b in xcb_send_request_with_fds64 () from /tmp/pyskl/lib/python3.10/site-packages/decord/../decord.libs/libxcb-77222338.so.1.1.0
#2 0x00007fff5440d119 in xcb_send_request () from /tmp/pyskl/lib/python3.10/site-packages/decord/../decord.libs/libxcb-77222338.so.1.1.0
#3 0x00007fff5441b271 in xcb_intern_atom () from /tmp/pyskl/lib/python3.10/site-packages/decord/../decord.libs/libxcb-77222338.so.1.1.0
#4 0x00007fff37eb6e24 in ?? ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-dcb826d0.so.5.15.0
#5 0x00007fff37eaac13 in QtOpenCVPython::QXcbBasicConnection::QXcbBasicConnection(char const*) ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-dcb826d0.so.5.15.0
#6 0x00007fff37e89062 in QtOpenCVPython::QXcbConnection::QXcbConnection(QtOpenCVPython::QXcbNativeInterface*, bool, unsigned int, char const*) ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-dcb826d0.so.5.15.0
#7 0x00007fff37e8bc87 in QtOpenCVPython::QXcbIntegration::QXcbIntegration(QtOpenCVPython::QStringList const&, int&, char**) ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-dcb826d0.so.5.15.0
#8 0x00007fffccc1343f in ?? () from /tmp/pyskl/lib/python3.10/site-packages/cv2/qt/plugins/platforms/libqxcb.so
#9 0x00007fffdae30a7c in QtOpenCVPython::QGuiApplicationPrivate::createPlatformIntegration() ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-dd62182f.so.5.15.0
#10 0x00007fffdae32020 in QtOpenCVPython::QGuiApplicationPrivate::createEventDispatcher() ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-dd62182f.so.5.15.0
#11 0x00007fffda83d2f6 in QtOpenCVPython::QCoreApplicationPrivate::init() ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/../opencv_contrib_python.libs/libQt5Core-b6e66ee2.so.5.15.0
#12 0x00007fffdae34a4b in QtOpenCVPython::QGuiApplicationPrivate::init() ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-dd62182f.so.5.15.0
#13 0x00007fffdb6f9979 in QtOpenCVPython::QApplicationPrivate::init() ()
from /tmp/pyskl/lib/python3.10/site-packages/cv2/../opencv_contrib_python.libs/libQt5Widgets-e69d94fb.so.5.15.0
#14 0x00007fffded9abe7 in ?? () from /tmp/pyskl/lib/python3.10/site-packages/cv2/cv2.abi3.so
#15 0x00007fffdeda6aad in ?? () from /tmp/pyskl/lib/python3.10/site-packages/cv2/cv2.abi3.so
#16 0x00007fffded94f9c in ?? () from /tmp/pyskl/lib/python3.10/site-packages/cv2/cv2.abi3.so
#17 0x00007fffdddb8683 in ?? () from /tmp/pyskl/lib/python3.10/site-packages/cv2/cv2.abi3.so
#18 0x00007ffff7d264a1 in ?? () from /usr/lib/libpython3.10.so.1.0
#19 0x00007ffff7d1fb4b in _PyObject_MakeTpCall () from /usr/lib/libpython3.10.so.1.0
#20 0x00007ffff7d1af06 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.10.so.1.0
#21 0x00007ffff7d14760 in ?? () from /usr/lib/libpython3.10.so.1.0
#22 0x00007ffff7dc1e04 in PyEval_EvalCode () from /usr/lib/libpython3.10.so.1.0
#23 0x00007ffff7dd25b3 in ?? () from /usr/lib/libpython3.10.so.1.0
#24 0x00007ffff7dcdd0a in ?? () from /usr/lib/libpython3.10.so.1.0
#25 0x00007ffff7c721cd in ?? () from /usr/lib/libpython3.10.so.1.0
#26 0x00007ffff7c71e7e in _PyRun_SimpleFileObject () from /usr/lib/libpython3.10.so.1.0
#27 0x00007ffff7c72831 in _PyRun_AnyFileObject () from /usr/lib/libpython3.10.so.1.0
#28 0x00007ffff7dded9d in Py_RunMain () from /usr/lib/libpython3.10.so.1.0
#29 0x00007ffff7db35eb in Py_BytesMain () from /usr/lib/libpython3.10.so.1.0
#30 0x00007ffff7a0d290 in __libc_start_call_main (main=main@entry=0x555555555120, argc=argc@entry=2, argv=argv@entry=0x7fffffffbe98)
at ../sysdeps/nptl/libc_start_call_main.h:58
#31 0x00007ffff7a0d34a in __libc_start_main_impl (main=0x555555555120, argc=2, argv=0x7fffffffbe98, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffbe88) at ../csu/libc-start.c:381
#32 0x0000555555555045 in _start ()
I did some debugging, but I couldn't pinpoint the issue further, since I'm not really familiar with the code base. Are there any ideas as to what could cause the issue, or how to debug this further?