cgtinker / BlendArMocap

realtime motion tracking in blender using mediapipe and rigify
GNU General Public License v3.0
930 stars 112 forks source link

OpenCV Segmentation Fault on Ubuntu #138

Closed Desagiato closed 1 year ago

Desagiato commented 1 year ago

Try to access dependencies opencv-contrib-python>=4.5.5.64 ('4.7.0.72', '/usr/local/lib/python3.10/dist-packages/opencv-contrib-python') protobuf>=3.11.4,<=3.20.0 ('3.20.0', '/usr/local/lib/python3.10/dist-packages/protobuf') mediapipe>=0.8.10 ('0.9.1.0', '/usr/local/lib/python3.10/dist-packages/mediapipe') Path to mov: /home/desa/Video/VID_20230301_190204.mp4 OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Writing: /tmp/blender.crash.txt Segmentation Fault

cgtinker commented 1 year ago

what's your os-system? seems like an issue with either mediapipe or opencv package.

also, what's in the /tmp/blender.crash.txt file.

Desagiato commented 1 year ago

Ubuntu 22.04

Desagiato commented 1 year ago

Blender 3.0.1, Unknown revision

bpy.context.scene.m_cgtinker_mediapipe.detection_input_type = 'movie' # Property bpy.context.scene.m_cgtinker_mediapipe.enum_detection_type = 'HOLISTIC' # Property bpy.context.scene.m_cgtinker_mediapipe.selected_driver_collection = "" # Property bpy.context.scene.m_cgtinker_mediapipe.selected_driver_collection = "Collection" # Property bpy.context.scene.m_cgtinker_mediapipe.enum_detection_type = 'HAND' # Property bpy.context.scene.m_cgtinker_mediapipe.detection_input_type = 'movie' # Property bpy.context.scene.m_cgtinker_mediapipe.mov_data_path = ".mov;mp4" # Property bpy.context.space_data.system_folders_active = 0 # Property

backtrace

blender(BLI_system_backtrace+0x37) [0x55ea4b8c7ec7] blender(+0xfb57c3) [0x55ea498d07c3] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fab07042520] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x5263) [0x7faa78a05263] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x548e) [0x7faa78a0548e] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x4ff5) [0x7faa78a04ff5] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(xkb_x11_keymap_new_from_device+0x4f) [0x7faa78a02caf] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5XcbQpa-c112ba75.so.5.15.0(+0x47558) [0x7faa97e8d558] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5XcbQpa-c112ba75.so.5.15.0(_ZN14QtOpenCVPython14QXcbConnectionC1EPNS_19QXcbNativeInterfaceEbjPKc+0x264) [0x7faa97e882a4] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_python.libs/libQt5XcbQpa-c112ba75.so.5.15.0(_ZN14QtOpenCVPython15QXcbIntegrationC2ERKNS_11QStringListERiPPc+0x2e7) [0x7faa97e8ac87] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/libqxcb.so(+0x243f) [0x7faab712f43f] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_python.libs/libQt5Gui-48e93776.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate25createPlatformIntegrationEv+0x5ec) [0x7faaba54da7c] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_python.libs/libQt5Gui-48e93776.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate21createEventDispatcherEv+0x30) [0x7faaba54f020] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_python.libs/libQt5Core-39545cc7.so.5.15.0(_ZN14QtOpenCVPython23QCoreApplicationPrivate4initEv+0xab6) [0x7faab9ec82f6] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_python.libs/libQt5Gui-48e93776.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate4initEv+0x1b) [0x7faaba551a4b] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_python.libs/libQt5Widgets-e69d94fb.so.5.15.0(_ZN14QtOpenCVPython19QApplicationPrivate4initEv+0x9) [0x7faabaf98979] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x1447707) [0x7faabe647707] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x14535cd) [0x7faabe6535cd] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x1441abc) [0x7faabe641abc] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x578e23) [0x7faabd778e23] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x12b6d3) [0x7fab0972b6d3] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyObject_MakeTpCall+0x8c) [0x7fab096e61ac] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x9dcc) [0x7fab0967ba0c] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7fab097c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7fab09679eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7fab097c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7fab09679eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7fab097c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7fab09679eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7fab097c681f] blender(+0x1b8a91d) [0x55ea4a4a591d] blender(+0x1b49ab2) [0x55ea4a464ab2] blender(+0x13f89be) [0x55ea49d139be] blender(+0x13fa539) [0x55ea49d15539] blender(+0x13fabb5) [0x55ea49d15bb5] blender(wm_event_do_handlers+0x414) [0x55ea49d1cef4] blender(WM_main+0x20) [0x55ea49d1dd50] blender(main+0x2d5) [0x55ea49845c25] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fab07029d90] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fab07029e40] blender(_start+0x25) [0x55ea498acbd5]

Python backtrace

File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_utils/stream.py", line 69 in draw File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_detection/detector_interface.py", line 83 in exec_detection File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_detection/detect_hands.py", line 27 in image_detection File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_blender/interface/ui_operators.py", line 139 in modal

cgtinker commented 1 year ago

I think this issue is related to opencv, you probably got to manual install dependencies. At first, it would be good to gather some informations about your system - check the docs to do so (debian linux requires globally installed dependencies so conflicts just happen)...

Also, consider to refer to this issue: #118 Installing opencv via the local package manager may be the way to go

Desagiato commented 1 year ago

I have installed all the dependency manually and now i have this error,

Try to access dependencies opencv-contrib-python>=4.5.5.64 ('4.5.5.64', '/usr/local/lib/python3.10/dist-packages/opencv-contrib-python') protobuf>=3.11.4,<=3.20.0 ('3.20.0', '/usr/local/lib/python3.10/dist-packages/protobuf') mediapipe>=0.8.10 ('0.9.1.0', '/usr/local/lib/python3.10/dist-packages/mediapipe') OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Writing: /tmp/blender.crash.txt Segmentation fault

this is blender.crash.txt

Blender 3.0.1, Unknown revision

backtrace

blender(BLI_system_backtrace+0x37) [0x5599c821dec7] blender(+0xfb57c3) [0x5599c62267c3] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f3abea42520] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x5263) [0x7f3a38205263] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x548e) [0x7f3a3820548e] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(+0x4ff5) [0x7f3a38204ff5] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libxkbcommon-x11-c65ed502.so.0.0.0(xkb_x11_keymap_new_from_device+0x4f) [0x7f3a38202caf] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-ca221f44.so.5.15.0(+0x3e418) [0x7f3a3be3e418] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-ca221f44.so.5.15.0(_ZN14QtOpenCVPython14QXcbConnectionC1EPNS_19QXcbNativeInterfaceEbjPKc+0x264) [0x7f3a3be39164] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/../../../../opencv_contrib_python.libs/libQt5XcbQpa-ca221f44.so.5.15.0(_ZN14QtOpenCVPython15QXcbIntegrationC1ERKNS_11QStringListERiPPc+0x2e7) [0x7f3a3be3bb47] /usr/local/lib/python3.10/dist-packages/cv2/qt/plugins/platforms/libqxcb.so(+0x243f) [0x7f3a815d843f] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-ba0a2070.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate25createPlatformIntegrationEv+0x5ec) [0x7f3a85d4da6c] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-ba0a2070.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate21createEventDispatcherEv+0x30) [0x7f3a85d4f010] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_contrib_python.libs/libQt5Core-39545cc7.so.5.15.0(_ZN14QtOpenCVPython23QCoreApplicationPrivate4initEv+0xab6) [0x7f3a856c82f6] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_contrib_python.libs/libQt5Gui-ba0a2070.so.5.15.0(_ZN14QtOpenCVPython22QGuiApplicationPrivate4initEv+0x1b) [0x7f3a85d51a3b] /usr/local/lib/python3.10/dist-packages/cv2/../opencv_contrib_python.libs/libQt5Widgets-e69d94fb.so.5.15.0(_ZN14QtOpenCVPython19QApplicationPrivate4initEv+0x9) [0x7f3a86798979] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x16be558) [0x7f3a8a2be558] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x16ca45d) [0x7f3a8a2ca45d] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x16b895c) [0x7f3a8a2b895c] /usr/local/lib/python3.10/dist-packages/cv2/cv2.abi3.so(+0x779433) [0x7f3a89379433] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x12b6d3) [0x7f3ac112b6d3] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyObject_MakeTpCall+0x8c) [0x7f3ac10e61ac] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x9dcc) [0x7f3ac107ba0c] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7f3ac11c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7f3ac1079eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7f3ac11c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7f3ac1079eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7f3ac11c681f] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(_PyEval_EvalFrameDefault+0x82ae) [0x7f3ac1079eee] /lib/x86_64-linux-gnu/libpython3.10.so.1.0(+0x1c681f) [0x7f3ac11c681f] blender(+0x1b8a91d) [0x5599c6dfb91d] blender(+0x1b49ab2) [0x5599c6dbaab2] blender(+0x13f89be) [0x5599c66699be] blender(+0x13fa539) [0x5599c666b539] blender(+0x13fabb5) [0x5599c666bbb5] blender(wm_event_do_handlers+0x414) [0x5599c6672ef4] blender(WM_main+0x20) [0x5599c6673d50] blender(main+0x2d5) [0x5599c619bc25] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f3abea29d90] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f3abea29e40] blender(_start+0x25) [0x5599c6202bd5]

Python backtrace

File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_utils/stream.py", line 69 in draw File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_detection/detector_interface.py", line 83 in exec_detection File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_detection/detect_hands.py", line 27 in image_detection File "/root/.config/blender/3.0/scripts/addons/BlendArMocap-main/src/cgt_blender/interface/ui_operators.py", line 139 in modal

Desagiato commented 1 year ago

I've install opencv manually from ubuntu packagemanager and it start to work, thank you so much

cgtinker commented 1 year ago

Glad it worked out, I'll reference this in the linux thread #129 and close it down