Page MenuHome

2.8 crashes when changing aperture ratio to 0
Closed, ResolvedPublic

Description

System Information
Operating system: Windows 10 Pro v1709
Graphics card: NVIDIA GeForce 840M

Blender Version
Broken: 2.80, 11f2c65128dc, 2019-01-02 18:50 as found on the splash screen

Short description of error
When Depth of Field is enabled in the Render settings, an Aperture value (in Camera settings) of 0 cause Blender to crash on rendering.

Exact steps for others to reproduce the error

  1. Open default scene
  2. Enable Depth of Field in Render tab
  3. Change Aperture values in Camera settings (Object Data tab), e.g. Focus Distance: 0, F-stop: 128, Blades: 0, Rotation: 0, Ratio: 0
  4. Start Rendering (Eevee)
  5. Blender crashes

Event Timeline

Dalai Felinto (dfelinto) claimed this task.
Dalai Felinto (dfelinto) triaged this task as Confirmed, Medium priority.

Super confirmed, and watch out, this made my computer hang.

@Clément Foucault (fclem) first and foremost, we have a few division by zero asserts when using blades 0 (which happens to be the default) which I already fixed - rBbdbe48442846:

//source/blender/draw/engines/eevee/eevee_depth_of_field.c:181:46: runtime error: division by zero
//source/blender/draw/engines/eevee/eevee_depth_of_field.c:183:44: runtime error: division by zero

Now I committed a "fix" which is to limit the ratio to 0.01 (same I use for Cycles).
The render still goes drastically slow once it goes below 1.0, but it is not a bug (nor a crash per se) - rB1753177ad8ac.