Mantaflow error when using blender in background mode #87828

Closed
opened 2021-04-26 14:21:18 +02:00 by Robin Schyboll · 9 comments

System Information
Operating system: Linux-5.11.16-arch1-1-x86_64-with-arch-RebornOS-release 64 Bits
Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.24.02

Blender Version
Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: 02948a2cab, also broken ce64cfd6ed

Short description of error
When running blender in background mode, or as a python module, and opening a .blend file through a python script with a Mantaflow simulation, it throws the following error:

terminate called after throwing an instance of 'Manta::Error'
  what():  can't clean grid cache, some grids are still in use
Error raised in extern/mantaflow/preprocessed/fluidsolver.cpp:33

T87828_assertandexception.txt

Exact steps for others to reproduce the error

  • Create a default scene with a quick smoke example, and save it to a .blend file
  • Create a python script with the following content:
import bpy
bpy.ops.wm.open_mainfile(filepath=".blend file path")

  • Launch blender with the following command:
blender -b --python script.py

Similar issues
I encountered issues with similar errors, but i submitted a new one because of a different way of triggering that error:
#87021 (Program Close after free data liquid simulation)
#80154 (Mantaflow rendering unstable (when using multiple fluid domains))
#87975 (Mantaflow simulation stops and crashes at the end of the bake (or when closing blender): The CG solver diverged, residual norm > 1e30, stopping.)
slightly old one blender/blender-addons#75889 (Mantaflow problem when baking via Python API)

Additional information
I did encounter another error, when using blender as a python module, which may or may not be related to this issue, i can't tell really.
After building blender and installing it as a module to my python venv, when launching the same script as before, i get the same error when exiting the script.
But when loading the file, i get another error:

Traceback (most recent call last):
  File "<string>", line 107, in <module>
AttributeError: 'LevelsetGrid' object has no attribute 'setConst'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 130, in smoke_load_data_1
NameError: name 'fluid_data_dict_final_s1' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
TypeError: 'NoneType' object is not callable

I can't really tell, if i'm doing something wrong, or if it is some kind of bug, but when using blender as a python module, i cannot render any fluid sims, they just disappear in the render output.
I found that someone had a similar issue on devtalk, but the topic was not continued:
Devtalk: 15460
When using blender normally in background mode, i am able to render it, but still, the error exists in both cases, the second one only when using as a python module, can't really tell if they are related.

**System Information** Operating system: Linux-5.11.16-arch1-1-x86_64-with-arch-RebornOS-release 64 Bits Graphics card: NVIDIA GeForce RTX 3060 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.24.02 **Blender Version** Broken: version: 2.92.0, branch: master, commit date: 2021-02-24 16:25, hash: `02948a2cab`, also broken ce64cfd6ed **Short description of error** When running blender in background mode, or as a python module, and opening a .blend file through a python script with a Mantaflow simulation, it throws the following error: ``` terminate called after throwing an instance of 'Manta::Error' what(): can't clean grid cache, some grids are still in use Error raised in extern/mantaflow/preprocessed/fluidsolver.cpp:33 ``` [T87828_assertandexception.txt](https://archive.blender.org/developer/F10194218/T87828_assertandexception.txt) **Exact steps for others to reproduce the error** - Create a default scene with a quick smoke example, and save it to a .blend file - Create a python script with the following content: ``` import bpy bpy.ops.wm.open_mainfile(filepath=".blend file path") ``` - Launch blender with the following command: ``` blender -b --python script.py ``` **Similar issues** I encountered issues with similar errors, but i submitted a new one because of a different way of triggering that error: #87021 (Program Close after free data liquid simulation) #80154 (Mantaflow rendering unstable (when using multiple fluid domains)) #87975 (Mantaflow simulation stops and crashes at the end of the bake (or when closing blender): The CG solver diverged, residual norm > 1e30, stopping.) slightly old one blender/blender-addons#75889 (Mantaflow problem when baking via Python API) **Additional information** I did encounter another error, when using blender as a python module, which may or may not be related to this issue, i can't tell really. After building blender and installing it as a module to my python venv, when launching the same script as before, i get the same error when exiting the script. But when loading the file, i get another error: ``` Traceback (most recent call last): File "<string>", line 107, in <module> AttributeError: 'LevelsetGrid' object has no attribute 'setConst' Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 130, in smoke_load_data_1 NameError: name 'fluid_data_dict_final_s1' is not defined Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: 'NoneType' object is not callable ``` I can't really tell, if i'm doing something wrong, or if it is some kind of bug, but when using blender as a python module, i cannot render any fluid sims, they just disappear in the render output. I found that someone had a similar issue on devtalk, but the topic was not continued: [Devtalk: 15460 ](https://devtalk.blender.org/t/python-module-bpy-mantaflow-issues-after-successful-build/15460) When using blender normally in background mode, i am able to render it, but still, the error exists in both cases, the second one only when using as a python module, can't really tell if they are related.
Author

Added subscriber: @hoodrobinrs

Added subscriber: @hoodrobinrs
Member

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

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

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Before I got the 'Manta::Error', there was an assert (stack in F10194218) so after disabling WITH_ASSERT_ABORT, the issue can be redone.

Before I got the `'Manta::Error'`, there was an assert (stack in [F10194218](https://archive.blender.org/developer/F10194218/T87828_assertandexception.txt)) so after disabling `WITH_ASSERT_ABORT`, the issue can be redone.

Mantaflow (fluid simulator) has no active developer at the moment. Moving those reports as known issues so at least other users can find their issues already reported.

Mantaflow (fluid simulator) has no active developer at the moment. Moving those reports as known issues so at least other users can find their issues already reported.
Member

Added subscriber: @SonnyCampbell_Unity

Added subscriber: @SonnyCampbell_Unity
Member

I believe this issue will be fixed by https://developer.blender.org/T98427 which is currently waiting for review

I believe this issue will be fixed by https://developer.blender.org/T98427 which is currently waiting for review
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sonny Campbell self-assigned this 2022-06-24 16:14:23 +02:00
Member

This issue should be resolved in master by https://developer.blender.org/D15269

This issue should be resolved in master by https://developer.blender.org/D15269
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#87828
No description provided.