Crash when opening a file with instances for child particles with Curve Clumping #100883

Closed
opened 2022-09-07 19:40:26 +02:00 by Dean Johnson · 10 comments

System Information
Operating system: Windows 10
Graphics card: Nvidia RTX 3070

Blender Version
Broken: 3.2.2 3.3
Worked: 2.79

Short description of error
Crashing on startup: as another user suggested: "Viewing it with a Hex editor shows that it doesn't have the required header at the start of the file which would allow Blender to recognize it as a Blend file"

Exact steps for others to reproduce the error

  • Open attached file or:
    • create 2 objects
    • Add particle system to one.
    • In {nav Particle Properties > Render} set Render As Object and choose the instance object
    • In {nav Particle Properties > Children} enable Simple
    • In {nav Particle Properties > Children > Clumping} enable Use Clump Curve
    • Save the file and reload
      particle_children_clump_curve_crash.blend
**System Information** Operating system: Windows 10 Graphics card: Nvidia RTX 3070 **Blender Version** Broken: 3.2.2 3.3 Worked: 2.79 **Short description of error** Crashing on startup: as another user suggested: "Viewing it with a Hex editor shows that it doesn't have the required header at the start of the file which would allow Blender to recognize it as a Blend file" **Exact steps for others to reproduce the error** - Open attached file or: - create 2 objects - Add particle system to one. - In {nav Particle Properties > Render} set `Render As` `Object` and choose the instance object - In {nav Particle Properties > Children} enable `Simple` - In {nav Particle Properties > Children > Clumping} enable `Use Clump Curve` - Save the file and reload [particle_children_clump_curve_crash.blend](https://archive.blender.org/developer/F13470609/particle_children_clump_curve_crash.blend)
Author

Added subscriber: @Dean-Johnson

Added subscriber: @Dean-Johnson
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Hm, for me, I get a crash here (where the CurveMapping table is NULL)
Needs some deeper investigation still

1   BKE_curvemap_evaluateF                           colortools.c            970  0x756448  
2   BKE_curvemapping_evaluateF                       colortools.c            976  0x75664f  
3   do_clump_level                                   particle_child.c        578  0xf6b048  
4   do_clump                                         particle_child.c        630  0xf6b607  
5   do_child_modifiers                               particle_child.c        851  0xf6f19f  
6   psys_get_particle_state                          particle.c              4959 0xf5741b  
7   make_duplis_particle_system                      object_dupli.cc         1430 0xea9ee0  
8   make_duplis_particles                            object_dupli.cc         1541 0xeab9ae  
9   object_duplilist                                 object_dupli.cc         1628 0xeac643  
10  (anonymous namespace)::deg_iterator_duplis_init  depsgraph_query_iter.cc 135  0x4067005 
11  (anonymous namespace)::deg_iterator_objects_step depsgraph_query_iter.cc 266  0x4069732 
12  DEG_iterator_objects_next                        depsgraph_query_iter.cc 319  0x406a255 
13  DRW_draw_render_loop_ex                          draw_manager.c          1689 0x428e79a 
14  DRW_draw_view                                    draw_manager.c          1610 0x428d8eb 
15  view3d_draw_view                                 view3d_draw.c           1540 0xa314318 
16  view3d_main_region_draw                          view3d_draw.c           1562 0xa3144a5 
17  ED_region_do_draw                                area.c                  544  0x5bc140d 
18  wm_draw_window_offscreen                         wm_draw.c               943  0x3573f38 
19  wm_draw_window                                   wm_draw.c               1110 0x35755f8 
20  wm_draw_update                                   wm_draw.c               1370 0x3577307 
                                                                             
Hm, for me, I get a crash here (where the CurveMapping table is NULL) Needs some deeper investigation still ``` 1 BKE_curvemap_evaluateF colortools.c 970 0x756448 2 BKE_curvemapping_evaluateF colortools.c 976 0x75664f 3 do_clump_level particle_child.c 578 0xf6b048 4 do_clump particle_child.c 630 0xf6b607 5 do_child_modifiers particle_child.c 851 0xf6f19f 6 psys_get_particle_state particle.c 4959 0xf5741b 7 make_duplis_particle_system object_dupli.cc 1430 0xea9ee0 8 make_duplis_particles object_dupli.cc 1541 0xeab9ae 9 object_duplilist object_dupli.cc 1628 0xeac643 10 (anonymous namespace)::deg_iterator_duplis_init depsgraph_query_iter.cc 135 0x4067005 11 (anonymous namespace)::deg_iterator_objects_step depsgraph_query_iter.cc 266 0x4069732 12 DEG_iterator_objects_next depsgraph_query_iter.cc 319 0x406a255 13 DRW_draw_render_loop_ex draw_manager.c 1689 0x428e79a 14 DRW_draw_view draw_manager.c 1610 0x428d8eb 15 view3d_draw_view view3d_draw.c 1540 0xa314318 16 view3d_main_region_draw view3d_draw.c 1562 0xa3144a5 17 ED_region_do_draw area.c 544 0x5bc140d 18 wm_draw_window_offscreen wm_draw.c 943 0x3573f38 19 wm_draw_window wm_draw.c 1110 0x35755f8 20 wm_draw_update wm_draw.c 1370 0x3577307 ``` ```

Added subscriber: @mano-wii

Added subscriber: @mano-wii

It appears to be a regression introduced in 2.80 due to the new dependency graph.

I did a hacking to get around the problem and investigate further.

diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index e4c46703f8a..78a1c49d8a9 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -950,6 +950,9 @@ void BKE_curvemapping_reset_view(CurveMapping *cumap)
 
 float BKE_curvemap_evaluateF(const CurveMapping *cumap, const CurveMap *cuma, float value)
 {
+  if (!cuma->table) {
+    curvemap_make_table(cumap, cuma);
+  }
   /* index in table */
   float fi = (value - cuma->mintable) * cuma->range;
   int i = (int)fi;

It involves particles + object instances + children + Use Clump Curve.

It appears to be a regression introduced in 2.80 due to the new dependency graph. I did a hacking to get around the problem and investigate further. ``` diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index e4c46703f8a..78a1c49d8a9 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -950,6 +950,9 @@ void BKE_curvemapping_reset_view(CurveMapping *cumap) float BKE_curvemap_evaluateF(const CurveMapping *cumap, const CurveMap *cuma, float value) { + if (!cuma->table) { + curvemap_make_table(cumap, cuma); + } /* index in table */ float fi = (value - cuma->mintable) * cuma->range; int i = (int)fi; ``` It involves particles + object instances + children + Use Clump Curve.
Germano Cavalcante changed title from Blender file crashing on startup "missing required header at start of the file" to Crash when opening a file with instances for child particles with Curve Clumping 2022-09-09 00:04:09 +02:00

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

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

This comment was removed by @Dean-Johnson

*This comment was removed by @Dean-Johnson*

This issue was referenced by 198fd56a5e

This issue was referenced by 198fd56a5e689eb668ccae106262c08badf23d9a

This issue was referenced by 7f6521f8dc

This issue was referenced by 7f6521f8dc95f175eb09c77c26f5a3eb3dc7a3c0

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-11-09 20:44:00 +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
5 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#100883
No description provided.