Blender 2.77 Crash When Rigid Body Cache 'Bake' Clicked #47971
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#47971
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 and graphics card
Dell Studio 1749 (64 bit)
Intel Core i5 CPU M 520 @ 2GHz 2 Cores, 4 Logical Processors
8.0 GB memory installed
MIcrosoft WIndows 10 Pro, ver 10.0.10586 Build 10586
ATI Mobility Radeon HD 5650
4 MB Graphics Memory
Blender Version
Broken: 2.77 -
22a2853
Worked: 2.76b
f337fea
Short description of error
Have ~ 14,000 Rigid Body objects. When press Rigid Body Cache 'Bake' - Blender immediately crashes. No time to see error message if any.
*Exact steps for others to reproduce the error
Create ~14,000 Rigid Body Ico Spheres (Active, Dynamic, Convex Hull, Base)
Save
Create animated mesh 'foot' (No armature or bones) (Dynamic, animated, Convex Hull Deform)
Save
Create 3D rectangular collision surface where Ico Spheres will land. (Passive, Convex Hull)
Save
During animation 'foot' walks across Ico Spheres leaving a track.
Press 'Rigid Body Cache' 'Bake'
Based on a (as simple as possible) attached .blend file with minimum amount of steps
Test_105_D_ Rigid Body Toes Respect Rock w Betterized Foot BUG REPORT.blend
Thanks! ... Blender is awesome!
Changed status to: 'Open'
Added subscriber: @wav_links
This issue was referenced by
bd0223b8fe
Added subscriber: @sindra1961
I suggest that you attach a more lightweight sample file.
Removed subscriber: @sindra1961
Added subscriber: @LukasTonne
Yes, this test file is unnecessarily big, the error still occurs with just one of the rigid bodies as well. That's why it says "as simple as possible" in the instructions!
That being said, the error seems to be a threading bug of the point cache. The
Bake
operator starts a job, which runs in the background until completed or cancelled. The operator meanwhile returns immediately. Now, when the operator returns, it triggers an undo push, which writes a.blend
file containing the memory (non-disk) point cache data. Due to the pointcache implementation writing to the same data during bake, the file writing uses an undefined memory state, and can crash when attempting to access information about internal data arrays of the cache, which are still being set up in another thread at that point.https://developer.blender.org/diffusion/B/browse/master/source/blender/blenloader/intern/writefile.c$1130
The point cache is considered broken in any case. Among lots of other issues, a job should not work on DNA data directly like this, but use separate data which only gets sync'd with DNA on completion. As a short term solution we could disable threading for point cache bake ...
Thanks both of you!
I can use Blender 2.76b for now, so no urgency, or need for special fix on my part.
Sorry file was unnecessarily bulky... would have simplified file more, but unsure what was causing problem so not certain what was safe to delete.
Would like to know when problem is fixed though so I can use new Blender version for this work.
I really appreciate Blender and all the work that's gone into it. Nothing like being able to demonstrate exactly what you see in your mind...something words just don't do!
See comment here
bd0223b8fe
, this change probably awakened the dormant race condition in point cache ...This issue was referenced by
74e40663da
Changed status from 'Open' to: 'Resolved'
Added subscriber: @brecht
The UI is locked during bake, so generally it should be thread safe, just this undo push slipped through.
I've now changed the bake operator to work like the render operator, it keeps running as a modal operator until the job is finished. That's also generally more correct, as we want all changes made by the bake job to be included in the undo push.