Mantaflow - Crash when enabling guides #83777

Closed
opened 2020-12-14 23:02:48 +01:00 by til ation · 11 comments

System Information
Operating system: Linux-5.4.0-56-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: AMD RAVEN (DRM 3.35.0, 5.4.0-56-generic, LLVM 10.0.0) X.Org 4.6 (Core Profile) Mesa 20.0.8

Blender Version
Broken: version:

  • 2.92.0 Alpha, branch: master, commit date: 2020-12-14 15:44, hash: 010f44b855
  • 2.92.0 Alpha, branch: master, commit date: 2020-11-19 22:15, hash: fdd3032f8f
    Worked: 2.90.1, 2.91.0

Short description of error
When I enable "Guides" in the attached file blender crashes.

Exact steps for others to reproduce the error
Open the attached file and enable "Guides" in the mantaflow properties. manta09.blend

MANTA::readGuiding(MANTA * const this, FluidModifierData * fmd, int framenr, bool sourceDomain) (/home/dev/01-data/01-git/blender-git/blender/intern/mantaflow/intern/MANTA_main.cpp:1379)
manta_read_guiding(MANTA * fluid, FluidModifierData * fmd, int framenr, bool sourceDomain) (/home/dev/01-data/01-git/blender-git/blender/intern/mantaflow/intern/manta_fluid_API.cpp:99)
BKE_fluid_modifier_processDomain(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me, const int scene_framenr) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4022)
BKE_fluid_modifier_process(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4154)
BKE_fluid_modifier_do(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4172)
modifyMesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/modifiers/intern/MOD_fluid.c:130)
BKE_modifier_modify_mesh(ModifierData * md, const ModifierEvalContext * ctx, struct Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/modifier.c:1055)
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) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1200)
mesh_build_data(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask, const bool need_mapping) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1806)
makeDerivedMesh(Depsgraph * depsgraph, Scene * scene, Object * ob, BMEditMesh * em, const CustomData_MeshMasks * dataMask) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1944)
BKE_object_handle_data_update(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/object_update.c:193)
BKE_object_eval_uber_data(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/object_update.c:385)
std::__invoke_impl<void, void (*&)(Depsgraph*, Scene*, Object*), Depsgraph*, Scene*&, Object*&>(void (*&)(Depsgraph *, Scene *, Object *) __f) (/usr/include/c++/9/bits/invoke.h:60)
std::__invoke<void (*&)(Depsgraph*, Scene*, Object*), Depsgraph*, Scene*&, Object*&>(void (*&)(Depsgraph *, Scene *, Object *) __fn) (/usr/include/c++/9/bits/invoke.h:95)
std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul>)(std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> * const this, std::tuple<Depsgraph*&&> && __args) (/usr/include/c++/9/functional:400)
std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)>::operator()<Depsgraph*, void>(Depsgraph*&&)(std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> * const this) (/usr/include/c++/9/functional:484)
std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&)(const std::_Any_data & __functor,  __args#0) (/usr/include/c++/9/bits/std_function.h:300)
std::function<void (Depsgraph*)>::operator()(Depsgraph*) const(const std::function<void(Depsgraph*)> * const this,  __args#0) (/usr/include/c++/9/bits/std_function.h:688)
blender::deg::(anonymous namespace)::evaluate_node(const blender::deg::(anonymous namespace)::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:113)
blender::deg::(anonymous namespace)::deg_task_run_func(TaskPool * pool, void * taskdata) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:124)
**System Information** Operating system: Linux-5.4.0-56-generic-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: AMD RAVEN (DRM 3.35.0, 5.4.0-56-generic, LLVM 10.0.0) X.Org 4.6 (Core Profile) Mesa 20.0.8 **Blender Version** Broken: version: - 2.92.0 Alpha, branch: master, commit date: 2020-12-14 15:44, hash: `010f44b855` - 2.92.0 Alpha, branch: master, commit date: 2020-11-19 22:15, hash: `fdd3032f8f` Worked: 2.90.1, 2.91.0 **Short description of error** When I enable "Guides" in the attached file blender crashes. **Exact steps for others to reproduce the error** Open the attached file and enable "Guides" in the mantaflow properties. [manta09.blend](https://archive.blender.org/developer/F9508942/manta09.blend) ```lines MANTA::readGuiding(MANTA * const this, FluidModifierData * fmd, int framenr, bool sourceDomain) (/home/dev/01-data/01-git/blender-git/blender/intern/mantaflow/intern/MANTA_main.cpp:1379) manta_read_guiding(MANTA * fluid, FluidModifierData * fmd, int framenr, bool sourceDomain) (/home/dev/01-data/01-git/blender-git/blender/intern/mantaflow/intern/manta_fluid_API.cpp:99) BKE_fluid_modifier_processDomain(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me, const int scene_framenr) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4022) BKE_fluid_modifier_process(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4154) BKE_fluid_modifier_do(FluidModifierData * fmd, Depsgraph * depsgraph, Scene * scene, Object * ob, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/fluid.c:4172) modifyMesh(ModifierData * md, const ModifierEvalContext * ctx, Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/modifiers/intern/MOD_fluid.c:130) BKE_modifier_modify_mesh(ModifierData * md, const ModifierEvalContext * ctx, struct Mesh * me) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/modifier.c:1055) 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) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1200) mesh_build_data(Depsgraph * depsgraph, Scene * scene, Object * ob, const CustomData_MeshMasks * dataMask, const bool need_mapping) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1806) makeDerivedMesh(Depsgraph * depsgraph, Scene * scene, Object * ob, BMEditMesh * em, const CustomData_MeshMasks * dataMask) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/DerivedMesh.cc:1944) BKE_object_handle_data_update(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/object_update.c:193) BKE_object_eval_uber_data(Depsgraph * depsgraph, Scene * scene, Object * ob) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenkernel/intern/object_update.c:385) std::__invoke_impl<void, void (*&)(Depsgraph*, Scene*, Object*), Depsgraph*, Scene*&, Object*&>(void (*&)(Depsgraph *, Scene *, Object *) __f) (/usr/include/c++/9/bits/invoke.h:60) std::__invoke<void (*&)(Depsgraph*, Scene*, Object*), Depsgraph*, Scene*&, Object*&>(void (*&)(Depsgraph *, Scene *, Object *) __fn) (/usr/include/c++/9/bits/invoke.h:95) std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul>)(std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> * const this, std::tuple<Depsgraph*&&> && __args) (/usr/include/c++/9/functional:400) std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)>::operator()<Depsgraph*, void>(Depsgraph*&&)(std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> * const this) (/usr/include/c++/9/functional:484) std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, Scene*, Object*))(Depsgraph*, Scene*, Object*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&)(const std::_Any_data & __functor, __args#0) (/usr/include/c++/9/bits/std_function.h:300) std::function<void (Depsgraph*)>::operator()(Depsgraph*) const(const std::function<void(Depsgraph*)> * const this, __args#0) (/usr/include/c++/9/bits/std_function.h:688) blender::deg::(anonymous namespace)::evaluate_node(const blender::deg::(anonymous namespace)::DepsgraphEvalState * state, blender::deg::OperationNode * operation_node) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:113) blender::deg::(anonymous namespace)::deg_task_run_func(TaskPool * pool, void * taskdata) (/home/dev/01-data/01-git/blender-git/blender/source/blender/depsgraph/intern/eval/deg_eval.cc:124) ```
Author

Added subscriber: @Tilation

Added subscriber: @Tilation
Robert Guetzkow changed title from Mantaflow - Crash to Mantaflow - Crash when enabling guides 2020-12-15 11:08:02 +01:00

Added subscriber: @rjg

Added subscriber: @rjg

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

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

I can reproduce this both the with the attached file and from the default startup file. The fmd is NULL in MANTA::readGuiding.

I can reproduce this both the with the attached file and from the default startup file. The `fmd` is `NULL` in `MANTA::readGuiding`.
Sebastián Barschkis was assigned by Dalai Felinto 2020-12-18 18:10:03 +01:00

Added subscriber: @Quantumplation-4

Added subscriber: @Quantumplation-4

Is this issue open for contributions? I was playing around with debugging this to test out my local development setup (breakpoints etc.), and I have a small patch that seems to address it while still leaving fluid simulation in tact.

Is this issue open for contributions? I was playing around with debugging this to test out my local development setup (breakpoints etc.), and I have a small patch that seems to address it while still leaving fluid simulation in tact.

@Quantumplation-4 Patches are always welcome! This particular ticket has already been assigned to a developer though, so it might be a duplication of effort. Our wiki provides instructions how to submit a patch using [arcanist ]] or by creating a [ https:*wiki.blender.org/wiki/Tools/CodeReview#Upload_a_Diff | diff .

@Quantumplation-4 Patches are always welcome! This particular ticket has already been assigned to a developer though, so it might be a duplication of effort. Our wiki provides instructions how to submit a patch using [arcanist ]] or by creating a [[ https:*wiki.blender.org/wiki/Tools/CodeReview#Upload_a_Diff | diff ](https:*wiki.blender.org/wiki/Tools/CodeReview#Use_Arcanist).
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

This seems to fix it already. However, I've never used fluid guides, so I don't know if this breaks something else...

diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 2dc7d3cc9e9..367d0851034 100644
    - a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4019,7 +4019,9 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *fmd,

/* Read guide cache. */
if (with_guide) {
FluidModifierData *fmd2 = (with_gdomain) ? fmd_parent : fmd;

- has_guide = manta_read_guiding(fds->fluid, fmd2, scene_framenr, with_gdomain);
+      if (fmd2) {
+        has_guide = manta_read_guiding(fds->fluid, fmd2, scene_framenr, with_gdomain);
+      }

}

 

/* Read noise and data cache */

@sebbas, is this fix ok?

This seems to fix it already. However, I've never used fluid guides, so I don't know if this breaks something else... ```diff diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 2dc7d3cc9e9..367d0851034 100644 - a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4019,7 +4019,9 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *fmd, ``` /* Read guide cache. */ if (with_guide) { FluidModifierData *fmd2 = (with_gdomain) ? fmd_parent : fmd; ``` - has_guide = manta_read_guiding(fds->fluid, fmd2, scene_framenr, with_gdomain); + if (fmd2) { + has_guide = manta_read_guiding(fds->fluid, fmd2, scene_framenr, with_gdomain); + } ``` } ``` ``` /* Read noise and data cache */ ``` ``` @sebbas, is this fix ok?

This issue was referenced by 30310a4fc8

This issue was referenced by 30310a4fc84cd6b971f58ced42b6eed1343b22e7

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
6 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#83777
No description provided.