Seg Fault when adding a point distribute node #86050

Closed
opened 2021-02-27 15:41:16 +01:00 by Pete Bateman · 10 comments

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.

Grass drive.crash.txt

Grass drive.blend

**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. [Grass drive.crash.txt](https://archive.blender.org/developer/F9847156/Grass_drive.crash.txt) [Grass drive.blend](https://archive.blender.org/developer/F9847160/Grass_drive.blend)
Author

Added subscriber: @peteypops

Added subscriber: @peteypops
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

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

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'

I can confirm this crash on the lastest 2.93.0 Alpha, branch: master, commit date: 2021-03-01 06:12, hash: `bfc70a6a95`. `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'`
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

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.

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.
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Author

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

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

This issue was referenced by 3de5fbba3a

This issue was referenced by 3de5fbba3a984fab1a3f69fea3a62e620f55d4b7
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2021-03-04 15:28:45 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#86050
No description provided.