Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender crash when rendering scene with both FlipFluid and "disable in render" keyframes #566

Closed
baronlanteigne opened this issue Nov 21, 2021 · 10 comments
Labels

Comments

@baronlanteigne
Copy link

System Information

Blender Version (including hash): 3.0 Beta 11-20. Hash: 1b2ee3cf2077
FLIP Fluids Version: 9.1.3

Describe the bug

Blender crash when rendering a scene which includes keyframed "disable in render" flags. Note that the object with the keyframes doesn't need to be related to the flip fluid animation. That said, the scene render fines if I delete the flip fluid collection.

To Reproduce

  1. Open the blend, press f12. crash.
  2. Open the blend, Clear the disable in render keyframes on CC_Base_Body_force mesh and press f12: the scene will render fine. This is without even rebaking the simulation or anything. It doesn't seem related to the simulation but blender doesn't crash if flip fluid is not present.

Other note. I could not reproduce with a basic cube mesh. Maybe it's also related to the rig.

download the blend here, sorry it's large, I couldn't clean it further. Also I'm not sure what will happen once you try to rebake it because I had to delete 250mb of mocap data.

https://drive.google.com/file/d/1W3xpTLp9kRn6k_gRCuw6MnEY4yU8BfHW/view?usp=sharing

Thank you!

@rlguy rlguy added the bug label Nov 21, 2021
@rlguy
Copy link
Owner

rlguy commented Nov 21, 2021

Thanks for the report! I am able to reproduce the issue, and also without baking.

This is a bug that has been encountered before. I had reported it originally to the Blender tracker here: https://developer.blender.org/T76422

However, the bug was closed due to a scripting error on my side, which included an operation that was not supported. Later in development, I needed to re-add the unsupported operation as a workaround to another render crash issue (https://developer.blender.org/T60094), which had been fixed but is not completely stable (comment here). Although the operation is unsupported, it seems to significantly improve render stability.

This is an issue I should bring up again to the Blender developers, but will need to find a good way to reproduce the issue in a minimal script.

Workaround 1: Enable Persistent Data (Cycles Renderer)

Enabling Render Properties > Performance > Final Render > Persistent Data seems to prevent this render crash. However, rendering should be run from the command line when this option is enabled since it can cause render crashes if the viewport is open (another issue that I should find a way to report).

Workaround 2: Export simulation to Alembic

Exporting and importing the Alembic export back into the scene will bypass the FLIP Fluids addon scripts and should prevent this crash.

@baronlanteigne
Copy link
Author

thanks! Only drawback with those workarounds is that it's harder to get quick previews as I work on the project but I could easily just insert those keyframes at the very end.

@rlguy
Copy link
Owner

rlguy commented Nov 21, 2021

This issue is related to motion blur rendering, so a workaround could also be to disable Render Properties > Motion Blur for previews. But that would not be ideal if motion blur is wanted in the preview.

@baronlanteigne
Copy link
Author

Oh that's also good to know. Thanks.

@sentharn
Copy link

@rlguy https://developer.blender.org/T83852 appears to be crashing with an access violation on the same line from a completely different use case (background scenes). I've put in some time to validate that it happens on 3.0 and 3.1 and tracked down the culprit line. I also just helped a colleague triage his animation crash which turned out to be this issue in FLIP Fluids, which is how I made the connection between the two bugs.

I think they are both symptoms of an underlying issue in the depsgraph. Perhaps you could take a look and see if you can reproduce the issue too? More eyes would help--I'm at the end of my debugging ability here.

(p.s. thanks for FLIP Fluids; I just bought it recently and it's a massive time saver!)

@rlguy
Copy link
Owner

rlguy commented Jan 28, 2022

@sentharn Thanks for the info! I've been away from the office for the last few days but will be able to check it out during next week.

@rlguy
Copy link
Owner

rlguy commented Feb 5, 2022

Hey @sentharn, I had a chance to try to reproduce the issue yesterday and today in Blender 3.1, but was not able to reproduce the crash. The renders seem to complete after quite a few attempts, so perhaps this could be specific to the system.

If there's anything you'd like me to test, feel free to send a message to [email protected].

@TheZoidMaster
Copy link

I'm on an older 2020 model of Acer Nitro 5 and experiencing the same problem. Blender crashes as soon as i click into render view with fluid.

@rlguy
Copy link
Owner

rlguy commented Jul 27, 2022

Hi @TheZoidMaster, this issue thread is only applicable to full animation/frame render with motion blur and is not related to viewport shading (there's no motion blur in viewport render).

See #518 for general render crash troubleshooting and info.

The viewport shading crash may also be related to to this recent bug in Blender: https://developer.blender.org/T100021

@rlguy
Copy link
Owner

rlguy commented Jan 5, 2023

We have added an internal workaround in FLIP Fluids 1.6.1 (06-JAN-2023) for this issue.

The addon will automatically detect when this issue could be triggered and in these cases will not run the unsupported operation mentioned in #566 (comment). However, a side effect of not running this operation is that renders may become less stable. We recommend using the command line rendering tools for maximum stability.

This issue is triggered if an object contains keyframes for the Disable in Renders option AND:

  • The renderer is set to Cycles and Cycles Motion Blur is enabled.
  • Or if the render is set to Eevee or Workbench or possibly other renderers.

image

@rlguy rlguy closed this as completed Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants