Crash after running bpy.ops.object.duplicate()
followed by Undo #86293
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#86293
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.19041-SP0 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71
Blender Version
Broken: version:
8dec6452f2
02948a2cab
Worked:
Short description of error
Crash after undoing
bpy.ops.object.duplicate()
.Exact steps for others to reproduce the error
Keep the default scene.
Deselect the Cube by clicking next to it.
Select the Cube.
Switch to Scripting, run
bpy.ops.object.duplicate()
in the Python console.Edit->Undo
I've also noticed that when I start Blender, and run
bpy.ops.object.duplicate()
immediately with the Cube already selected, that there is no entry in the Undo history. Edit->Undo is grayed out. Butbpy.ops.object.duplicate.bl_options
contains'UNDO'
, so I would expect an entry in the Undo history.The same happens with
bpy.ops.object.duplicate_move()
. However, when I use Ctrl+D, Undo works as expected.Edit: I just found the "Legacy Undo" option and #60695. But even with legacy undo, there's still no undo history entry after running
bpy.ops.object.duplicate()
.Possibly a duplicate of #80759.
Added subscriber: @ndh
Crash after `bpy.ops.object.duplicate()`to Crash after running `bpy.ops.object.duplicate()` followed by UndoAdded subscriber: @rjg
Changed status from 'Needs Triage' to: 'Confirmed'
I can reproduce the crash.
Calling
bpy.ops.ed.undo_push()
afterduplicate()
seems to be a workaround.@rjg Thanks for looking into it.
I think you might have accidentally reverted my edit (https:*developer.blender.org/transactions/detail/PHID-XACT-TASK-vjxh4mwbn767gkq/). Did you intend that?
There are no timers involved so I don't think this is the same issue.
@ndh No that wasn't intended.
Added subscriber: @lichtwerk
Will check on this
Added subscriber: @APEC
That is interesting, because I use this command in my addon that adds menu "Duplicate" for RMB object selected in Outliner and there is no crush after undo command.
Link for addon https://devtalk.blender.org/t/outliner-gsoc-follow-up-feedback/15948/80
The code looks very simple:
Hot key can be bound as well for Outliner and for 3dView.
Investigating the UNDO as we speak.
Works fine executing from the text editor btw (so the undo push seems to only be missing when executing from the py console).
This issue was referenced by
f3fb1df192
note: with Legacy Undo, it does not crash, but there is no Undo push, true.
#77557 (Python Operators that add/remove ID data without an undo step crash Blender) is related
Changed status from 'Confirmed' to: 'Resolved'