Baking Fluid simulations via API broken #90031

Closed
opened 2021-07-21 23:28:22 +02:00 by Nathan Kundtz · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b8
Worked: (newest version of Blender that worked as expected)

Short description of error
When attempting to bake fluid simulations via API Blender will throw a ' PyEval_EvalCodeEx: NULL globals' error when attempting to view the simulation.

Interestingly, if you set everything up with one script, and then use a second script to bake the simulation everything seems to work fine.fluid_test.py

Exact steps for others to reproduce the error
Run the attached script in a new blender file to reproduce the error.

To see how it does work in two steps, comment line #83 to prevent baking the first time you run the script. The second time comment line #78 to avoid building the world.

As you will also see from the script file saving and updating the view_layer do not seem to help.

Thanks in advance for any help!!

Best,
Nathan

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 456.71 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `84da05a8b8` Worked: (newest version of Blender that worked as expected) **Short description of error** When attempting to bake fluid simulations via API Blender will throw a ' PyEval_EvalCodeEx: NULL globals' error when attempting to view the simulation. Interestingly, if you set everything up with one script, and then use a second script to bake the simulation everything seems to work fine.[fluid_test.py](https://archive.blender.org/developer/F10232525/fluid_test.py) **Exact steps for others to reproduce the error** Run the attached script in a new blender file to reproduce the error. To see how it does work in two steps, comment line #83 to prevent baking the first time you run the script. The second time comment line #78 to avoid building the world. As you will also see from the script file saving and updating the view_layer do not seem to help. Thanks in advance for any help!! Best, Nathan
Author

Added subscriber: @nkundtz

Added subscriber: @nkundtz

Added subscriber: @iss

Added subscriber: @iss

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

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

Checking with 3.0, I can see something seems to be hapenning, but I did not know how long to wait so haven't finished baking. However when I commented baking step to do it manually, It crashed with same error message PyEval_EvalCodeEx: NULL globals

I suspect this could be, because of blend file path which contains double slash? No such error when I corrected the path.

So please make sure your path is correct (consider using bpy.path utils) and in 3.0 even invalid path handling seems to be fixed, so closing this report.

Checking with 3.0, I can see something seems to be hapenning, but I did not know how long to wait so haven't finished baking. However when I commented baking step to do it manually, It crashed with same error message `PyEval_EvalCodeEx: NULL globals` I suspect this could be, because of blend file path which contains double slash? No such error when I corrected the path. So please make sure your path is correct (consider using `bpy.path` utils) and in 3.0 even invalid path handling seems to be fixed, so closing this report.
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Can confirm. Crash happens when I run the script for the second time.

bake.crash.txt

Can confirm. Crash happens when I run the script for the second time. [bake.crash.txt](https://archive.blender.org/developer/F10233317/bake.crash.txt)
Member

oops, didn't check that @iss already closed the task. (kept this tab open for more than a hour :p)

I suspect this could be, because of blend file path which contains double slash?

Not sure I understand this. I couldn't see the path with double back slash.
@iss , do you mean something like: #87775 ?

oops, didn't check that @iss already closed the task. (kept this tab open for more than a hour :p) >I suspect this could be, because of blend file path which contains double slash? Not sure I understand this. I couldn't see the path with double back slash. @iss , do you mean something like: #87775 ?

In #90031#1194603, @PratikPB2123 wrote:
oops, didn't check that @iss already closed the task. (kept this tab open for more than a hour :p)

I suspect this could be, because of blend file path which contains double slash?

Not sure I understand this. I couldn't see the path with double back slash.
@iss , do you mean something like: #87775 ?

No, I meant, that the script tries to save new blend file to D:\xxx\/file.blend and this wasn't sanitized in 2.93

> In #90031#1194603, @PratikPB2123 wrote: > oops, didn't check that @iss already closed the task. (kept this tab open for more than a hour :p) > >>I suspect this could be, because of blend file path which contains double slash? > Not sure I understand this. I couldn't see the path with double back slash. > @iss , do you mean something like: #87775 ? No, I meant, that the script tries to save new blend file to `D:\xxx\/file.blend` and this wasn't sanitized in 2.93
Author

Thanks very much for taking a look so quickly! I really appreciate the work you do.

I want to confirm that this is NOT a problem with file naming.

I have uploaded a clarifying script without file saving. If you run this script (baking should take about 20 seconds) and then try to play the animation you will see the 'SystemError: PyEval_EvalCodeEx: NULL globals' error. If you attempt to run it again blender will crash.

The behavior is identical for both 2.93 and the latest 3.0 release.

Since this task has closed I will resubmit to create an open ticket and link to this one.

Thanks again!
Nathan

fluid_test.py

Thanks very much for taking a look so quickly! I really appreciate the work you do. I want to confirm that this is NOT a problem with file naming. I have uploaded a clarifying script without file saving. If you run this script (baking should take about 20 seconds) and then try to play the animation you will see the 'SystemError: PyEval_EvalCodeEx: NULL globals' error. If you attempt to run it again blender will crash. The behavior is identical for both 2.93 and the latest 3.0 release. Since this task has closed I will resubmit to create an open ticket and link to this one. Thanks again! Nathan [fluid_test.py](https://archive.blender.org/developer/F10233916/fluid_test.py)
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
3 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#90031
No description provided.