Page MenuHome

Blender 2.91 crash when you select Grid Display > 'Obstacle Levelset' or 'Outflow Levelset' in Fluid Simulation
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Darwin-17.7.0-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon HD 6970M OpenGL Engine ATI Technologies Inc. 4.1 ATI-1.68.25

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-17 21:51, hash: rBcacd57b67a15
Worked: (newest version of Blender that worked as expected)

Short description of error
Blender crashes when Physics Properties > Fluid > Viewport Display > Grid Display > Field is set to Obstacle Levelset or Outflow Levelset without an obstacle or outflow object in the scene.

Exact steps for others to reproduce the error

  1. Open the default file
  2. Select the cube and use Object > Quick Effects > Quick Liquid
  3. In Physics Properties > Fluid > Viewport Display, tick the checkbox for Grid Display and set Field to Obstacle Levelset or Outflow Levelset.
  4. Blender crashes

Keep in mind that there aren't obstacles or outflow objects in the scene.

Event Timeline

Óscar (Oxer) renamed this task from Blender crash when you select Grid Display > 'Obstacle Levelset' or 'Outflow Levelset' in Fluid Simulation to Blender 2.91 crash when you select Grid Display > 'Obstacle Levelset' or 'Outflow Levelset' in Fluid Simulation.Sep 18 2020, 7:21 PM
Robert Guetzkow (rjg) updated the task description. (Show Details)
Robert Guetzkow (rjg) updated the task description. (Show Details)
Robert Guetzkow (rjg) changed the task status from Needs Triage to Confirmed.EditedSep 18 2020, 10:01 PM
Robert Guetzkow (rjg) triaged this task as High priority.

I can confirm this crash. The GPUTexture pointer tex passed into swizzle_texture_channel_single() is NULL. The texture is supposed to be created by create_volume_texture() in create_field_texture(). Subsequent functions don't check if the pointer is NULL and attempt to dereference it.

GPU_texture_swizzle_set(GPUTexture * tex, const char * swizzle) Line 505	C++
swizzle_texture_channel_single(GPUTexture * tex) Line 132	C
create_field_texture(FluidDomainSettings * fds, bool single_precision) Line 321	C
DRW_smoke_ensure_coba_field(FluidModifierData * fmd) Line 483	C
workbench_volume_modifier_cache_populate(WORKBENCH_Data * vedata, Object * ob, ModifierData * md) Line 82	C
workbench_volume_cache_populate(WORKBENCH_Data * vedata, Scene * UNUSED_scene, Object * ob, ModifierData * md, eV3DShadingColorType color_type) Line 339	C
workbench_cache_populate(void * ved, Object * ob) Line 372	C
drw_engines_cache_populate(Object * ob) Line 1081	C
DRW_draw_render_loop_ex(Depsgraph * depsgraph, RenderEngineType * engine_type, ARegion * region, View3D * v3d, GPUViewport * viewport, const bContext * evil_C) Line 1579	C
DRW_draw_view(const bContext * C) Line 1487	C
view3d_draw_view(const bContext * C, ARegion * region) Line 1594	C
view3d_main_region_draw(const bContext * C, ARegion * region) Line 1617	C
ED_region_do_draw(bContext * C, ARegion * region) Line 535	C
wm_draw_window_offscreen(bContext * C, wmWindow * win, bool stereo) Line 732	C
wm_draw_window(bContext * C, wmWindow * win) Line 871	C
wm_draw_update(bContext * C) Line 1072	C
WM_main(bContext * C) Line 489	C
main(int argc, const unsigned char * * UNUSED_argv_c) Line 534	C
Jacques Lucke (JacquesLucke) changed the subtype of this task from "Report" to "Bug".Sep 22 2020, 10:24 AM