BlendArMocap
BlendArMocap copied to clipboard
Seg fault in Fedora 35
Running Blender 3.2.1 in Fedora 35. Extension release 152
Input movie properties: 640 × 480 in portrait mode H.264 (Baseline Profile) 30.00 frames per second 3083 kbps MPEG-4 AAC 42 seconds Container: Quicktime (.mp4)
Movie displays upside down as a small thumbnail for 2-3 seconds, then Blender crashes.
Here is the end of the terminal output:
.... Rig bones: 0.064 Generate widgets: 0.030 Assign layers: 0.029 Finalize: 0.033 The rest: 0.023 Info: Successfully generated: "rig"
Path to mov: /home/tm/Desktop/BG-1.1 Samsung for Mocap.mp4 OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. skipping duplicate keyframe 2 hand Writing: /tmp/blender.crash.txt Segmentation fault
Here is the end of blender.crash.txt.
.... bpy.ops.object.editmode_toggle() # Operator Successfully generated: "rig" # Info bpy.context.scene.m_cgtinker_mediapipe.detection_input_type = 'movie' # Property bpy.context.space_data.bookmarks_active = 0 # Property bpy.context.scene.m_cgtinker_mediapipe.selected_driver_collection = "Collection" # Property bpy.context.scene.m_cgtinker_mediapipe.selected_rig = bpy.data.objects["rig"] # Property
backtrace
./blender(BLI_system_backtrace+0x20) [0xc161180] ./blender() [0x11da2dd] /lib64/libc.so.6(+0x55350) [0x7f91babda350] ./blender() [0x17e4089] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN6tflite8Subgraph11CleanupNodeEi+0x4d) [0x7f9164e88f6d] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN6tflite8SubgraphD1Ev+0x4f) [0x7f9164e88fef] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN6tflite8SubgraphD0Ev+0x12) [0x7f9164e89252] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN6tflite11InterpreterD1Ev+0x1ef) [0x7f9164e938ef] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe4api226InferenceCalculatorCpuImpl5CloseEPNS_17CalculatorContextE+0x2c) [0x7f91648a846c] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe14CalculatorNode9CloseNodeERKN4absl12lts_202103246StatusEb+0x7b9) [0x7f9164fd8869] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe14CalculatorNode11ProcessNodeEPNS_17CalculatorContextE+0x1de) [0x7f9164fd8d2e] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe8internal14SchedulerQueue17RunCalculatorNodeEPNS_14CalculatorNodeEPNS_17CalculatorContextE+0xfb) [0x7f9164fd30bb] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe8internal14SchedulerQueue11RunNextTaskEv+0x81) [0x7f9164fd3c21] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe10ThreadPool9RunWorkerEv+0xc4) [0x7f916500be74] /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe/python/_framework_bindings.cpython-310-x86_64-linux-gnu.so(_ZN9mediapipe10ThreadPool12WorkerThread10ThreadBodyEPv+0x33d) [0x7f916500c3fd] /lib64/libc.so.6(+0x9fdb2) [0x7f91bac24db2] /lib64/libc.so.6(+0x3f9e0) [0x7f91babc49e0]
Python backtrace
Another portrait input video with format 406 × 720 produces a similar Blender crash.
Your extension appears in Blender only when running sudo ./blender, not ./blender.
Could the problem here be related to other installed software? I have several versions of opencv, mediapipe and probably pip on my system from other blender extensions that use mediapipe. Unlike your extension these do not have an uninstall software command, making removing the offending versions difficult.
Great work here. Looking forward to using this.
Similar problem in new Fedora 36 installation.
Removing and reinstalling dependencies did not help.
Hand markers are displayed in the movie frame that flashes for a few seconds before Blender crashes.
Here is blender.crash.txt
Terminal output follows.
[tm@fedora blender-3.2.1-linux-x64]$ sudo ./blender Read prefs: /root/.config/blender/3.2/config/userpref.blend BlendArMocap-main - Initializing... BlendArMocap-main - add-on path: /root/.config/blender/3.2/scripts/addons/BlendArMocap-main BlendArMocap-main - blender bin: /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/blender, blender version: (3, 2, 1) BlendArMocap-main - python exe: /home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/bin/python3.10 (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) BlendArMocap-main - Attempt to reload... BlendArMocap-main - Reload successful! Registing BlendArMocap
Try to access dependencies opencv-contrib-python>=4.5.5.64 ('4.6.0.66', '/home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/opencv-contrib-python') protobuf>=3.11.4,<=3.20.0 ('3.20.0', '/home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/protobuf') mediapipe>=0.8.10 ('0.8.10.1', '/home/tm/Documents/Downloads/blender-3.2.1-linux-x64/3.2/python/lib/python3.10/site-packages/mediapipe') Path to mov: /home/tm/Desktop/BG-1.1 Samsung for Mocap.mp4 OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. skipping duplicate keyframe 2 hand Writing: /tmp/blender.crash.txt Segmentation fault
I'm not familiar with fedora and sadly my VM doesn't let me install it properly so I cannot test myself. Anyways, I did some research and you could try the following:
- Don't set the stream frame writable flags to false:
- navigate to
src/cgt_detection/cgt_detector_interface.py
- comment out line 84:
# self.stream.frame.flags.writable = False
- Try downgrading mediapipe :
- find the path to blenders python.exe in blenders python console with the cmd:
sys.executable
- shutdown blender, open the terminal and uninstall mediapipe:
'python.exe-path' -m pip uninstall mediapipe
- install older mediapipe versions:
'python.exe-path' -m pip install mediapipe==0.8.7
- (I'd try versions in between 0.7 - 0.10, but 0.8.7 seems to be a good first test)
Your extension appears in Blender only when running sudo ./blender, not ./blender.
Weird, this should only be an issue when installing the dependencies, maybe there is a permission issue? Can you provide a log message?
Unlike your extension these do not have an uninstall software command, making removing the offending versions difficult.
Yes, there can be issues. The requirements can be fairly specific (which is a bummer). I included an "uninstall dependencies" button as sometimes it's required to use specific package versions. Using it may break other tools. Are the add-ons using mediapipe and open-cv running properly on your system? If so, could you check the mediapipe / open-cv-contrib versions or send me a link to their git?
I'll try your suggestions today and reply.
Just installed Blender 3.0.0 thinking that the problem might be an extension compatibility issue with newer Blender versions but from the output below it appears the same problem exists with the 3.0 version.
When I did a fresh install of Fedora 36 two days back I assumed it would eliminate any old versions of mediapipe, openCV and pip, but that is apparently not the problem here, unless those versions reside in my /home data partition. That seems unlikely.
Below is the terminal output for Blender 3.0.0, which has some warnings about running pip as root user and using an old version of pip, but maybe those are not important?
[tm@TM blender-3.0.0-linux-x64]$ sudo ./blender [sudo] password for tm: addon_utils.disable: BlendArMocap-main not disabled Modules Installed (BlendArMocap-main) from '/home/tm/Documents/Downloads/BlendArMocap-release-152.zip' into '/root/.config/blender/3.0/scripts/addons' BlendArMocap-main - Initializing... BlendArMocap-main - add-on path: /root/.config/blender/3.0/scripts/addons/BlendArMocap-main BlendArMocap-main - blender bin: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/blender, blender version: (3, 0, 0) BlendArMocap-main - python exe: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 Registing BlendArMocap
Try to access dependencies REGISTRATION FAILED: REQUIRED MODULE NOT FOUND Attempting to install pip. Looking in links: /tmp/tmpd9yienvd Processing /tmp/tmpd9yienvd/setuptools-57.4.0-py3-none-any.whl Processing /tmp/tmpd9yienvd/pip-21.2.3-py3-none-any.whl Installing collected packages: setuptools, pip Successfully installed pip-21.2.3 setuptools-57.4.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv Attempting to install: opencv-contrib-python>=4.5.5.64 ['/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9', '-m', 'pip', 'install', '--no-cache-dir', 'opencv-contrib-python>=4.5.5.64'] Collecting opencv-contrib-python>=4.5.5.64 Downloading opencv_contrib_python-4.6.0.66-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (67.1 MB) |████████████████████████████████| 67.1 MB 57 kB/s Collecting numpy>=1.14.5 Downloading numpy-1.23.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB) |████████████████████████████████| 17.1 MB 832 kB/s Installing collected packages: numpy, opencv-contrib-python Successfully installed numpy-1.23.1 opencv-contrib-python-4.6.0.66 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.2.3; however, version 22.1.2 is available. You should consider upgrading via the '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip install --upgrade pip' command. opencv-contrib-python>=4.5.5.64 installed successfully. Attempting to install: protobuf>=3.11.4,<=3.20.0 ['/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9', '-m', 'pip', 'install', '--no-cache-dir', 'protobuf>=3.11.4,<=3.20.0'] Collecting protobuf<=3.20.0,>=3.11.4 Downloading protobuf-3.20.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.0 MB) |████████████████████████████████| 1.0 MB 232 kB/s Installing collected packages: protobuf Successfully installed protobuf-3.20.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.2.3; however, version 22.1.2 is available. You should consider upgrading via the '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip install --upgrade pip' command. protobuf>=3.11.4,<=3.20.0 installed successfully. Attempting to install: mediapipe>=0.8.10 ['/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9', '-m', 'pip', 'install', '--no-cache-dir', 'mediapipe>=0.8.10'] Collecting mediapipe>=0.8.10 Downloading mediapipe-0.8.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.9 MB) |████████████████████████████████| 32.9 MB 612 kB/s Collecting attrs>=19.1.0 Downloading attrs-21.4.0-py2.py3-none-any.whl (60 kB) |████████████████████████████████| 60 kB 708 kB/s Collecting matplotlib Downloading matplotlib-3.5.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.2 MB) |████████████████████████████████| 11.2 MB 741 kB/s Requirement already satisfied: protobuf<4,>=3.11 in ./3.0/python/lib/python3.9/site-packages (from mediapipe>=0.8.10) (3.20.0) Collecting absl-py Downloading absl_py-1.2.0-py3-none-any.whl (123 kB) |████████████████████████████████| 123 kB 313 kB/s Requirement already satisfied: opencv-contrib-python in ./3.0/python/lib/python3.9/site-packages (from mediapipe>=0.8.10) (4.6.0.66) Requirement already satisfied: numpy in ./3.0/python/lib/python3.9/site-packages (from mediapipe>=0.8.10) (1.23.1) Collecting pyparsing>=2.2.1 Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB) |████████████████████████████████| 98 kB 251 kB/s Collecting cycler>=0.10 Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB) Collecting fonttools>=4.22.0 Downloading fonttools-4.34.4-py3-none-any.whl (944 kB) |████████████████████████████████| 944 kB 182 kB/s Collecting python-dateutil>=2.7 Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) |████████████████████████████████| 247 kB 228 kB/s Collecting kiwisolver>=1.0.1 Downloading kiwisolver-1.4.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB) |████████████████████████████████| 1.6 MB 305 kB/s Collecting pillow>=6.2.0 Downloading Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.2 MB) |████████████████████████████████| 3.2 MB 364 kB/s Collecting packaging>=20.0 Downloading packaging-21.3-py3-none-any.whl (40 kB) |████████████████████████████████| 40 kB 290 kB/s Collecting six>=1.5 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB) Installing collected packages: six, pyparsing, python-dateutil, pillow, packaging, kiwisolver, fonttools, cycler, matplotlib, attrs, absl-py, mediapipe Successfully installed absl-py-1.2.0 attrs-21.4.0 cycler-0.11.0 fonttools-4.34.4 kiwisolver-1.4.4 matplotlib-3.5.2 mediapipe-0.8.10.1 packaging-21.3 pillow-9.2.0 pyparsing-3.0.9 python-dateutil-2.8.2 six-1.16.0 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv WARNING: You are using pip version 21.2.3; however, version 22.1.2 is available. You should consider upgrading via the '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip install --upgrade pip' command. mediapipe>=0.8.10 installed successfully. BlendArMocap-main - Initializing... BlendArMocap-main - blender bin: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/blender, blender version: (3, 0, 0) BlendArMocap-main - python exe: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) BlendArMocap-main - Dependencies installed: True BlendArMocap-main - Attempt to reload... BlendArMocap-main - blender bin: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/blender, blender version: (3, 0, 0) BlendArMocap-main - python exe: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) BlendArMocap-main - Reload successful! Path to mov: /home/tm/Desktop/BG-1.1 Samsung for Mocap.mp4 OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. skipping duplicate keyframe 2 hand Writing: /tmp/blender.crash.txt Segmentation fault [tm@TM blender-3.0.0-linux-x64]$ sudo ./blender
Here is blender.crash.txt blender.crash.txt
The first suggestion didn't change the crash.
Using the second suggestion in Blender's python console the sys.executable command gave an error. Was able to find the python exe with the following:
import sys print(sys.executable) /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9
Uninstalling mediapipe gave the following:
[tm@TM blender-3.0.0-linux-x64]$ /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip uninstall mediapipe Found existing installation: mediapipe 0.8.10.1 Uninstalling mediapipe-0.8.10.1: Would remove: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/mediapipe-0.8.10.1.dist-info/* /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/mediapipe/* Proceed (Y/n)? y Successfully uninstalled mediapipe-0.8.10.1 ERROR: Exception: Traceback (most recent call last): File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 173, in _main status = self.run(options, args) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/commands/uninstall.py", line 97, in run uninstall_pathset.commit() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py", line 436, in commit self._moved_paths.commit() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/req/req_uninstall.py", line 287, in commit save_dir.cleanup() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 184, in cleanup rmtree(self._path) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_vendor/tenacity/init.py", line 326, in wrapped_f return self(f, *args, **kw) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_vendor/tenacity/init.py", line 406, in call do = self.iter(retry_state=retry_state) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_vendor/tenacity/init.py", line 362, in iter raise retry_exc.reraise() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_vendor/tenacity/init.py", line 195, in reraise raise self.last_attempt.result() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/concurrent/futures/_base.py", line 438, in result return self.__get_result() File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/concurrent/futures/_base.py", line 390, in __get_result raise self._exception File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_vendor/tenacity/init.py", line 409, in call result = fn(*args, **kwargs) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 135, in rmtree shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/shutil.py", line 726, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/shutil.py", line 683, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/shutil.py", line 681, in _rmtree_safe_fd os.unlink(entry.name, dir_fd=topfd) PermissionError: [Errno 13] Permission denied: 'INSTALLER' [tm@TM blender-3.0.0-linux-x64]$
Uninstalling again as root gave the following: tm@TM blender-3.0.0-linux-x64]$ sudo /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip uninstall mediapipe [sudo] password for tm: WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Skipping mediapipe as it is not installed. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv [tm@TM blender-3.0.0-linux-x64]$
Installing another mediapipe gave the following terminal output: [tm@TM blender-3.0.0-linux-x64]$ /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip install mediapipe==0.8.7 WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) Collecting mediapipe==0.8.7 Downloading mediapipe-0.8.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32.3 MB) |████████████████████████████████| 32.3 MB 52 kB/s Requirement already satisfied: matplotlib in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (3.5.2) Requirement already satisfied: opencv-contrib-python in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (4.6.0.66) Collecting wheel Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB) Requirement already satisfied: numpy in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (1.23.1) Requirement already satisfied: protobuf>=3.11.4 in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (3.20.0) Requirement already satisfied: attrs>=19.1.0 in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (21.4.0) Requirement already satisfied: absl-py in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (1.2.0) Requirement already satisfied: six in ./3.0/python/lib/python3.9/site-packages (from mediapipe==0.8.7) (1.16.0) Requirement already satisfied: kiwisolver>=1.0.1 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (1.4.4) Requirement already satisfied: python-dateutil>=2.7 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (2.8.2) Requirement already satisfied: fonttools>=4.22.0 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (4.34.4) Requirement already satisfied: packaging>=20.0 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (21.3) Requirement already satisfied: cycler>=0.10 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (0.11.0) Requirement already satisfied: pillow>=6.2.0 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (9.2.0) Requirement already satisfied: pyparsing>=2.2.1 in ./3.0/python/lib/python3.9/site-packages (from matplotlib->mediapipe==0.8.7) (3.0.9) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) Installing collected packages: wheel, mediapipe WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) Successfully installed mediapipe-0.8.7 wheel-0.37.1 WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: Ignoring invalid distribution -ediapipe (/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages) WARNING: You are using pip version 21.2.3; however, version 22.1.2 is available. You should consider upgrading via the '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 -m pip install --upgrade pip' command. [tm@TM blender-3.0.0-linux-x64]$
When running again the problem persists: [tm@TM blender-3.0.0-linux-x64]$ ./blender Read prefs: /home/tm/.config/blender/3.0/config/userpref.blend BlendArMocap-main - Initializing... BlendArMocap-main - add-on path: /home/tm/.config/blender/3.0/scripts/addons/BlendArMocap-main BlendArMocap-main - blender bin: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/blender, blender version: (3, 0, 0) BlendArMocap-main - python exe: /home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/bin/python3.9 (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) (Dependency(module='opencv-contrib-python>=4.5.5.64', package=None, name='cv2', pkg='opencv_contrib_python'), Dependency(module='protobuf>=3.11.4,<=3.20.0', package=None, name='google.protobuf', pkg='protobuf'), Dependency(module='mediapipe>=0.8.10', package=None, name='mediapipe', pkg='mediapipe')) BlendArMocap-main - Attempt to reload... BlendArMocap-main - Reload successful! Registing BlendArMocap
Try to access dependencies opencv-contrib-python>=4.5.5.64 ('4.6.0.66', '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/opencv-contrib-python') protobuf>=3.11.4,<=3.20.0 ('3.20.0', '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/protobuf') mediapipe>=0.8.10 ('0.8.7', '/home/tm/Documents/Downloads/blender-3.0.0-linux-x64/3.0/python/lib/python3.9/site-packages/mediapipe') Path to mov: /home/tm/Desktop/BG-1.1 Samsung for Mocap.mp4 OBSERVER ATTACHED TO UPDATE LISTENER RUNNING HAND DETECTION AS MODAL INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. Writing: /tmp/blender.crash.txt Segmentation fault (core dumped) [tm@TM blender-3.0.0-linux-x64]$
Will reply to your other suggestions in a bit.
Your extension appears in Blender only when running sudo ./blender, not ./blender.
Weird, this should only be an issue when installing the dependencies, maybe there is a permission issue? Can you provide a log message?
This issue disappeared. The addon is visible without running sudo ... not sure why the change happened.
Unlike your extension these do not have an uninstall software command, making removing the offending versions difficult.
Yes, there can be issues. The requirements can be fairly specific (which is a bummer). I included an "uninstall dependencies" button as sometimes it's required to use specific package versions. Using it may break other tools. Are the add-ons using mediapipe and open-cv running properly on your system? If so, could you check the mediapipe / open-cv-contrib versions or send me a link to their git?
The other mediapipe addons I had been using are changing quickly. Close2animation has gone off the radar. Carlos has a Blender mediapipe addon at https://github.com/carlosedubarreto/b3d_mocap_import. It requires a lot of downloads and I don't have it installed on a current Blender version.
I just tried BlendyPose in Blender 2.93 and it worked well for limited display of mediapipe's capability, though it crashes after finishing the video. BlendyPose has a new fork at https://github.com/SpectralVectors/PosePipe that I will try to install, just for testing. For some reason installing new addons in Blender in Fedora 36 is now problematic.
Your extension appears in Blender only when running sudo ./blender, not ./blender.
Weird, this should only be an issue when installing the dependencies, maybe there is a permission issue? Can you provide a log message?
This issue disappeared. The addon is visible without running sudo ... not sure why the change happened.
Unlike your extension these do not have an uninstall software command, making removing the offending versions difficult.
Yes, there can be issues. The requirements can be fairly specific (which is a bummer). I included an "uninstall dependencies" button as sometimes it's required to use specific package versions. Using it may break other tools. Are the add-ons using mediapipe and open-cv running properly on your system? If so, could you check the mediapipe / open-cv-contrib versions or send me a link to their git?
The other mediapipe addons I had been using are changing quickly. Close2animation has gone off the radar. Carlos has a Blender mediapipe addon at https://github.com/carlosedubarreto/b3d_mocap_import. It requires a lot of downloads and I don't have it installed on a current Blender version.
I just tried BlendyPose in Blender 2.93 and it worked well for limited display of mediapipe's capability, though it crashes after finishing the video. That BlendyPose uses mediapipe0.8.9.1, which is the same version that was giving trouble with BlendarMocap in Blender 3.2.1.
Attempting to change to mediapipe0.8.5 gave the following:
[tm@TM bin]$ python3.10 pip3 install mediapipe==8.5 Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement mediapipe==8.5 (from versions: 0.8.9.1, 0.8.10, 0.8.10.1) ERROR: No matching distribution found for mediapipe==8.5
Changing to the latest mediapipe0.8.10.1 in Blender3.2.1 gives a fullsize upside down output display with markers. After a few seconds Blender crashes again.
blender.crash.txt
BlendyPose has a new fork at https://github.com/SpectralVectors/PosePipe that I will try to install, just for testing. For some reason installing new addons in Blender in Fedora 36 is sometimes problematic. Maybe the problem is with Blender 3.0+ Another fellow on MacOS remarked on the web that clicking "Install" gave no error message, but did not install his addon. Same here on Fedora with some addons I'm trying. Maybe like BlendarMocap those addons also require sudo.
Your extension appears in Blender only when running sudo ./blender, not ./blender.
Weird, this should only be an issue when installing the dependencies, maybe there is a permission issue? Can you provide a log message?
This issue disappeared. The addon is visible without running sudo ... not sure why the change happened.
Unlike your extension these do not have an uninstall software command, making removing the offending versions difficult.
Yes, there can be issues. The requirements can be fairly specific (which is a bummer). I included an "uninstall dependencies" button as sometimes it's required to use specific package versions. Using it may break other tools. Are the add-ons using mediapipe and open-cv running properly on your system? If so, could you check the mediapipe / open-cv-contrib versions or send me a link to their git?
The other mediapipe addons I had been using are changing quickly. Close2animation has gone off the radar. Carlos has a Blender mediapipe addon at https://github.com/carlosedubarreto/b3d_mocap_import. It requires a lot of downloads and I don't have it installed on a current Blender version.
I just tried BlendyPose in Blender 2.93 and it worked well for limited display of mediapipe's capability, though it crashes after finishing the video. That BlendyPose uses mediapipe0.8.9.1, which is the same version that was giving trouble with BlendarMocap in Blender 3.2.1.
Attempting to change to mediapipe0.8.5 gave the following:
[tm@TM bin]$ python3.10 pip3 install mediapipe==8.5 Defaulting to user installation because normal site-packages is not writeable ERROR: Could not find a version that satisfies the requirement mediapipe==8.5 (from versions: 0.8.9.1, 0.8.10, 0.8.10.1) ERROR: No matching distribution found for mediapipe==8.5
Changing to the latest mediapipe0.8.10.1 in Blender3.2.1 gives a full-size upside down output display with markers. After a few seconds Blender crashes again.
blender.crash.txt
BlendyPose has a new fork at https://github.com/SpectralVectors/PosePipe that I will try to install, just for testing. For some reason installing new addons in Blender in Fedora 36 is sometimes problematic. Maybe the problem is with Blender 3.0+ Another fellow on MacOS remarked on the web that clicking "Install" gave no error message, but did not install his addon. Same here on Fedora with some addons I'm trying. Maybe like BlendArMocap those addons also require sudo.
Same error Ubuntu 22 - Blender 2.93.4
`BlendArMocap-main - Initializing... BlendArMocap-main - add-on path: /root/.config/blender/2.93/scripts/addons/BlendArMocap-main BlendArMocap-main - blender bin: /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/blender, blender version: (2, 93, 4) BlendArMocap-main - python exe: /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/bin/python3.9 BlendArMocap-main - Attempt to reload... BlendArMocap-main - Reload successful! Registing BlendArMocap
Try to access dependencies opencv-contrib-python>=4.5.5.64 ('4.6.0.66', '/mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/opencv-contrib-python') protobuf>=3.11.4,<=3.20.0 ('3.20.0', '/mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/protobuf') mediapipe>=0.8.10 ('0.8.10.1', '/mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe') Path to mov: /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/BKP_UBUNTU_20/Videos/test.mov 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 `
`# Blender 2.93.4, Commit date: 2021-08-31 09:23, Hash b7205031cec4 bpy.data.window_managers["WinMan"].addon_search = "mocap" # Property bpy.context.scene.m_cgtinker_mediapipe.detection_input_type = 'movie' # Property bpy.context.space_data.system_folders_active = 3 # Property bpy.context.space_data.system_folders_active = 2 # Property
backtrace
./blender(BLI_system_backtrace+0x20) [0xa593390] ./blender() [0xf5faed] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7f03fce76520] ./blender() [0x1348949] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN6tflite8Subgraph11CleanupNodeEi+0x4d) [0x7f03b4c6bf2d] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN6tflite8SubgraphD1Ev+0x4f) [0x7f03b4c6bfaf] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN6tflite8SubgraphD0Ev+0x12) [0x7f03b4c6c212] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN6tflite11InterpreterD1Ev+0x1ef) [0x7f03b4c768af] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe4api226InferenceCalculatorCpuImpl5CloseEPNS_17CalculatorContextE+0x2c) [0x7f03b468b42c] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe14CalculatorNode9CloseNodeERKN4absl12lts_202103246StatusEb+0x7b9) [0x7f03b4dbb969] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe14CalculatorNode11ProcessNodeEPNS_17CalculatorContextE+0x1de) [0x7f03b4dbbe2e] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe8internal14SchedulerQueue17RunCalculatorNodeEPNS_14CalculatorNodeEPNS_17CalculatorContextE+0xfb) [0x7f03b4db61bb] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe8internal14SchedulerQueue11RunNextTaskEv+0x81) [0x7f03b4db6d21] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe10ThreadPool9RunWorkerEv+0xc4) [0x7f03b4deef74] /mnt/071adcfc-9953-4003-b9fe-84b52c8fa60d/Blender/blender-2.93.4-linux-x64/2.93/python/lib/python3.9/site-packages/mediapipe/python/_framework_bindings.cpython-39-x86_64-linux-gnu.so(_ZN9mediapipe10ThreadPool12WorkerThread10ThreadBodyEPv+0x33d) [0x7f03b4def4fd] /lib/x86_64-linux-gnu/libc.so.6(+0x94b43) [0x7f03fcec8b43] /lib/x86_64-linux-gnu/libc.so.6(+0x126a00) [0x7f03fcf5aa00]
Python backtrace
`
Sorry for the multiple posts above - some strange thing with Github at that time. Fedora 36 seems better in that regard.
Most of the problems I mentioned in this issue have disappeared in Fedora 36 running Blender 3.3.1, probably thanks largely to upgrades especially in the development branch.
One problem that remains with some movies is that the video is shown upside down and therefore has little Mocap detection. For me this happens with higher res video from a Samsung Note5 camera. Some other internet and mobile camera movies work fine, with normal right-side-up display.
The only other issue is jittering of the mocap. Will try the smoothing you describe in the documentation. Am wondering whether the mediapipe smooth_landmarks and smooth_segmentation commands might be good selectable options. https://google.github.io/mediapipe/solutions/pose#smooth_landmarks
From all the informations I've gathered over the time the issue is usually based on either the mediapipe or the opencv binary. Sadly I can only recommend manual work in this case. The following informations are based on the current version on the main branch - I'll create a release soon.
- The current mediapipe version 0.9.1.0 comes with opencv-contrib-python 4.7.0.68
- opencv-contrib-python 4.7.0.68 may leads to binary issues - 4.5.5.64 seems to be more stable but it's not foolproof. On some system you may want to install opencv via your local package manager.
- In the current BlendArMocap version (main branch) the local user site-packages are getting imported (before the release I'll make it optional in the prefs, so you might have to toggle a boolean button).
- Make sure to not install any of mediapipe 0.8.x releases - they have corrupted dependency tree by default.
- Make sure to not have multiple opencv packages installed at one (like headless+opencv+opencvcontrib). To check it use the cmd
python3 -m pip freeze | grep cv
.
TL;DR Most likely you'll have to install dependencies manually and fix common linux issues:
// test if the default mp package does the trick
python3 -m pip install mediapipe==0.9.1.0
// try installing another opencv version
python3 -m pip uninstall opencv-contrib-python
// check for remains (sometimes pip fails and you have to remove them manually)
python3 -m pip freeze | grep cv
python3 -m pip install opencv-contrib-python==4.5.5.64
// if that still doesn't work, remove it and consider to install other cv2 versions or install it with your local package manger
Thanks for explaining this. After an upgrade to Fedora 37, running the command, "python3 -m pip freeze | grep cv" gave no output, which seems like a good result.