Mantaflow instant crash if noise baked with adaptive domain #79009

Closed
opened 2020-07-17 03:40:59 +02:00 by Mark Spink · 9 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-16 00:24, hash: 75a09ba2ed
Worked: 2.82/2.82a

Short description of error
[Mantaflow instant crash if noise baked with adaptive domain enabled.]

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]
Bake the attached without, and then with 'adaptive domain' enabled; Blender should crash on attempting to bake noise if adaptive domain is enabled (did on all 3 of my machines anyway).
In all cases I changed the cache type to 'modular' and enabled 'Is Resumable', I don't know if this makes any difference or not.

I was testing to see if #78243 was actually fixed, it would appear so, but however, if 'adaptive domain' is used it would still appear to be deeply broken.

Here's what it looks like:

Adaptive_Noise_Crash.mp4

First time without adaptive domain enabled: no crash. Every time with adaptive domain enabled: crashes blender.

Here's the scene file-
Noise_Adaptive_Crash.blend

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48 **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-16 00:24, hash: `75a09ba2ed` Worked: 2.82/2.82a **Short description of error** [Mantaflow instant crash if noise baked with adaptive domain enabled.] **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)] Bake the attached without, and then with 'adaptive domain' enabled; Blender should crash on attempting to bake noise if adaptive domain is enabled (did on all 3 of my machines anyway). In all cases I changed the cache type to 'modular' and enabled 'Is Resumable', I don't know if this makes any difference or not. I was testing to see if #78243 was actually fixed, it would appear so, but however, if 'adaptive domain' is used it would still appear to be deeply broken. Here's what it looks like: [Adaptive_Noise_Crash.mp4](https://archive.blender.org/developer/F8700429/Adaptive_Noise_Crash.mp4) First time without adaptive domain enabled: no crash. Every time with adaptive domain enabled: crashes blender. Here's the scene file- [Noise_Adaptive_Crash.blend](https://archive.blender.org/developer/F8700570/Noise_Adaptive_Crash.blend)
Author

Added subscriber: @marks-4

Added subscriber: @marks-4

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Aborting: Grid interpol dim [42,42,42] : index -2147481842 out of bound
Error raised in C:\Blender-git\1\extern\mantaflow\helper\util\interpol.h:46

>	blender.exe!Manta::Error::Error(const std::string & s) Line 56	C++

 	blender.exe!Manta::checkIndexInterpol(const Manta::Vector3D<int> & size, __int64 idx) Line 46	C++
 	blender.exe!Manta::interpol<float>(const float * data, const Manta::Vector3D<int> & size, const int Z, const Manta::Vector3D<float> & pos) Line 103	C++
 	blender.exe!Manta::Grid<float>::getInterpolatedHi(const Manta::Vector3D<float> & pos, int order) Line 575	C++
 	blender.exe!Manta::SemiLagrange<float>::op(int i, int j, int k, const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & dst, const Manta::Grid<float> & src, float dt, bool isLevelset, int orderSpace, int orderTrace) Line 67	C++
 	blender.exe!Manta::SemiLagrange<float>::operator()(const tbb::blocked_range<__int64> & __r) Line 135	C++
 	blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::run_body(tbb::blocked_range<__int64> & r) Line 116	C++
 	blender.exe!tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type>>::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>,tbb::blocked_range<__int64>>(tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const> & start, tbb::blocked_range<__int64> & range) Line 424	C++
 	blender.exe!tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>,tbb::blocked_range<__int64>>(tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const> & start, tbb::blocked_range<__int64> & range) Line 257	C++
 	blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::execute() Line 143	C++
 	[External Code]	
 	blender.exe!tbb::task::spawn_root_and_wait(tbb::task & root) Line 799	C++
 	blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::run(const tbb::blocked_range<__int64> & range, const Manta::SemiLagrange<float> & body, const tbb::auto_partitioner & partitioner) Line 96	C++
 	blender.exe!tbb::parallel_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>>(const tbb::blocked_range<__int64> & range, const Manta::SemiLagrange<float> & body) Line 202	C++
 	blender.exe!Manta::SemiLagrange<float>::run() Line 147	C++
 	blender.exe!Manta::SemiLagrange<float>::SemiLagrange<float>(const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & dst, const Manta::Grid<float> & src, float dt, bool isLevelset, int orderSpace, int orderTrace) Line 51	C++
 	blender.exe!Manta::fnAdvectSemiLagrange<Manta::Grid<float>>(Manta::FluidSolver * parent, const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & orig, int order, float strength, int orderSpace, int clampMode, int orderTrace) Line 1022	C++
 	blender.exe!Manta::advectSemiLagrange(const Manta::FlagGrid * flags, const Manta::MACGrid * vel, Manta::GridBase * grid, int order, float strength, int orderSpace, bool openBounds, int boundaryWidth, int clampMode, int orderTrace) Line 1446	C++
 	blender.exe!Manta::_W_1(_object * _self, _object * _linargs, _object * _kwds) Line 1503	C++
 	[External Code]	
 	blender.exe!MANTA::runPythonString(std::vector<std::string,std::allocator<std::string>> commands) Line 595	C++
 	blender.exe!MANTA::bakeNoise(FluidModifierData * fmd, int framenr) Line 1468	C++
 	blender.exe!manta_bake_noise(MANTA * fluid, FluidModifierData * fmd, int framenr) Line 143	C++
 	blender.exe!BKE_fluid_modifier_processDomain(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me, const int scene_framenr) Line 4088	C
 	blender.exe!BKE_fluid_modifier_process(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) Line 4117	C
 	blender.exe!BKE_fluid_modifier_do(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) Line 4135	C
 	blender.exe!modifyMesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) Line 130	C
 	blender.exe!BKE_modifier_modify_mesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) Line 992	C
 	blender.exe!mesh_calc_modifiers(Depsgraph * depsgraph, Scene * scene, Object * ob, int useDeform, const bool need_mapping, const CustomData_MeshMasks * dataMask, const int index, const bool use_cache, const bool allow_shared_mesh, Mesh * * r_deform, Mesh * * r_final) Line 1187	C
 	blender.exe!mesh_build_data(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask, const bool need_mapping) Line 1805	C
 	blender.exe!makeDerivedMesh(Depsgraph * depsgraph, Scene * scene, Object * ob, BMEditMesh * em, const CustomData_MeshMasks * dataMask) Line 1920	C
 	blender.exe!BKE_object_handle_data_update(Depsgraph * depsgraph, Scene * scene, Object * ob) Line 194	C
 	blender.exe!BKE_object_eval_uber_data(Depsgraph * depsgraph, Scene * scene, Object * ob) Line 385	C
 	[External Code]	
 	blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 116	C++
 	blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 128	C++
 	blender.exe!Task::()::__l2::<lambda>() Line 118	C++
 	blender.exe!tbb::interface7::internal::delegated_function<void <lambda>(void) const ,void>::operator()() Line 94	C++
 	[External Code]	
 	blender.exe!tbb::interface7::internal::isolate_impl<void,void <lambda>(void) const>(const Task::()::__l2::void <lambda>(void) & f) Line 161	C++
 	blender.exe!tbb::interface7::this_task_arena::isolate<void <lambda>(void)>(const Task::()::__l2::void <lambda>(void) & f) Line 396	C++
 	blender.exe!Task::operator()() Line 122	C++
 	blender.exe!tbb::internal::function_task<Task>::execute() Line 1049	C++
 	[External Code]	
 	blender.exe!tbb::task::wait_for_all() Line 810	C++
 	blender.exe!tbb::internal::task_group_base::wait() Line 168	C++
 	blender.exe!tbb_task_pool_work_and_wait(TaskPool * pool) Line 253	C++
 	blender.exe!BLI_task_pool_work_and_wait(TaskPool * pool) Line 500	C++
 	blender.exe!blender::deg::deg_evaluate_on_refresh(blender::deg::Depsgraph * graph) Line 400	C++
 	blender.exe!DEG_evaluate_on_framechange(Main * bmain, Depsgraph * graph, float ctime) Line 83	C++
 	blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph, Main * bmain) Line 1573	C
 	blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1618	C
 	blender.exe!fluid_bake_sequence(FluidJob * job) Line 311	C
 	blender.exe!fluid_bake_startjob(void * customdata, short * stop, short * do_update, float * progress) Line 449	C
 	blender.exe!do_job_thread(void * job_v) Line 398	C
 	blender.exe!tslot_thread_start(void * tslot_p) Line 227	C++
Aborting: Grid interpol dim [42,42,42] : index -2147481842 out of bound Error raised in C:\Blender-git\1\extern\mantaflow\helper\util\interpol.h:46 ``` > blender.exe!Manta::Error::Error(const std::string & s) Line 56 C++ blender.exe!Manta::checkIndexInterpol(const Manta::Vector3D<int> & size, __int64 idx) Line 46 C++ blender.exe!Manta::interpol<float>(const float * data, const Manta::Vector3D<int> & size, const int Z, const Manta::Vector3D<float> & pos) Line 103 C++ blender.exe!Manta::Grid<float>::getInterpolatedHi(const Manta::Vector3D<float> & pos, int order) Line 575 C++ blender.exe!Manta::SemiLagrange<float>::op(int i, int j, int k, const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & dst, const Manta::Grid<float> & src, float dt, bool isLevelset, int orderSpace, int orderTrace) Line 67 C++ blender.exe!Manta::SemiLagrange<float>::operator()(const tbb::blocked_range<__int64> & __r) Line 135 C++ blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::run_body(tbb::blocked_range<__int64> & r) Line 116 C++ blender.exe!tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type>>::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>,tbb::blocked_range<__int64>>(tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const> & start, tbb::blocked_range<__int64> & range) Line 424 C++ blender.exe!tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>,tbb::blocked_range<__int64>>(tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const> & start, tbb::blocked_range<__int64> & range) Line 257 C++ blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::execute() Line 143 C++ [External Code] blender.exe!tbb::task::spawn_root_and_wait(tbb::task & root) Line 799 C++ blender.exe!tbb::interface9::internal::start_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>,tbb::auto_partitioner const>::run(const tbb::blocked_range<__int64> & range, const Manta::SemiLagrange<float> & body, const tbb::auto_partitioner & partitioner) Line 96 C++ blender.exe!tbb::parallel_for<tbb::blocked_range<__int64>,Manta::SemiLagrange<float>>(const tbb::blocked_range<__int64> & range, const Manta::SemiLagrange<float> & body) Line 202 C++ blender.exe!Manta::SemiLagrange<float>::run() Line 147 C++ blender.exe!Manta::SemiLagrange<float>::SemiLagrange<float>(const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & dst, const Manta::Grid<float> & src, float dt, bool isLevelset, int orderSpace, int orderTrace) Line 51 C++ blender.exe!Manta::fnAdvectSemiLagrange<Manta::Grid<float>>(Manta::FluidSolver * parent, const Manta::FlagGrid & flags, const Manta::MACGrid & vel, Manta::Grid<float> & orig, int order, float strength, int orderSpace, int clampMode, int orderTrace) Line 1022 C++ blender.exe!Manta::advectSemiLagrange(const Manta::FlagGrid * flags, const Manta::MACGrid * vel, Manta::GridBase * grid, int order, float strength, int orderSpace, bool openBounds, int boundaryWidth, int clampMode, int orderTrace) Line 1446 C++ blender.exe!Manta::_W_1(_object * _self, _object * _linargs, _object * _kwds) Line 1503 C++ [External Code] blender.exe!MANTA::runPythonString(std::vector<std::string,std::allocator<std::string>> commands) Line 595 C++ blender.exe!MANTA::bakeNoise(FluidModifierData * fmd, int framenr) Line 1468 C++ blender.exe!manta_bake_noise(MANTA * fluid, FluidModifierData * fmd, int framenr) Line 143 C++ blender.exe!BKE_fluid_modifier_processDomain(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me, const int scene_framenr) Line 4088 C blender.exe!BKE_fluid_modifier_process(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) Line 4117 C blender.exe!BKE_fluid_modifier_do(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) Line 4135 C blender.exe!modifyMesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) Line 130 C blender.exe!BKE_modifier_modify_mesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) Line 992 C blender.exe!mesh_calc_modifiers(Depsgraph * depsgraph, Scene * scene, Object * ob, int useDeform, const bool need_mapping, const CustomData_MeshMasks * dataMask, const int index, const bool use_cache, const bool allow_shared_mesh, Mesh * * r_deform, Mesh * * r_final) Line 1187 C blender.exe!mesh_build_data(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask, const bool need_mapping) Line 1805 C blender.exe!makeDerivedMesh(Depsgraph * depsgraph, Scene * scene, Object * ob, BMEditMesh * em, const CustomData_MeshMasks * dataMask) Line 1920 C blender.exe!BKE_object_handle_data_update(Depsgraph * depsgraph, Scene * scene, Object * ob) Line 194 C blender.exe!BKE_object_eval_uber_data(Depsgraph * depsgraph, Scene * scene, Object * ob) Line 385 C [External Code] blender.exe!blender::deg::`anonymous namespace'::evaluate_node(const blender::deg::`anonymous-namespace'::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) Line 116 C++ blender.exe!blender::deg::`anonymous namespace'::deg_task_run_func(TaskPool * pool, void * taskdata) Line 128 C++ blender.exe!Task::()::__l2::<lambda>() Line 118 C++ blender.exe!tbb::interface7::internal::delegated_function<void <lambda>(void) const ,void>::operator()() Line 94 C++ [External Code] blender.exe!tbb::interface7::internal::isolate_impl<void,void <lambda>(void) const>(const Task::()::__l2::void <lambda>(void) & f) Line 161 C++ blender.exe!tbb::interface7::this_task_arena::isolate<void <lambda>(void)>(const Task::()::__l2::void <lambda>(void) & f) Line 396 C++ blender.exe!Task::operator()() Line 122 C++ blender.exe!tbb::internal::function_task<Task>::execute() Line 1049 C++ [External Code] blender.exe!tbb::task::wait_for_all() Line 810 C++ blender.exe!tbb::internal::task_group_base::wait() Line 168 C++ blender.exe!tbb_task_pool_work_and_wait(TaskPool * pool) Line 253 C++ blender.exe!BLI_task_pool_work_and_wait(TaskPool * pool) Line 500 C++ blender.exe!blender::deg::deg_evaluate_on_refresh(blender::deg::Depsgraph * graph) Line 400 C++ blender.exe!DEG_evaluate_on_framechange(Main * bmain, Depsgraph * graph, float ctime) Line 83 C++ blender.exe!BKE_scene_graph_update_for_newframe(Depsgraph * depsgraph, Main * bmain) Line 1573 C blender.exe!ED_update_for_newframe(Main * bmain, Depsgraph * depsgraph) Line 1618 C blender.exe!fluid_bake_sequence(FluidJob * job) Line 311 C blender.exe!fluid_bake_startjob(void * customdata, short * stop, short * do_update, float * progress) Line 449 C blender.exe!do_job_thread(void * job_v) Line 398 C blender.exe!tslot_thread_start(void * tslot_p) Line 227 C++ ```
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

@iss could you grab a thread-separated crash log ? #79013 (Blender crashes: OpenVDB math::Transform::read throws exception. )
edit: Reading it again, looks like the reports are very different.

@iss could you grab a thread-separated crash log ? #79013 (Blender crashes: OpenVDB math::Transform::read throws exception. ) edit: Reading it again, looks like the reports are very different.

Added subscriber: @sebbas

Added subscriber: @sebbas

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sebastián Barschkis self-assigned this 2020-07-20 18:40:23 +02:00

Just pushed 62a819202e which should fix the crash!

Just pushed 62a819202e79 which should fix the crash!
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
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#79009
No description provided.