Crash when appending object using operator called from template icon view, followed by undo #80217
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#80217
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: Linux-4.15.0-112-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21
Blender Version
Broken: version: 2.83.5, branch: master, commit date: 2020-08-19 06:07, hash:
c2b144df39
, 2.90 is also affectedShort description of error
I have an operator that appends an object from another file. Calling it and undoing right after, works as expected unless that same operator is called from an update function of an enum, storing preview collection items, as is done for template icon views. Blender will crash on 2.83.5 and 2.90.
append_obj_undo_crash_from_template_icon_view.zip
video demo
Exact steps for others to reproduce the error
Added subscriber: @MACHIN3
Added subscriber: @Pinnhead
Exactly the same behaviour in
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 452.06
Blender Version
Broken: version: 2.90.0 Beta, branch: master, commit date: 2020-08-25 16:00, hash:
21cb6f09ff
Added subscriber: @gendosplace
Confirm crash.
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 Super / NVIDIA Corporation 4.5.0 NVIDIA 452.06
Blender Version
2.83.5, branch: master, commit date: 2020-08-19 06:07, hash:
c2b144df39
Added subscriber: @rjg
@rjg Shouldn't this be BF Blender (2.90) too? It's confirmed two times to crash 2.90.
@MACHIN3 Phabricator doesn't let me tag more than one version. I can add both tags in the UI but one is discarded when I save the edit. Therefore, I tagged to lowest version since any fix for 2.83 will always have to be checked for inclusion into the current release as well.
Understood, thanks!
Changed status from 'Needs Triage' to: 'Confirmed'
This can be easily reproduced with the provided instructions.
base->object
inBKE_scene_object_base_flag_sync_from_base
wasNULL
.Added subscriber: @DanielGrauer
Added subscriber: @mont29
Changed status from 'Confirmed' to: 'Archived'
Answer is very simple: don't do this. Never ever call an operator from a property update function, this is begging for all kind of issues. Just don't.
@mont29 Perhaps this should be added to the Gotchas page, if it's a known limitation?
@rjg Good point, this page needs some updates for undo/redo section too actually.
Since this is crashing Blender, and since it never was was problem before 2.83, I feel like this warants more than "don't do this".
New undo code comes with more complexity and responsibility (old one, by nuking and reloading the whole blend file, was safer, since it was not possible to get invalid pointers out of it, if stored undo step was OK). Calling an operator from an update callback has never been recommended though, those callbacks are supposed to remain very fast and efficient, and as localized as possible. Especially messing with the Main database has always been rather bad idea, fact that it has been working previously was mere luck, definitively not by design.
Understood, thanks for clarifying!