Crash: Sculpt Layer brush + Stroke Method "Anchored" makes Blender crash #75743

Closed
opened 2020-04-15 04:57:19 +02:00 by TheRedWaxPolice · 16 comments

System Information
Operating system: Win 10

Blender Version
Broken: blender-2.83- 04f006ea9e-windows64
Worked: blender-2.83- 85de07e64c-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
**System Information** Operating system: Win 10 **Blender Version** Broken: blender-2.83- 04f006ea9e-windows64 Worked: blender-2.83- 85de07e64c-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

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice

#76300 was marked as duplicate of this issue

#76300 was marked as duplicate of this issue

#75830 was marked as duplicate of this issue

#75830 was marked as duplicate of this issue
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

My bad, I missed the stroke method step.
Cannot redo on 51e73e9956
can you test the version I said? I'm checking on 04f00

My bad, I missed the stroke method step. ~~Cannot redo on 51e73e9956~~ ~~can you test the version I said? I'm checking on 04f00~~

@ankitm Hi. Why you added (rB) to that number in the description? That's the hash, as seen on the splash screen: image.png
Anyway, I just downloaded the current latest master to test: image.png and it still crashes. See: 2020-04-15_14-30-50.mp4

@ankitm Hi. Why you added (rB) to that number in the description? That's the hash, as seen on the splash screen: ![image.png](https://archive.blender.org/developer/F8474501/image.png) Anyway, I just downloaded the current [latest master ](https://builder.blender.org/download/) to test: ![image.png](https://archive.blender.org/developer/F8474511/image.png) and it still crashes. See: [2020-04-15_14-30-50.mp4](https://archive.blender.org/developer/F8474528/2020-04-15_14-30-50.mp4)
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Added subscriber: @PabloDobarro

Added subscriber: @PabloDobarro
Member

caused by : 47f46637be
CC: @PabloDobarro

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

caused by : 47f46637be CC: @PabloDobarro @TheRedWaxPolice Adding rB helps with clicking on it & seeing the date and differential of the commit.

This issue was referenced by e6fab27d6a

This issue was referenced by e6fab27d6a3476a08cadb7ff4ecbd467a1c0db74
Member

Added subscriber: @rpserge

Added subscriber: @rpserge

Added subscriber: @rjg

Added subscriber: @rjg

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
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 ```

Added subscriber: @JulianPerez

Added subscriber: @JulianPerez
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Pablo Dobarro self-assigned this 2020-05-05 17:15:24 +02:00
Thomas Dinges added this to the 2.83 LTS milestone 2023-02-08 16:38:05 +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
6 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#75743
No description provided.