Page MenuHome

Seg Fault when adding a point distribute node
Closed, ResolvedPublic


System Information
Linux MONSTER 5.8.0-44-generic #50~20.04.1-Ubuntu SMP Wed Feb 10 21:07:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Threadripper 2950 w 64G DRAM
GeForce RTX 3090 NVIDIA-SMI 460.39 Driver Version: 460.39 CUDA Version: 11.2

Blender Version
Broken: 2.92.0
Worked: N/A

Preferences were imported from 2.91.2

Blender throws a Seg Fault when I add a new point distribute node to a new group to the plane in this particular blend file.

  1. Open Blender 2.92
  2. Open the blend file. Drag up the timeline window and change it to a geo node editor.
  3. Select the plane
  4. Add a new group
  5. Add a point distribution node and drop it onto the existing link.

Console shows
Writing: /tmp/Grass drive.crash.txt
Segmentation fault (core dumped)

Blend file and crash file are attached.

Event Timeline

Falk David (filedescriptor) changed the task status from Needs Triage to Confirmed.Mar 1 2021, 12:26 PM

I can confirm this crash on the lastest 2.93.0 Alpha, branch: master, commit date: 2021-03-01 06:12, hash: rBbfc70a6a958b.

BLI_assert failed: source/blender/draw/intern/draw_cache_impl_pointcloud.c:274, DRW_cache_pointcloud_surface_shaded_get(), at 'cache->mat_len == gpumat_array_len'

The issue here seems to be in the DRW_cache_object_material_count_get function. This quick fix solves the issue in this specific case:

diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index fcd626eb92b..226589779c5 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -936,7 +936,7 @@ GPUVertBuf *DRW_cache_object_pos_vertbuf_get(Object *ob)
 int DRW_cache_object_material_count_get(struct Object *ob)
   Mesh *me = BKE_object_get_evaluated_mesh(ob);
-  short type = (me != NULL) ? OB_MESH : ob->type;
+  short type = ob->type;
   switch (type) {
     case OB_MESH:

The special case for meshes probably exists for curves or so, that can become meshes. Need to investigate this more.

Holy cow you guys are quick! Never got support like this from any paid product. I feel a donation coming on.....