Hair: changing children related settings not updating in particle editmode #69000

Open
opened 2019-08-21 16:53:35 +02:00 by Tarkan · 19 comments

System Information
Operating system: Windows-10-10.0.17134 64 Bits
Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.73

Blender Version
Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: f6cb5f5449
Worked: (optional)

Short description of error
Hair particle system children won't update/refresh in viewport when editing their parameters

Exact steps for others to reproduce the error

  • Add a hair particle system on any object and enable children (Simple)
  • Go to particle edit mode and enable children from right panel (N) ->Tool -> Options -> Viewport Display
  • Choose point select mode
  • Try changing any parameters related to the particle system's children or delete a particle point and will see no change on the viewport part (update occurs only after moving point or using settings like "Comb")

bug1.blend

**System Information** Operating system: Windows-10-10.0.17134 64 Bits Graphics card: GeForce GTX 1050/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.73 **Blender Version** Broken: version: 2.80 (sub 75), branch: master, commit date: 2019-07-29 14:47, hash: `f6cb5f5449` Worked: (optional) **Short description of error** Hair particle system children won't update/refresh in viewport when editing their parameters **Exact steps for others to reproduce the error** - Add a hair particle system on any object and enable children (Simple) - Go to particle edit mode and enable children from right panel (N) ->Tool -> Options -> Viewport Display - Choose point select mode - Try changing any parameters related to the particle system's children or delete a particle point and will see no change on the viewport part (update occurs only after moving point or using settings like "Comb") [bug1.blend](https://archive.blender.org/developer/F7680941/bug1.blend)
Author

Added subscriber: @TarkanV

Added subscriber: @TarkanV

#76506 was marked as duplicate of this issue

#76506 was marked as duplicate of this issue

#68655 was marked as duplicate of this issue

#68655 was marked as duplicate of this issue

#71105 was marked as duplicate of this issue

#71105 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Can confirm

Can confirm
Member

Blender, you keep confusing me.

Did a little digging, and this seems to work:
P1076: #69000 part 1



diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index cadd66d564a..d28f5105186 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -615,7 +615,7 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem,
   }
 }
 
-static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr, short flag)
+static void particle_recalc(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr, short flag)
 {
   if (ptr->type == &RNA_ParticleSystem) {
     Object *ob = ptr->id.data;
@@ -626,6 +626,17 @@ static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN
     DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
   }
   else {
+    /* This seems to be additionally needed for particle edit mode. */
+    ParticleSettings *part = ptr->data;
+    for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
+      for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) {
+        if (psys->part == part) {
+          BKE_particle_batch_cache_dirty_tag(psys, BKE_PARTICLE_BATCH_DIRTY_ALL);
+        }
+      }
+    }
+
+    /* this is enough for object mode */
     DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | flag);
   }
 

What is still unclear to me is this:
Even without this, I can see this being done in objectmode:

graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_INIT()
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_RESET()
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE()
[SCScene :: View Layer]: Accumulated recalc bits for OBCube: 2
[SCScene :: View Layer]: Accumulated recalc bits for PAParticleSettings: 8226
[SCScene :: View Layer]: deg_evaluate_copy_on_write on PAParticleSettings (0x7f7173efd008)
[SCScene :: View Layer]: BKE_particle_settings_eval_reset on PAParticleSettings (0x7f7173efd008)
[SCScene :: View Layer]: BKE_particle_system_eval_init on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_eval_ptcache_reset on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_eval_uber_data on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_handle_data_update on OBCube (0x7f7173f92208)
Depsgraph updated in 0.011957 seconds.

And this is in particle editmode:

graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_INIT()
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_RESET()
[SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_EVAL()
[SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE()
[SCScene :: View Layer]: Accumulated recalc bits for OBCube: 2
[SCScene :: View Layer]: Accumulated recalc bits for PAParticleSettings: 8226
[SCScene :: View Layer]: deg_evaluate_copy_on_write on PAParticleSettings (0x7f7173efd008)
[SCScene :: View Layer]: BKE_particle_settings_eval_reset on PAParticleSettings (0x7f7173efd008)
[SCScene :: View Layer]: BKE_particle_system_eval_init on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_eval_ptcache_reset on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_eval_uber_data on OBCube (0x7f7173f92208)
[SCScene :: View Layer]: BKE_object_handle_data_update on OBCube (0x7f7173f92208)
Depsgraph updated in 0.012030 seconds.

Seems to do the same stuff, no?
Also BKE_particle_batch_cache_dirty_tag is called for both... (as part of BKE_object_eval_uber_data)
But edits just dont seem to come over to the correct ParticleSystems...
(this can go wrong the other way around as well: change children length in PE mode, then in OB mode --> go back to PE mode --> out of sync...)
Anyways, this all seem to be resolved by above patch (it seems)


Same is true for EffectorWeights btw. (changing those in particle editmode has no influence at all).
Here I am not even sure if these should be displayed in PE mode (2.79 also didnt do this), and doing the correct update in rna_EffectorWeight_update might be tricky...


This all being said, there might be a better way to do this, or this might not be look at at all (since new particles and hair are already on the way...)

Blender, you keep confusing me. Did a little digging, and this seems to work: [P1076: #69000 part 1](https://archive.blender.org/developer/P1076.txt) ``` diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index cadd66d564a..d28f5105186 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -615,7 +615,7 @@ static void rna_ParticleSystem_mcol_on_emitter(ParticleSystem *particlesystem, } } -static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr, short flag) +static void particle_recalc(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr, short flag) { if (ptr->type == &RNA_ParticleSystem) { Object *ob = ptr->id.data; @@ -626,6 +626,17 @@ static void particle_recalc(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRN DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { + /* This seems to be additionally needed for particle edit mode. */ + ParticleSettings *part = ptr->data; + for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) { + for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) { + if (psys->part == part) { + BKE_particle_batch_cache_dirty_tag(psys, BKE_PARTICLE_BATCH_DIRTY_ALL); + } + } + } + + /* this is enough for object mode */ DEG_id_tag_update(ptr->id.data, ID_RECALC_GEOMETRY | flag); } ``` What is still unclear to me is this: Even without this, I can see this being done in objectmode: ``` graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_INIT() [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_RESET() [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_EVAL() [SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE() [SCScene :: View Layer]: Accumulated recalc bits for OBCube: 2 [SCScene :: View Layer]: Accumulated recalc bits for PAParticleSettings: 8226 [SCScene :: View Layer]: deg_evaluate_copy_on_write on PAParticleSettings (0x7f7173efd008) [SCScene :: View Layer]: BKE_particle_settings_eval_reset on PAParticleSettings (0x7f7173efd008) [SCScene :: View Layer]: BKE_particle_system_eval_init on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_eval_ptcache_reset on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_eval_uber_data on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_handle_data_update on OBCube (0x7f7173f92208) Depsgraph updated in 0.011957 seconds. ``` And this is in particle editmode: ``` graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=GEOMETRY, PSYS_CHILD source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT graph_id_tag_update: id=PAParticleSettings flags=COPY_ON_WRITE source=USER_EDIT [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_INIT() [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_RESET() [SCScene :: View Layer]: Operation is entry point for update: PARTICLE_SETTINGS_EVAL() [SCScene :: View Layer]: Operation is entry point for update: COPY_ON_WRITE() [SCScene :: View Layer]: Accumulated recalc bits for OBCube: 2 [SCScene :: View Layer]: Accumulated recalc bits for PAParticleSettings: 8226 [SCScene :: View Layer]: deg_evaluate_copy_on_write on PAParticleSettings (0x7f7173efd008) [SCScene :: View Layer]: BKE_particle_settings_eval_reset on PAParticleSettings (0x7f7173efd008) [SCScene :: View Layer]: BKE_particle_system_eval_init on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_eval_ptcache_reset on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_eval_uber_data on OBCube (0x7f7173f92208) [SCScene :: View Layer]: BKE_object_handle_data_update on OBCube (0x7f7173f92208) Depsgraph updated in 0.012030 seconds. ``` Seems to do the same stuff, no? Also `BKE_particle_batch_cache_dirty_tag` is called for both... (as part of `BKE_object_eval_uber_data`) But edits just dont seem to come over to the correct ParticleSystems... (this can go wrong the other way around as well: change children length in PE mode, then in OB mode --> go back to PE mode --> out of sync...) Anyways, this all seem to be resolved by above patch (it seems) ------------------------------- Same is true for `EffectorWeights` btw. (changing those in particle editmode has no influence at all). Here I am not even sure if these should be displayed in PE mode (2.79 also didnt do this), and doing the correct update in `rna_EffectorWeight_update` might be tricky... ------------------------------- This all being said, there might be a better way to do this, or this might not be look at at all (since new particles and hair are already on the way...)
Member

This is the backtracke for deleting a whole particle, then Undo (cannot reproduce an Undo crash if I only delete a particle key...)
There, some ParticleCacheKey is broken...

1   copy_v3_v3                                                                                                                                                                                                math_vector_inline.c 63   0x22f5150 
2   offset_child                                                                                                                                                                                              particle.c           2196 0x22fb9be 
3   psys_thread_create_path                                                                                                                                                                                   particle.c           2642 0x22fd2cd 
4   exec_child_path_cache                                                                                                                                                                                     particle.c           2752 0x22fd83f 
5   BLI_task_pool_work_and_wait                                                                                                                                                                               task.c               939  0x24e2146 
6   psys_cache_child_paths                                                                                                                                                                                    particle.c           2814 0x22fdaff 
7   psys_update_path_cache                                                                                                                                                                                    particle_system.c    3245 0x231474a 
8   hair_step                                                                                                                                                                                                 particle_system.c    3541 0x231570a 
9   particle_system_update                                                                                                                                                                                    particle_system.c    4687 0x2318e71 
10  deformVerts                                                                                                                                                                                               MOD_particlesystem.c 212  0x2dd2ab5 
11  modwrap_deformVerts                                                                                                                                                                                       modifier.c           960  0x22affab 
12  mesh_calc_modifiers                                                                                                                                                                                       DerivedMesh.c        1221 0x24022a8 
13  mesh_build_data                                                                                                                                                                                           DerivedMesh.c        2056 0x240508f 
14  makeDerivedMesh                                                                                                                                                                                           DerivedMesh.c        2185 0x240556d 
15  BKE_object_handle_data_update                                                                                                                                                                             object_update.c      186  0x22ed7ee 
16  BKE_object_eval_uber_data                                                                                                                                                                                 object_update.c      354  0x22ee0b2
This is the backtracke for deleting a whole particle, then Undo (cannot reproduce an Undo crash if I only delete a particle key...) There, some ParticleCacheKey is broken... ``` 1 copy_v3_v3 math_vector_inline.c 63 0x22f5150 2 offset_child particle.c 2196 0x22fb9be 3 psys_thread_create_path particle.c 2642 0x22fd2cd 4 exec_child_path_cache particle.c 2752 0x22fd83f 5 BLI_task_pool_work_and_wait task.c 939 0x24e2146 6 psys_cache_child_paths particle.c 2814 0x22fdaff 7 psys_update_path_cache particle_system.c 3245 0x231474a 8 hair_step particle_system.c 3541 0x231570a 9 particle_system_update particle_system.c 4687 0x2318e71 10 deformVerts MOD_particlesystem.c 212 0x2dd2ab5 11 modwrap_deformVerts modifier.c 960 0x22affab 12 mesh_calc_modifiers DerivedMesh.c 1221 0x24022a8 13 mesh_build_data DerivedMesh.c 2056 0x240508f 14 makeDerivedMesh DerivedMesh.c 2185 0x240556d 15 BKE_object_handle_data_update object_update.c 186 0x22ed7ee 16 BKE_object_eval_uber_data object_update.c 354 0x22ee0b2 ```
Philipp Oeser changed title from Hair particle system refresh and crash problem to Hair: changing children related settings not updating in particle editmode (also crash when deleting a particle, then undo) 2019-09-04 11:39:00 +02:00
Member
Note the crasher on delete, undo is also fixed by [D5755: Fix #68645: Hair Particle Edit - Particle Mirror crash when children are visible in the viewport](https://archive.blender.org/developer/D5755)

Added subscriber: @Floatharr

Added subscriber: @Floatharr

Added subscriber: @grosgood

Added subscriber: @grosgood

@lichtwerk
Ah me. I can't connect the dot(s) from what I'm seeing to your August 21 musings.
Generally, what I'm seeing is AddressSanitizer catching a heap-buffer-overflow at particle.c:2549 in psys_thread_create_path. Just before falling into the abyss:

 [2548]    /* get the parent path */
 [2549]    key[0] = pcache[cpa->parent];

where:

(gdb) p *cpa
$50 = {
  num = -1, 
  parent = 1, 
  pa = {0, 0, 0, 0}, 
  w = {0, 0, 0, 0}, 
  fuv = {-0.0304894447, 0.411474943, 0.795426488, 0}, 
  foffset = 0, 
  rt = 0
}

But:

(gdb) p pcache[1]
$51 = (ParticleCacheKey *) 0x0

which offends the AddressSanitizer Gods.

A few lines up, at line 2549 where PTCacheEdit *edit is initialized, and from that pcache,
there seems to be a predicator of the buffer overflow in the bowels of *edit, in that the total point count exceeds the total cache count by one:

(gdb) p *edit
$52 = {
  flags = 0, 
  points = 0x604000306e98, 
  pid = {
    next = 0x0, 
    prev = 0x0, 
    scene = 0x0, 
    ob = 0x61b00013a988, 
    calldata = 0x617000142e88, 
    type = 1, 
    file_type = 0, 
    stack_index = 4294967295, 
    flag = 0, 
    default_step = 1, 
    max_step = 20, 
    data_types = 7, 
    info_types = 64, 
    write_point = 0x555576f57ea7 <ptcache_particle_write>, 
    read_point = 0x555576f593f7 <ptcache_particle_read>, 
    interpolate_point = 0x555576f5ac18 <ptcache_particle_interpolate>, 
    write_stream = 0x0, 
    read_stream = 0x0, 
    write_openvdb_stream = 0x0, 
    read_openvdb_stream = 0x0, 
    write_extra_data = 0x0, 
    read_extra_data = 0x0, 
    interpolate_extra_data = 0x0, 
    totpoint = 0x555576f5c0b4 <ptcache_particle_totpoint>, 
    error = 0x555576f5c14a <ptcache_particle_error>, 
    totwrite = 0x555576f5c159 <ptcache_particle_totwrite>, 
    write_header = 0x555576f565fb <ptcache_basic_header_write>, 
    read_header = 0x555576f5647e <ptcache_basic_header_read>, 
    cache = 0x61a0001bc088, 
    cache_ptr = 0x6170001430d0, 
    ptcaches = 0x6170001430d8
  }, 
  psys = 0x617000142e88, 
  psys_eval = 0x0, 
  psmd = 0x60f00007bd38, 
  psmd_eval = 0x0, 
  emitter_field = 0x60300027c678, 
  emitter_cosnos = 0x62900014a208, 
  mirror_cache = 0x0, 
  pathcache = 0x602000287178, 
  pathcachebufs = {
    first = 0x603000489708, 
    last = 0x603000489708
  }, 
  totpoint = 2,      /* totpoint and totcached are off by one... */ 
  totframes = 0, 
  totcached = 1, 
  edited = 0, 
  sel_col = "\377\377\377", 
  nosel_col = "\000\000"
}

psys_thread_create_path() is a busy boy, being called once for each child particle in a head of hair. In the example blend file I'm debugging with (hair_bug.blend), there are four child hair particles, so four threads run: two for parent hair zero, and two for parent hair one. ChildParticle *cpa is set up by the caller, and its parent index reflects this relationship. In this simple setting, two threads will index a parent that isn't in the cache, and stuff hits the fan.

So the obvious thing is out-of-sync structures, and I surmise that your August 21 musings on dependency graphs stems from this out-of-sync-ness, which I trust you've seen in one form or another. I haven't confirmed these guesses, because it is getting late, there are dogs to walk, and tomorrow I am with clients. Ah me.

Blend file and other artifacts attached, which may be useful. Take care.


hair_bug.blend
hair_bug.blend

system-info.txt
**system-info.txt

address_sanitizer.txt
address_sanitizer.txt

Debugger command line, to get dependency graph dumps and single-thread as much as possible.

(gdb) show args
Argument list to give program being debugged when it is started is "--threads 1 --debug-depsgraph-no-threads --debug-depsgraph /media/render/gosgood/twoeight/hair_bug.blend ".
@lichtwerk Ah me. I can't connect the dot(s) from what I'm seeing to your August 21 musings. Generally, what I'm seeing is AddressSanitizer catching a heap-buffer-overflow at [particle.c:2549](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/particle.c$2549) in psys_thread_create_path. Just before falling into the abyss: ``` [2548] /* get the parent path */ [2549] key[0] = pcache[cpa->parent]; ``` where: ``` (gdb) p *cpa $50 = { num = -1, parent = 1, pa = {0, 0, 0, 0}, w = {0, 0, 0, 0}, fuv = {-0.0304894447, 0.411474943, 0.795426488, 0}, foffset = 0, rt = 0 } ``` But: ``` (gdb) p pcache[1] $51 = (ParticleCacheKey *) 0x0 ``` which offends the AddressSanitizer Gods. A few lines up, at [line 2549](https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/particle.c$2549) where PTCacheEdit *edit is initialized, and from that pcache, there seems to be a predicator of the buffer overflow in the bowels of *edit, in that the total point count exceeds the total cache count by one: ``` (gdb) p *edit $52 = { flags = 0, points = 0x604000306e98, pid = { next = 0x0, prev = 0x0, scene = 0x0, ob = 0x61b00013a988, calldata = 0x617000142e88, type = 1, file_type = 0, stack_index = 4294967295, flag = 0, default_step = 1, max_step = 20, data_types = 7, info_types = 64, write_point = 0x555576f57ea7 <ptcache_particle_write>, read_point = 0x555576f593f7 <ptcache_particle_read>, interpolate_point = 0x555576f5ac18 <ptcache_particle_interpolate>, write_stream = 0x0, read_stream = 0x0, write_openvdb_stream = 0x0, read_openvdb_stream = 0x0, write_extra_data = 0x0, read_extra_data = 0x0, interpolate_extra_data = 0x0, totpoint = 0x555576f5c0b4 <ptcache_particle_totpoint>, error = 0x555576f5c14a <ptcache_particle_error>, totwrite = 0x555576f5c159 <ptcache_particle_totwrite>, write_header = 0x555576f565fb <ptcache_basic_header_write>, read_header = 0x555576f5647e <ptcache_basic_header_read>, cache = 0x61a0001bc088, cache_ptr = 0x6170001430d0, ptcaches = 0x6170001430d8 }, psys = 0x617000142e88, psys_eval = 0x0, psmd = 0x60f00007bd38, psmd_eval = 0x0, emitter_field = 0x60300027c678, emitter_cosnos = 0x62900014a208, mirror_cache = 0x0, pathcache = 0x602000287178, pathcachebufs = { first = 0x603000489708, last = 0x603000489708 }, totpoint = 2, /* totpoint and totcached are off by one... */ totframes = 0, totcached = 1, edited = 0, sel_col = "\377\377\377", nosel_col = "\000\000" } ``` psys_thread_create_path() is a busy boy, being called once for each child particle in a head of hair. In the example blend file I'm debugging with (**hair_bug.blend**), there are four child hair particles, so four threads run: two for parent hair zero, and two for parent hair one. ChildParticle *cpa is set up by the caller, and its parent index reflects this relationship. In this simple setting, two threads will index a parent that isn't in the cache, and stuff hits the fan. So the obvious thing is out-of-sync structures, and I surmise that your August 21 musings on dependency graphs stems from this out-of-sync-ness, which I trust you've seen in one form or another. I haven't confirmed these guesses, because it is getting late, there are dogs to walk, and tomorrow I am with clients. Ah me. Blend file and other artifacts attached, which may be useful. Take care. ``` ``` [hair_bug.blend](https://archive.blender.org/developer/F7863802/hair_bug.blend) **hair_bug.blend** [system-info.txt](https://archive.blender.org/developer/F7863813/system-info.txt) **system-info.txt [address_sanitizer.txt](https://archive.blender.org/developer/F7863819/address_sanitizer.txt) **address_sanitizer.txt** Debugger command line, to get dependency graph dumps and single-thread as much as possible. ``` (gdb) show args Argument list to give program being debugged when it is started is "--threads 1 --debug-depsgraph-no-threads --debug-depsgraph /media/render/gosgood/twoeight/hair_bug.blend ". ```

@lichtwerk
For what it is worth, I applied D5912 & D5914 here - no longer seeing the buffer overwrite or total point count / total cache count disagreement. These look like a go. Gave me useful insights as well; thank you for that. Very much appreciate your work in this dusty old particle code. Thank you for that as well.

@lichtwerk For what it is worth, I applied [D5912](https://archive.blender.org/developer/D5912) & [D5914](https://archive.blender.org/developer/D5914) here - no longer seeing the buffer overwrite or total point count / total cache count disagreement. These look like a go. Gave me useful insights as well; thank you for that. Very much appreciate your work in this dusty old particle code. Thank you for that as well.
Member

Added subscriber: @LucaDiCecca

Added subscriber: @LucaDiCecca
Philipp Oeser changed title from Hair: changing children related settings not updating in particle editmode (also crash when deleting a particle, then undo) to Hair: changing children related settings not updating in particle editmode 2020-01-29 13:20:45 +01:00
Member

Crasher is resolved, only missing update left for this report, updated report accordingly.
Will have a look at the patch again as it might some tweaking (totally forgot about this one).

Crasher is resolved, only missing update left for this report, updated report accordingly. Will have a look at the patch again as it might some tweaking (totally forgot about this one).
Member

Added subscriber: @rwman

Added subscriber: @rwman

Added subscriber: @Vyach

Added subscriber: @Vyach

Added subscriber: @TheOldBen

Added subscriber: @TheOldBen

Added subscriber: @aleksijuvani

Added subscriber: @aleksijuvani
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:47:53 +01:00
Philipp Oeser added the
Interest
Core
label 2023-02-10 11:09:56 +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
8 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#69000
No description provided.