Possible crash with Motion Blur with changing curves count #117485

Closed
opened 2024-01-24 18:48:21 +01:00 by Steffen Dünner · 4 comments

System Information
Operating system: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 2070 Super/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.154.05

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-24 17:30, hash: ae27daf8340a

Short description of error
Rendering will very likely crash when rendering changing topology, in this case curves.
I was building a quick and simple test scene with Geometry Nodes and it started crashing on the farm.

Exact steps for others to reproduce the error

The crash won't happen if "Motion Blur" is disabled.

**System Information** Operating system: Linux-6.5.0-14-generic-x86_64-with-glibc2.35 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 2070 Super/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 535.154.05 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-24 17:30, hash: `ae27daf8340a` **Short description of error** Rendering will very likely crash when rendering changing topology, in this case curves. I was building a quick and simple test scene with Geometry Nodes and it started crashing on the farm. **Exact steps for others to reproduce the error** - Open the attached blend file: [Shortest_Edge_Path_v04.blend](/attachments/08a7d10c-45df-46be-a473-ef26fc59aa52) - Start a "Render Animation" or press CTRL + F12 - Wait a few frames -> crash The crash won't happen if "Motion Blur" is disabled.
Steffen Dünner added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-01-24 18:48:22 +01:00
Member

Thanks for the report. Can confirm the crash.

Thanks for the report. Can confirm the crash.
Member

Call stack was empty so hard to guess the reason here. Seems to happen when iterating repeat zone 5 times

Call stack was empty so hard to guess the reason here. Seems to happen when iterating repeat zone 5 times
Member

Reads out of bounds of curve_first_key and asserts here

6  ccl::array<int, 16ul>::operator[]  array.h    205  0x10e4b942 
7  ccl::Hair::get_curve               hair.h     114  0x10e4a1ce 
8  ccl::export_hair_curves_motion     curves.cpp 948  0x10e34b73 
9  ccl::BlenderSync::sync_hair        curves.cpp 1004 0x10e362b2 
10 ccl::BlenderSync::sync_hair_motion curves.cpp 1075 0x10e37cfb 

POC bandaid hack (but there are other places reading from curve_first_key, so might not be safe at all)

diff --git a/intern/cycles/blender/curves.cpp b/intern/cycles/blender/curves.cpp
index 626fa4bbe95..57c41a02dbc 100644
--- a/intern/cycles/blender/curves.cpp
+++ b/intern/cycles/blender/curves.cpp
@@ -945,6 +945,12 @@ static void export_hair_curves_motion(Hair *hair,
   for (const int i : points_by_curve.index_range()) {
     const blender::IndexRange points = points_by_curve[i];
 
+    if (curve_index >= hair->get_curve_first_key().size()) {
+      have_motion = false;
+      curve_index++;
+      continue;
+    }
+
     Hair::Curve curve = hair->get_curve(curve_index);
     curve_index++;
Reads out of bounds of `curve_first_key` and asserts here ``` 6 ccl::array<int, 16ul>::operator[] array.h 205 0x10e4b942 7 ccl::Hair::get_curve hair.h 114 0x10e4a1ce 8 ccl::export_hair_curves_motion curves.cpp 948 0x10e34b73 9 ccl::BlenderSync::sync_hair curves.cpp 1004 0x10e362b2 10 ccl::BlenderSync::sync_hair_motion curves.cpp 1075 0x10e37cfb ``` POC bandaid hack (but there are other places reading from `curve_first_key`, so might not be safe at all) ```diff diff --git a/intern/cycles/blender/curves.cpp b/intern/cycles/blender/curves.cpp index 626fa4bbe95..57c41a02dbc 100644 --- a/intern/cycles/blender/curves.cpp +++ b/intern/cycles/blender/curves.cpp @@ -945,6 +945,12 @@ static void export_hair_curves_motion(Hair *hair, for (const int i : points_by_curve.index_range()) { const blender::IndexRange points = points_by_curve[i]; + if (curve_index >= hair->get_curve_first_key().size()) { + have_motion = false; + curve_index++; + continue; + } + Hair::Curve curve = hair->get_curve(curve_index); curve_index++; ```
Philipp Oeser changed title from Possible crash with Motion Blur to Possible crash with Motion Blur with changing curves count 2024-01-25 12:46:43 +01:00
Member

Will raise the priority since this is a crasher (and not totally unlikely to run into)

Will raise the priority since this is a crasher (and not totally unlikely to run into)
Philipp Oeser added
Priority
High
and removed
Priority
Normal
labels 2024-02-12 13:23:54 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2024-02-29 13:50:07 +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
3 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#117485
No description provided.