crash when running python in background mode and calling region_3d.update() #102738
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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#102738
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 526.86
Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-11-23 18:35, hash:
f4e1f62c62
Short description of error
I need to run a python script in background mode, without GUI. The purpose is to unwrap uv from top view of some loaded object & texture. To do that, I use the project_from_view operation after setting the view to TOP. As I saw in the forums, I need to run region_3d.update() between those calls so that the top view operation takes effect, and calling this function crashes blender with EXCEPTION_ACCESS_VIOLATION .
Note that running this code while Blender is open, worksperfectly, however, when I run it in background mode it crashes
Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
blender should crash with a crash report, attached a sample, showing that the update() is to blame.
untitled.blend
untitled.crash.txt
crash_repro.py.txt
crash_repro.py
Added subscriber: @Firasshama
Added subscriber: @mano-wii
Changed status from 'Needs Triage' to: 'Confirmed'
The crash is because
Space.region_3d.update()
internally calls the GPU API without having GPU context.(See
view3d_winmatrix_set
,GPU_matrix_ortho_set
, orGPU_matrix_frustum_set
).Added subscriber: @Raimund58
I don't consider this a bug. Calling an operator from background can be expected to lead to these issues. As operators might require the GPU and the GPU is only available when running with UI. The region 3d is an editor structure and is expected to be run with UI.