Delete scene operator used in script crashes blender #44376
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
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-addons#44376
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?
pyth_bug.blend
I made this simple operator that just executes delete scene operator:
It works fine when I run it from 3D View. But if I run it from properties area Blender will crash, while the original Delete Scene operator works fine.
To reproduce:
Open the file
Press Run Script
Go over the properties area with the mouse pointer
Search for 'Delete Scene Doop'
Press enter
The crash should happen
Blender version: 2.74
OS X 10.9.5 (Macbook Retina)
Changed status to: 'Open'
Added subscriber: @aivanis
Added subscriber: @Blendify
Added subscriber: @Sergey
Added subscriber: @ideasman42
@ideasman42, do you mind having a look here?
Added subscriber: @brecht
Campbell, do you think this is an acceptable fix? I don't think there's a good way to remove the scene from the context.
This issue was referenced by blender/blender@77e6a001a9
Changed status from 'Open' to: 'Resolved'
Closed by commit blender/blender@77e6a001a9.
@brecht, thanks for looking into this... your suggested fix solves this bug in a pretty direct way,
but we had other bugs reported regarding stale pointers in the button-space and further API calls could still crash.
so I prefer to go for a more general fix which we can apply for other errors accessing data from buttons context, also it could get slow with 100's or scenes.
Since unlinking the scene is already checking the button space's
pinid
, I've added a callback which runs fromBKE_spacedata_id_unref
to avoid bad level calls.