Blender-FLIP-Fluids icon indicating copy to clipboard operation
Blender-FLIP-Fluids copied to clipboard

Blender 2.79 nightly builds crashing on startup (Blender bug)

Open rlguy opened this issue 8 years ago • 5 comments

Hello everyone!

We have had a report that the FLIP Fluids addon is causing a crash during startup using the Blender 2.79 nightly builds. Disabling the addon by removing the blender_flip_fluids folder from the Blender addons directory allows Blender to start up without crashes.

Is anyone else is experiencing this issue with the Blender 2.79 nightly builds? A simple Yes or No answer would greatly be appreciated!

If your answer is Yes, providing your system information could help us. Example:

  • Blender Version: Blender 2.79 (5d8ac9)
  • FLIP Fluids Version: 1.0.4
  • Operating System: Windows 10
  • CPU: Intel i7-7700 @ 3.60GHz
  • GFX: GTX 1080, 8GB
  • RAM: 32GB

Note: the Blender version hash (5d8ac9) can be found in the upper-right corner of the splash screen when you start up Blender. The addon version can be found in the Blender addon preferences menu.

rlguy avatar Aug 27 '18 19:08 rlguy

Yes, but after restarting my PC, everything seems to work again? No Idea why...

  • Blender Version: Blender 2.79.6 (5e5f2ead437)
    
  • FLIP Fluids Version: 1.0.4a
    
  • Operating System: Windows 10
    
  • CPU: Intel i7-4790k @ 4.6GHz
    
  • GFX: GTX 1070, 8GB
    
  • RAM: 16GB
    

DerFluep avatar Aug 27 '18 20:08 DerFluep

Yes, problem persists for me. I just grabbed the latest blender 2.79 build for windows 64-bit off builder.blender.org, purchased and installed the official FLIP fluids addon from blendermarket, and blender crashes immediately on loading it. This problem persists each time blender is loaded, as well as between reboots of my PC.

I do not have this problem with an earlier unsupported build of FLIP Fluids 1.0.2 and this same recent build of blender. Also, the official 2.79 version currently available from steam (not a builder.blender.org build) loads fine with FLIP fluids 1.04a. Its just the latest blender builds that are gacking on the latest version of the addon.

Blender Version: Blender blender-2.79.0-git.5e8a030a08b-windows64

FLIP Fluids Version: 1.0.4a

Operating System: Windows 10 Pro 10.0.17134 Build 17134

CPU: i9-7900X @ 3.5GHz, 10 cores, 20 threads

GFX: Titan Xp, 12GB

RAM: 64GB

igarrison avatar Aug 29 '18 05:08 igarrison

Good news, I was able to reproduce the issue on one of my systems and narrow down what is causing the crash. This looks to be a bug within Blender that is triggered by saving icon images. When the FLIP Fluids addon starts up for the first time, it will generate a set of icon images to be used within the addon. I have filed a bug report here: https://developer.blender.org/T56610

Thanks @igarrison for letting me know that this worked on the unsupported 1.0.2 and not the current version. This made it much easier to narrow down what section of code was causing the crash.

Here is a simple script that will cause the nightly builds to crash:

import bpy, os

icon_directory = os.path.join(bpy.context.user_preferences.filepaths.temporary_directory, "temp_icons")
os.makedirs(icon_directory, exist_ok=True)
for i in range(100):
    image = bpy.data.images.new("iconimg" + str(i), width=32, height=32)
    image.filepath_raw = os.path.join(icon_directory, str(i) + ".png")
    image.file_format = 'PNG'
    image.save()

Here is a .blend file that include the script. Press 'Run Script' to execute the script: bug_report_run_script.zip

How to reproduce crash

Here are the steps that I have found to reliably reproduce the crash:

  1. Open nightly Blender build
  2. Uninstall the FLIP Fluids addon
  3. Restart nightly Blender build
  4. Install the FLIP Fluids addon
  5. Restart the Blender nightly build (crash)

Note: Blender will sometimes successfully write the icon images on startup. Once the images are written, the addon will no longer need to run this section of code and Blender will stop crashing on subsequent startups. This could explain why the addon started successfully after a system restart.

Workaround

It seems that the addon runs fine in the official Blender releases. So until Blender fixes this bug, a workaround to this issue is to initialize the addon using an official Blender build, and then run the addon using a nightly build.

  1. Uninstall the FLIP Fluids addon
  2. Open an official Blender build
  3. Install the FLIP Fluids addon
  4. Restart the official Blender build
  5. Close the official Blender build
  6. Open a Blender nightly build

- Ryan

rlguy avatar Aug 29 '18 22:08 rlguy

Great job getting to the bottom of this issue and I really appreciate the workaround. I confirmed it works for me and I can resume doing stuff on the latest 2.79 builds and flip fluids!

igarrison avatar Aug 31 '18 02:08 igarrison

The bug has now been fixed by Blender (in just over 12 hours!) and is now included in the latest nightly build. Just tested the build (94ea566b5a1, Aug 31 2018 01:07:59) and have confirmed that it works!

- Ryan

rlguy avatar Aug 31 '18 02:08 rlguy