Crash when appending object using callack from enum prop, followed by undo #82361
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#82361
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-117-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.90.1, branch: master, commit date: 2020-09-23 06:43, hash:
3e85bb34d0
Worked: 2.82
Short description of error
This is a follow-up to https://developer.blender.org/T80217
I'm using the update callback of an enum prop to append an object from an external blend file, then link it to the master collection.
This is a fairly standard procedure for addons using
layout.template_icon_view()
to "load assets".In the previous report, it was suggested to not call an operator from the update callback to prevent crashes, if the user were to undo after such an "asset load".
This new report then avoids using an operator and instead uses a dedicated
append_object_function()
.Unfortunately the crash is still happening as soon as one does an undo.
As in the previous report, appending using
layout.operator()
works fine. All of this worked up until 2.82 and 2.83 was the first to crash.If the suggestion now is to not do any database manipulation from update callbacks, then what is the recommended way to bring in external assets using template icon views? If this isn't possible anymore, than it seems this layout element is a lot less useful, and addons that have been building on this ability for years are now a serious cause of blender instability and potential for data loss.
append_obj_undo_crash_from_update_callback_of_enum_prop.zip
Exact steps for others to reproduce the error
Added subscriber: @MACHIN3
Added subscriber: @lichtwerk
Please read through #81345 (ID user decrement error when removing object which is referred to with a PointerProperty) starting:
Added subscriber: @Pinnhead
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 457.09
Blender Version
Broken: version: 2.90.1, branch: master, commit date: 2020-09-23 06:43, hash:
3e85bb34d0
Exactly the same behaviour.
Changed status from 'Needs Triage' to: 'Archived'
Nuf said.
Read all of this, still don't have a working solution to prevent Blender crashing when appending using the
layout.template_icon_view()
as the interface (followed by undo)So, there's a problem now.
I've tried calling the op from a timer and it's still crashing, will report that separately.
To me this looks like it should be something that is supported by the API. It's a massively popular use case, and shouldn't crash.
Added subscriber: @pauanyu_blender
I guess you need a separate operator [not called by a timer] that you need to execute "by hand".
So you choose your icon, then execute the operator (e.g. by button).
Not the nicest thing in the world, but a compromise.