Operator (e.g bpy.ops.object.data_transfer()
) crashes when using context.copy()
via addon
#112299
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#112299
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: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 536.99
Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-09-12 16:48, hash:
b7ba7663a75d
Worked: version: 3.6.2, branch: blender-v3.6-release, commit date: 2023-08-16 16:43, hash:
e53e55951e7a
This was caused by
6ba0346797
Short description of error
When using the operator
bpy.ops.object.data_transfer()
with a context override as defined in Blender Docs Blender will crash when invoking this from an add-on but doesn't crash if a similar script is executed in the text editor.I discoverd this while working on a new add-on for the Blender Studio Pipeline.
Exact steps for others to reproduce the error
Test Vertex Transfer
OperatorI have also attached a Crash Log from a debug build below.
Can confirm. Crashed in
ui_context_button_active
. Will check how exactly it's triggering...Looks like context.copy() somehow messed up theIt can be that theregion
argument into something invalid to be passed intoui_context_button_active
, that's what causing you the crash.region = data->menu->region;
being invalid inui_context_button_active
. @JulianEisel or maybe @ideasman42 could you guys take a look at this function?You don't need to copy context in the new override mechanism. Just assign what you want to override, and leave anything else as is, it will be copied from current context, so this works:
We still have
context.copy()
in the example here https://docs.blender.org/api/4.0/bpy.ops.htmlWill raise prio here since it is a recent regression.
This was caused by
6ba0346797
@joshm-2
@brecht
#109858 might be related
`bpy.ops.object.data_transfer()` crashes when using `context.copy()` via addonto Operator (e.g `bpy.ops.object.data_transfer()`) crashes when using `context.copy()` via addonInvestigating now.
One difference when running as an addon is that the active area is a menu instead of the text editor. Running a debugger, it looks like a
uiBlock
in the menu has a screwed up list of buttons, starting at a reasonable address and ending at0x0000010200000000
. Additionally, when we get tointerface_handlers.cc:8823
, the first button we iterate over acts just fine, but itsprev
andnext
fields are both set to0x3f800001bf800001
. These values probably aren't garbage, they're the same every time. The next iteration of the loop then tries to read from that address, causing a segfault. I don't know enough about what to expect here to know why this might be happening.Thanks for investigating @joshm-2. This seems to be caused by a pre-existing issue that was exposed by the addition of
context.property
. I'll commit a fix.