Multiple volumes using same data can cause crash/freeze #94715

Closed
opened 2022-01-07 14:58:45 +01:00 by Sebastien Loss · 10 comments

System Information
Operating system: macOS-12.1-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro Vega 64X OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.101

Blender Version
Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: f1cca30557
Worked: (newest version of Blender that worked as expected)

Short description of error
Volume objects with unique data block but pointing on same VDB sequence make blender crashes when scrubbing timeline

No issue when testing with --debug-depsgraph-no-threads

Exact steps for others to reproduce the error
volume_objects_bug.zip
Open file and scrub back and forth for few seconds(around 30 or so)


From scratch:
Open fresh default cube scene. Add a volume object. Import a openVDB sequence ( bake the quick smoke effect for example ).
Duplicate or instance your volume object like five times or more ( two times seems to work ??? ).
Go to volume data panel and make one object or more a single user of this block. ( needed to control the playback of each volume instance for example ).
So now scrub your timeline back and forth a couple of times until freeze blender :)

**System Information** Operating system: macOS-12.1-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro Vega 64X OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.7.101 **Blender Version** Broken: version: 3.0.0, branch: master, commit date: 2021-12-02 18:35, hash: `f1cca30557` Worked: (newest version of Blender that worked as expected) **Short description of error** Volume objects with unique data block but pointing on same VDB sequence make blender crashes when scrubbing timeline No issue when testing with ` --debug-depsgraph-no-threads` **Exact steps for others to reproduce the error** [volume_objects_bug.zip](https://archive.blender.org/developer/F12800963/volume_objects_bug.zip) Open file and scrub back and forth for few seconds(around 30 or so) --- From scratch: Open fresh default cube scene. Add a volume object. Import a openVDB sequence ( bake the quick smoke effect for example ). Duplicate or instance your volume object like five times or more ( two times seems to work ??? ). Go to volume data panel and make one object or more a single user of this block. ( needed to control the playback of each volume instance for example ). So now scrub your timeline back and forth a couple of times until freeze blender :)
Author

Added subscriber: @captaincavern

Added subscriber: @captaincavern

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

I wasn't able to reproduce this issue. Can you upload sample .blend file so I can double check?

I wasn't able to reproduce this issue. Can you upload sample .blend file so I can double check?
Author

{F12800963}Sure ! Here it is. Just open it with blender 3.0 or current 3.0.1 release candidate ( same problem ) and scratch the timeline a couple of times. Problem don't occurs in 2.93

{[F12800963](https://archive.blender.org/developer/F12800963/volume_objects_bug.zip)}Sure ! Here it is. Just open it with blender 3.0 or current 3.0.1 release candidate ( same problem ) and scratch the timeline a couple of times. Problem don't occurs in 2.93

Thanks for file, I can reproduce this issue

Not quite sure if this trace is only problem, sometimes I got some memory access exception instead, but sometimes it gets stuck on mutex lock it seems:

 	[External Code]	
>	blender.exe!BKE_volume_load(const Volume * volume, const Main * bmain) Line 815	C++

 	blender.exe!BKE_volume_min_max(const Volume * volume, blender::vec_base<float,3> & r_min, blender::vec_base<float,3> & r_max) Line 930	C++
 	blender.exe!GeometrySet::compute_boundbox_without_instances(blender::vec_base<float,3> * r_min, blender::vec_base<float,3> * r_max) Line 201	C++
 	blender.exe!BKE_object_boundbox_calc_from_evaluated_geometry(Object * ob) Line 3921	C++
 	blender.exe!object_sync_boundbox_to_original(Object * object_orig, Object * object_eval) Line 287	C
 	blender.exe!BKE_object_sync_to_original(Depsgraph * depsgraph, Object * object) Line 323	C
 	blender.exe!blender::deg::DepsgraphNodeBuilder::build_object::__l2::<lambda>(Depsgraph * depsgraph) Line 838	C++
 	[External Code]	
 	blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 120	C++
 	blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 132	C++
 	blender.exe!Task::operator()() Line 179	C++
 	blender.exe!tbb::internal::function_task<Task>::execute() Line 1060	C++
 	[External Code]	
 	blender.exe!VolumeFileCache::update_for_remove_user(VolumeFileCache::Entry & entry) Line 252	C++
 	blender.exe!VolumeFileCache::remove_user(VolumeFileCache::Entry & entry, const bool tree_user) Line 228	C++
 	blender.exe!VolumeGrid::~VolumeGrid() Line 302	C++
 	[External Code]	
 	blender.exe!VolumeGridVector::clear_all() Line 486	C++
 	blender.exe!BKE_volume_unload(Volume * volume) Line 884	C++
 	blender.exe!BKE_volume_eval_geometry(Depsgraph * depsgraph, Volume * volume) Line 1068	C++
 	blender.exe!blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock::__l27::<lambda>(Depsgraph * depsgraph) Line 1616	C++
 	[External Code]	
 	blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 120	C++
 	blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 132	C++
 	blender.exe!Task::operator()() Line 179	C++
 	blender.exe!tbb::internal::function_task<Task>::execute() Line 1060	C++
 	[External Code]	
 	blender.exe!tbb::task::wait_for_all() Line 821	C++
 	blender.exe!tbb::internal::task_group_base::wait() Line 168	C++
 	blender.exe!tbb_task_pool_work_and_wait(TaskPool * pool) Line 254	C++
 	blender.exe!BLI_task_pool_work_and_wait(TaskPool * pool) Line 501	C++
 	blender.exe!blender::deg::deg_evaluate_on_refresh(blender::deg::Depsgraph * graph) Line 401	C++
 	blender.exe!deg_flush_updates_and_refresh(blender::deg::Depsgraph * deg_graph) Line 61	C++
 	blender.exe!DEG_evaluate_on_framechange(Depsgraph * graph, float frame) Line 88	C++
 	blender.exe!BKE_scene_graph_update_for_newframe_ex(Depsgraph * depsgraph, const bool clear_recalc) Line 2664	C
 	blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph) Line 2712	C
 	blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1729	C
 	blender.exe!screen_animation_step_invoke(bContext * C, wmOperator * UNUSED_op, const wmEvent * event) Line 4755	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1313	C
 	blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2314	C
 	blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2667	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 2994	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3129	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3725	C
 	blender.exe!WM_main(bContext * C) Line 642	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 564	C
 	[External Code]	
Thanks for file, I can reproduce this issue Not quite sure if this trace is only problem, sometimes I got some memory access exception instead, but sometimes it gets stuck on mutex lock it seems: ``` [External Code] > blender.exe!BKE_volume_load(const Volume * volume, const Main * bmain) Line 815 C++ blender.exe!BKE_volume_min_max(const Volume * volume, blender::vec_base<float,3> & r_min, blender::vec_base<float,3> & r_max) Line 930 C++ blender.exe!GeometrySet::compute_boundbox_without_instances(blender::vec_base<float,3> * r_min, blender::vec_base<float,3> * r_max) Line 201 C++ blender.exe!BKE_object_boundbox_calc_from_evaluated_geometry(Object * ob) Line 3921 C++ blender.exe!object_sync_boundbox_to_original(Object * object_orig, Object * object_eval) Line 287 C blender.exe!BKE_object_sync_to_original(Depsgraph * depsgraph, Object * object) Line 323 C blender.exe!blender::deg::DepsgraphNodeBuilder::build_object::__l2::<lambda>(Depsgraph * depsgraph) Line 838 C++ [External Code] blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 120 C++ blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 132 C++ blender.exe!Task::operator()() Line 179 C++ blender.exe!tbb::internal::function_task<Task>::execute() Line 1060 C++ [External Code] blender.exe!VolumeFileCache::update_for_remove_user(VolumeFileCache::Entry & entry) Line 252 C++ blender.exe!VolumeFileCache::remove_user(VolumeFileCache::Entry & entry, const bool tree_user) Line 228 C++ blender.exe!VolumeGrid::~VolumeGrid() Line 302 C++ [External Code] blender.exe!VolumeGridVector::clear_all() Line 486 C++ blender.exe!BKE_volume_unload(Volume * volume) Line 884 C++ blender.exe!BKE_volume_eval_geometry(Depsgraph * depsgraph, Volume * volume) Line 1068 C++ blender.exe!blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock::__l27::<lambda>(Depsgraph * depsgraph) Line 1616 C++ [External Code] blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 120 C++ blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 132 C++ blender.exe!Task::operator()() Line 179 C++ blender.exe!tbb::internal::function_task<Task>::execute() Line 1060 C++ [External Code] blender.exe!tbb::task::wait_for_all() Line 821 C++ blender.exe!tbb::internal::task_group_base::wait() Line 168 C++ blender.exe!tbb_task_pool_work_and_wait(TaskPool * pool) Line 254 C++ blender.exe!BLI_task_pool_work_and_wait(TaskPool * pool) Line 501 C++ blender.exe!blender::deg::deg_evaluate_on_refresh(blender::deg::Depsgraph * graph) Line 401 C++ blender.exe!deg_flush_updates_and_refresh(blender::deg::Depsgraph * deg_graph) Line 61 C++ blender.exe!DEG_evaluate_on_framechange(Depsgraph * graph, float frame) Line 88 C++ blender.exe!BKE_scene_graph_update_for_newframe_ex(Depsgraph * depsgraph, const bool clear_recalc) Line 2664 C blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph) Line 2712 C blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1729 C blender.exe!screen_animation_step_invoke(bContext * C, wmOperator * UNUSED_op, const wmEvent * event) Line 4755 C blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1313 C blender.exe!wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2314 C blender.exe!wm_handlers_do_keymap_with_keymap_handler(bContext * C, wmEvent * event, ListBase * handlers, wmEventHandler_Keymap * handler, wmKeyMap * keymap, const bool do_debug_handler) Line 2667 C blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 2994 C blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3129 C blender.exe!wm_event_do_handlers(bContext * C) Line 3725 C blender.exe!WM_main(bContext * C) Line 642 C blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 564 C [External Code] ```
Richard Antalik changed title from Make single user on shared volume data sequence freezes blender when scrubbing / play timeline to Multiple volumes using same data can cause crash/freeze 2022-01-17 16:15:53 +01:00

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'

This issue was referenced by 0039432cfc

This issue was referenced by 0039432cfcc596d9c97b30db30fd997c750fd0fb

This issue was referenced by b776c46d2f

This issue was referenced by b776c46d2f67dffd36e2a68a1152c0f0d7bef7e6

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-01-17 20:42:18 +01:00
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#94715
No description provided.