Page MenuHome

Crash: Sculpt Layer brush + Stroke Method "Anchored" makes Blender crash
Closed, ResolvedPublicBUG


System Information
Operating system: Win 10

Blender Version
Broken: blender-2.83- rB04f006ea9efe-windows64
Worked: blender-2.83- rB85de07e64c96-windows64

Short description of error
The new Layer brush with the Stroke Method "Anchored" makes Blender crash...

Exact steps for others to reproduce the error

  • Launch Blender
  • Go to File/New/Sculpting
  • Choose the Layer brush (L)
  • Choose the Stroke Method: Anchored
  • Perform a brush stroke on the model
  • Crash

Event Timeline

Ankit Meel (ankitm) changed the task status from Needs Triage to Needs Information from User.EditedApr 15 2020, 11:51 AM

My bad, I missed the stroke method step.
Cannot redo on rB51e73e99569d92068d26327aac636fc35db9dcff
can you test the version I said? I'm checking on rB04f00

@Ankit Meel (ankitm) Hi. Why you added (rB) to that number in the description? That's the hash, as seen on the splash screen:

Anyway, I just downloaded the current latest master to test:
and it still crashes. See:

Ankit Meel (ankitm) changed the task status from Needs Information from User to Confirmed.Apr 15 2020, 3:47 PM

caused by : rB47f46637be1bef9672ede0ab6795a7e9ea97fc6a
CC: @Pablo Dobarro (pablodp606)

@TheRedWaxPolice (TheRedWaxPolice) Adding rB helps with clicking on it & seeing the date and differential of the commit.

Philipp Oeser (lichtwerk) triaged this task as High priority.Apr 15 2020, 3:52 PM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".Apr 15 2020, 6:08 PM

When ss->layer_base is NULL, use_persistent_base is false, hence disp_factor = &ss->cache->layer_displacement_factor[vi]; is used. However, layer_displacement_factor is NULL as well.

In do_layer_brush the memory for ss->cache->layer_displacement_factor is only allocated when ss->cache->mirror_symmetry_pass == 0 && ss->cache->radial_symmetry_pass == 0 && ss->cache->first_time. The value of first_time is set to False in sculpt_stroke_update_step after the first execution.

do_layer_brush_task_cb_ex(void * userdata, const int n, const TaskParallelTLS * tls) Line 4116	C
BKE_pbvh_parallel_range(const int start, const int stop, void * userdata, void(*)(void *, const int, const TaskParallelTLS *) func, const PBVHParallelSettings * settings) Line 147	C++
do_layer_brush(Sculpt * sd, Object * ob, PBVHNode * * nodes, int totnode) Line 4176	C
do_brush_action(Sculpt * sd, Object * ob, Brush * brush, UnifiedPaintSettings * ups) Line 5371	C
do_tiled(Sculpt * sd, Object * ob, Brush * brush, UnifiedPaintSettings * ups, void(*)(Sculpt *, Object *, Brush *, UnifiedPaintSettings *) action) Line 5760	C
do_symmetrical_brush_actions(Sculpt * sd, Object * ob, void(*)(Sculpt *, Object *, Brush *, UnifiedPaintSettings *) action, UnifiedPaintSettings * ups) Line 5839	C
sculpt_stroke_update_step(bContext * C, PaintStroke * UNUSED_stroke, PointerRNA * itemptr) Line 7061	C
paint_brush_stroke_add_step(bContext * C, wmOperator * op, const float * mouse_in, float pressure) Line 623	C
paint_stroke_modal(bContext * C, wmOperator * op, const wmEvent * event) Line 1496	C
wm_handler_operator_call(bContext * C, ListBase * handlers, wmEventHandler * handler_base, wmEvent * event, PointerRNA * properties, const unsigned char * kmi_idname) Line 2006	C
wm_handlers_do_intern(bContext * C, wmEvent * event, ListBase * handlers) Line 2788	C
wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 2836	C
wm_event_do_handlers(bContext * C) Line 3231	C
WM_main(bContext * C) Line 453	C
main(int argc, const unsigned char * * UNUSED_argv_c) Line 526	C