bpy.ops.fluid.free_all() can cause a crash #89063
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#89063
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.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.77
Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash:
84da05a8b8
Worked: (newest version of Blender that worked as expected)
Short description of error
python script to free and re-bake smoke can cause a crash in 2.9x
Exact steps for others to reproduce the error
The description of this bug is clearly documented along with the example blend file in this blender stackexchange question .
If I comment out the lines that contain:
in the following script, and instead manually free the bakes, all is fine. Otherwise the application crashes with console messages like:
even if run from cmd line as Administrator
dual smoke.blend
Added subscriber: @jamestomk
Added subscriber: @rjg
Added subscriber: @PratikPB2123
Changed status from 'Needs Triage' to: 'Confirmed'
@rjg can you reproduce the crash?
I can replicate this.
I can also reproduce this in master. There appears to be a use-after-free according to ASAN in 3.0. I haven't had the time to check with an 2.93 LTS + ASAN build yet.
Issues appears to be the same for 2.93.
Edi: Since I currently don't have time to investigate this further and I'm not sure if the
physics_fluid.c
or WindowManager code is at fault here, I'm tagging both the Physics and UI module.Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
Added subscriber: @hal9000
Added subscriber: @Tiok
Added subscriber: @dfelinto
Thanks for the report. Marking this as known issue since it depends on the old particle settings which is end of life .
Just noting this still crashes in current main (maybe for other reasons because I had a different stacktrace), but it still crashes.
bpy.ops.fluid.bake_data()
from the Interface locks the UI, doing this from a script [the operator I mean] should probably poll if jobs are running.eureka -- gracias Philipp! sure enough, and oddly the following code
is_job_running('COMPOSITE')
works, even though "job is running" isn't printed (is_job_running returns False):UPDATE: Stranger still, if I just use the code:
which is what the previous effectively does, the program again crashes.
and in fact what works is actually all in how fast this script calls free(), by a delay before calling free_all():