Page MenuHome

Hair edit mode crashes with AMD Radeon HD 5700
Closed, ResolvedPublic


blender 2.8
intel i5
amd radeon

blender 2.8

As title says, alternating between particle hair edit mode and object mode , results in crash
Do this a couple of times right after each other

Here's the file
edit . I can't even open it anymore without blender crashing ( only 5000 hair sttrands )

Event Timeline

Edit . it seems as soon as I create a simple plane with more than 3000 hairs , blender crashes
In 2.79 I could easily go up to 15000
There is def. a memory problem in blender 2.8 , or it just doesn't like older graphics cards :(

William Reynish (billreynish) triaged this task as Needs Information from User priority.

Cannot reproduce. Please test with the latest nightly build. Yours is about a week old.

If it still happens with the latest build, you can also run blender_debug_gpu.cmd and attach the resulting log and system info files.

Philipp Oeser (lichtwerk) closed this task as Archived.
Philipp Oeser (lichtwerk) claimed this task.

Since last asking for information it has been 7 or more days, due to the policy of our bug tracker we will have to archive the report until the requested information is given.

Here is the debug gpu log

This happened after adding a hair particle system , set number of hairs to zero and manually inserting hairs in edit mode
hope this helps

Using the latest build of blender 2.8

Seems like ''atio6axx.dll'' is the culprit , I suspect this has something to do with my (old ) graphics card

Any info regarding the debug file ?

Philipp Oeser (lichtwerk) raised the priority of this task from Needs Information from User to Needs Triage by Developer.
Brecht Van Lommel (brecht) renamed this task from alternating between hair edit mode and object mode results in crash to Hair edit mode crashes with AMD Radeon HD 5700.
Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.Mar 29 2019, 6:10 PM

There were three very similar reports open, I'm merging them all into one since this all seems like the same underlying issue. For some reason, particle hair edit mode is crashing in the graphics driver on this configuration.

The graphics driver version 15.201.1151.1008 is from 2015, and this card seems to be no longer actively supported by AMD. You can try installing the graphics drivers again, either the Catalyst or Crimson Edition Beta.

If that doesn't help, it will require some kind of workaround for a likely graphics driver bug in Blender, if we decide to still officially support this GPU at all.

did reinstalling drivers help here?

Although with a different GPU (AMD Radeon HD 7500M/7600M Series), I think I could reproduce the same problem.
Here's a solution:

1diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c
2index e998b17a44f..54188371bd0 100644
3--- a/source/blender/draw/intern/draw_cache_impl_particles.c
4+++ b/source/blender/draw/intern/draw_cache_impl_particles.c
5@@ -99,7 +99,7 @@ typedef struct HairAttributeID {
7 typedef struct EditStrandData {
8 float pos[3];
9- uchar color;
10+ float color;
11 } EditStrandData;
13 static GPUVertFormat *edit_points_vert_format_get(uint *r_pos_id, uint *r_color_id)
14@@ -110,7 +110,7 @@ static GPUVertFormat *edit_points_vert_format_get(uint *r_pos_id, uint *r_color_
15 /* Keep in sync with EditStrandData */
16 pos_id = GPU_vertformat_attr_add(&edit_point_format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
17 color_id = GPU_vertformat_attr_add(
18- &edit_point_format, "color", GPU_COMP_U8, 1, GPU_FETCH_INT_TO_FLOAT_UNIT);
19+ &edit_point_format, "color", GPU_COMP_F32, 1, GPU_FETCH_FLOAT);
20 }
21 *r_pos_id = pos_id;
22 *r_color_id = color_id;
23@@ -694,11 +694,11 @@ static int particle_batch_cache_fill_segments_edit(
24 if (particle) {
25 float weight = particle_key_weight(particle, i, strand_t);
26 /* NaN or unclamped become 0xFF */
27- seg_data->color = (uchar)((weight <= 1.0f) ? 0xFE * weight : 0xFF);
28+ seg_data->color = (weight < 1.0f) ? weight : 1.0f;
29 }
30 else {
31 float selected = particle_key_select_ratio(edit, i, strand_t);
32- seg_data->color = (uchar)(0xFF * selected);
33+ seg_data->color = selected;
34 }
35 GPU_indexbuf_add_generic_vert(elb, curr_point);
36 curr_point++;
37@@ -1565,7 +1565,7 @@ static void particle_batch_cache_ensure_edit_inner_pos(PTCacheEdit *edit,
38 const PTCacheEditPoint *point = &edit->points[point_index];
39 for (int key_index = 0; key_index < point->totkey - 1; key_index++) {
40 PTCacheEditKey *key = &point->keys[key_index];
41- uchar color = (key->flag & PEK_SELECT) ? 0xFF : 0x00;
42+ float color = (key->flag & PEK_SELECT) ? 1.0f : 0.0f;
43 GPU_vertbuf_attr_set(cache->edit_inner_pos, pos_id, global_key_index, key->world_co);
44 GPU_vertbuf_attr_set(cache->edit_inner_pos, color_id, global_key_index, &color);
45 global_key_index++;
46@@ -1611,7 +1611,7 @@ static void particle_batch_cache_ensure_edit_tip_pos(PTCacheEdit *edit, Particle
47 for (int point_index = 0; point_index < edit->totpoint; point_index++) {
48 const PTCacheEditPoint *point = &edit->points[point_index];
49 PTCacheEditKey *key = &point->keys[point->totkey - 1];
50- uchar color = (key->flag & PEK_SELECT) ? 0xFF : 0x00;
51+ float color = (key->flag & PEK_SELECT) ? 1.0f : 0.0f;
52 GPU_vertbuf_attr_set(cache->edit_tip_pos, pos_id, point_index, key->world_co);
53 GPU_vertbuf_attr_set(cache->edit_tip_pos, color_id, point_index, &color);
54 }

However, this solution is disadvantageous to most other GPUs as it increases the space allocated in memory.
The ideal solution should come from the manufacturer.

I don't think this memory saving in particle edit mode is important. The number of edit particle is usually significantly smaller than the total number of child particles, and it's not a big memory increase regardless.

So as far as I'm concerned this fine to commit, if @Clément Foucault (fclem) agrees.