Crash opening file using Clump Curves on Particle Children #72763

Open
opened 2019-12-29 08:41:26 +01:00 by Michael Kriegs · 6 comments

version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d4, type: Release
build date: 2019-12-04, 14:30:40
platform: Windows


When I worked on a project using particles, after a short break I wasn´t able to reopen the project. The project crashed right after opening. When starting Blender from console the only error I could find was:
Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF706DC271E

no Blender log file was written!

Even in debug mode there were no more hints but his one. I opened the project in an Ubuntu VM and it also crashed there. No chance to recover the file.

Exact steps for others to reproduce the error

Using Particle following a nurbspath with Force Field "Curve".
Particles rendered as objects.
Used Simple Children.
When ticking the box: Use Clump Curve it crashes.

Either Blender crashes right after ticking the box or when reopen the project. The latter then means that I´m not able to recover my work at all.
I might have to do with particles already baked or not. Not sure.

T72763_crash_log.txt

file written from c2a37867f2 that crashes on file read:
#72763.blend
file written from 2.79b that crashes on file read:
T72763_279.blend

**** version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d49d, type: Release build date: 2019-12-04, 14:30:40 platform: Windows *********************************************************** When I worked on a project using particles, after a short break I wasn´t able to reopen the project. The project crashed right after opening. When starting Blender from console the only error I could find was: Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FF706DC271E no Blender log file was written! Even in debug mode there were no more hints but his one. I opened the project in an Ubuntu VM and it also crashed there. No chance to recover the file. **Exact steps for others to reproduce the error** Using Particle following a nurbspath with Force Field "Curve". Particles rendered as objects. Used Simple Children. When ticking the box: Use Clump Curve it crashes. Either Blender crashes right after ticking the box or when reopen the project. The latter then means that I´m not able to recover my work at all. I might have to do with particles already baked or not. Not sure. [T72763_crash_log.txt](https://archive.blender.org/developer/F8249933/T72763_crash_log.txt) file written from c2a37867f2 that crashes on file read: [#72763.blend](https://archive.blender.org/developer/F8249935/T72763.blend) file written from 2.79b that crashes on file read: [T72763_279.blend](https://archive.blender.org/developer/F8249936/T72763_279.blend)
Author

Added subscriber: @VisualITArts

Added subscriber: @VisualITArts
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm, here are two files (one written from c2a37867f2, one from 2.79b) that both crash on file read.
2.79 could write and read without problems.

#72763.blend
T72763_279.blend

Issue is that CurveMap->table is NULL.
Afaict, this gets nullyfied on file read and never restored back...might also have to do with ParticleThreadContext?

1   BKE_curvemap_evaluateF                           colortools.c            994  0x2fed4ac      
2   BKE_curvemapping_evaluateF                       colortools.c            1002 0x2fed53f      
3   do_clump_level                                   particle_child.c        601  0x30e7f57      
4   do_clump                                         particle_child.c        653  0x30e821f      
5   do_child_modifiers                               particle_child.c        874  0x30e8df0      
6   psys_get_particle_state                          particle.c              4625 0x30e4abc      
7   make_duplis_particle_system                      object_dupli.c          947  0x30ca121      
8   make_duplis_particles                            object_dupli.c          1063 0x30ca7f4      
9   object_duplilist                                 object_dupli.c          1123 0x30ca9c1      
10  (anonymous namespace)::deg_iterator_objects_step depsgraph_query_iter.cc 226  0x404e2bb      
11  DEG_iterator_objects_next                        depsgraph_query_iter.cc 299  0x404e54e      
12  DEG_iterator_objects_begin                       depsgraph_query_iter.cc 266  0x404e429      
13  stats_update                                     info_stats.c            384  0x80753b0      
14  ED_info_stats_string                             info_stats.c            590  0x8075ffc      
15  rna_Scene_statistics_string_get                  rna_scene.c             898  0x383f4a5      
16  Scene_statistics_call                            rna_scene_gen.c         7828 0x3853019      
17  RNA_function_call                                rna_access.c            7558 0x371089d      
18  pyrna_func_call                                  bpy_rna.c               6146 0x38ef4fa      
19  _PyObject_FastCallKeywords                                                    0x7ffff79d4d3c 
20  call_function
                                                                              

doing something like this fixes the crash:
P1196: #72763 bandaid



diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c
index dcd2a0b8fae..da6a5bfa12c 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -597,6 +597,9 @@ static float do_clump_level(float result[3],
   float clump = 0.0f;
 
   if (clumpcurve) {
+    if (clumpcurve->cm->table == NULL) {
+      BKE_curvemapping_initialize(clumpcurve);
+    }
     clump = pa_clump *
             (1.0f - clamp_f(BKE_curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f));
 

Havent investigated though when exactly this crash came to existence (or if the above snippet is safe for ParticleThreadContext)

Can confirm, here are two files (one written from c2a37867f2, one from 2.79b) that both crash on file read. 2.79 could write and read without problems. [#72763.blend](https://archive.blender.org/developer/F8249921/T72763.blend) [T72763_279.blend](https://archive.blender.org/developer/F8249922/T72763_279.blend) Issue is that `CurveMap->table` is NULL. Afaict, this gets nullyfied on file read and never restored back...might also have to do with `ParticleThreadContext`? ``` 1 BKE_curvemap_evaluateF colortools.c 994 0x2fed4ac 2 BKE_curvemapping_evaluateF colortools.c 1002 0x2fed53f 3 do_clump_level particle_child.c 601 0x30e7f57 4 do_clump particle_child.c 653 0x30e821f 5 do_child_modifiers particle_child.c 874 0x30e8df0 6 psys_get_particle_state particle.c 4625 0x30e4abc 7 make_duplis_particle_system object_dupli.c 947 0x30ca121 8 make_duplis_particles object_dupli.c 1063 0x30ca7f4 9 object_duplilist object_dupli.c 1123 0x30ca9c1 10 (anonymous namespace)::deg_iterator_objects_step depsgraph_query_iter.cc 226 0x404e2bb 11 DEG_iterator_objects_next depsgraph_query_iter.cc 299 0x404e54e 12 DEG_iterator_objects_begin depsgraph_query_iter.cc 266 0x404e429 13 stats_update info_stats.c 384 0x80753b0 14 ED_info_stats_string info_stats.c 590 0x8075ffc 15 rna_Scene_statistics_string_get rna_scene.c 898 0x383f4a5 16 Scene_statistics_call rna_scene_gen.c 7828 0x3853019 17 RNA_function_call rna_access.c 7558 0x371089d 18 pyrna_func_call bpy_rna.c 6146 0x38ef4fa 19 _PyObject_FastCallKeywords 0x7ffff79d4d3c 20 call_function ``` ``` ``` doing something like this fixes the crash: [P1196: #72763 bandaid](https://archive.blender.org/developer/P1196.txt) ``` diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index dcd2a0b8fae..da6a5bfa12c 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -597,6 +597,9 @@ static float do_clump_level(float result[3], float clump = 0.0f; if (clumpcurve) { + if (clumpcurve->cm->table == NULL) { + BKE_curvemapping_initialize(clumpcurve); + } clump = pa_clump * (1.0f - clamp_f(BKE_curvemapping_evaluateF(clumpcurve, 0, time), 0.0f, 1.0f)); ``` Havent investigated though when exactly this crash came to existence (or if the above snippet is safe for ParticleThreadContext)
Philipp Oeser changed title from Blender 2.80 & 2.81 project crashes when using Clump Curves on Particle Children to Crash opening file using Clump Curves on Particle Children 2019-12-29 10:53:01 +01:00
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

I could not fix it yet. However, I noticed that even with your proposed fix, there seems to be another issue. It crashes with asan due to a stack-buffer-overflow.

I could not fix it yet. However, I noticed that even with your proposed fix, there seems to be another issue. It crashes with asan due to a stack-buffer-overflow.
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:08 +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#72763
No description provided.