Page MenuHome

Mantaflow instant crash if noise baked with adaptive domain
Closed, ResolvedPublic

Description

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: rB75a09ba2ed26
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 T78243 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:

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

Here's the scene file-

Event Timeline

Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Jul 17 2020, 4:36 AM

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++

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

Just pushed 62a819202e79 which should fix the crash!