Segmentation fault using OpenCV as Blender script, but not as stand alone script #110842
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#110842
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.19.0-50-generic-x86_64-with-glibc2.35 64 Bits, WAYLAND UI
Graphics card: NVIDIA GeForce RTX 4080/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 525.125.06
Blender Version
Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash:
8bda729ef4dc
Worked: (newest version of Blender that worked as expected)
Short description of error
Segmentation fault using OpenCV as Blender script, but not as stand alone script
Exact steps for others to reproduce the error
PART ONE: Setup (after Blender install)
1.1 - Install OpenCV for Blender Pyhon
/home/me/blender/blender-3.6.1-linux-x64/3.6/python/bin$ ./python3.10 -m pip install opencv-contrib-python
1.2 - Check insllation
/home/me/blender/blender-3.6.1-linux-x64/3.6/python/bin$ ./python3.10 -m pip list
Result:
PART TWO: Testing WebCam ruuning testOpenCV.py (attached) from Blender Python but still ouside Blender
2.1 - Runing
./python3.10 ../../../testOpenCV.py
Result:
2.2 - Running with GDB
/home/me/blender/blender-3.6.1-linux-x64/3.6/python/bin$ gdb ./python3.10
Result:
PART THREE: Running inside Blender
3.1 - Run Blender (no root privileges).
Result:
cat /tmp/blender.crash.txt
3.2 - Running with GDB
/home/me/blender/blender-3.6.1-linux-x64/$ gdb ./blender
GDB runing causes segmentation fault
GDB backtrace
PART FOUR: Additional information
Seems to be eventually crashing at some X11 calls. It could be that xkb fails to grab any keyboard device, or it could also be the bug in the xkb library from your OpenCV.
I'd suggest report this to OpenCV and see if they have anything to say about it.
No activity for more than a week. As per the tracker policy we assume the issue is gone and can be closed.
Thanks again for the report. If the problem persists please open a new report with the required information.
This problem persists and is frustrating because the last version of Blender from the official Blender project repository that doesn't crash on Linux (tested on Ubuntu and Manjaro linux) is Blender 3.3 LTS, which is no longer supported.
Blender crashes even with this simple script:
import cv2
cv2.namedWindow('Test')
I haven't experienced this problem on Windows OS.
BTW: Manjaro compiled Blender 4.2.1 installed via package manager (pacman in Manjaro linux) works without problems, but only with python and its modules installed via package manager (in my case python version 3.12.5) not via pip.
@Robert-Bohdal hi, could you open a new report with necessary info?