Page MenuHome

Baking Fluid simulations via API broken
Closed, ArchivedPublic

Description

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: rB84da05a8b806
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.

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

Event Timeline

Richard Antalik (ISS) closed this task as Archived.Thu, Jul 22, 7:49 AM

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.

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

oops, didn't check that @Richard Antalik (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.
@Richard Antalik (ISS) , do you mean something like: T87775 ?

oops, didn't check that @Richard Antalik (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.
@Richard Antalik (ISS) , do you mean something like: T87775 ?

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

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