Curve hair slide brush crashes due to empty/missing surface_uv_coords attribute #100673

Closed
opened 2022-08-28 12:42:34 +02:00 by mill mill · 18 comments

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.59

Blender Version
Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-08-27 07:09, hash: f7ce20e340
Worked: (newest version of Blender that worked as expected)

Short description of error

Using the slide brush on the hair in the following file crashes Blender.

hairSlideBrushCrash.blend

With the following backtrace.

frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25
   282        const float radius_falloff = BKE_brush_curve_strength(
   283            brush_, dist_to_brush_cu, brush_radius_cu);
   284
-> 285        const float2 uv = surface_uv_coords[curve_i];
   286        ReverseUVSampler::Result result = reverse_uv_sampler_orig.sample(uv);
   287        if (result.type != ReverseUVSampler::ResultType::Ok) {
   288          /* The curve does not have a valid surface attachment. */
(lldb) bt
* thread #1, name = 'blender', stop reason = signal SIGABRT
    frame #0: 0x00007ffff7e414dc libc.so.6`___lldb_unnamed_symbol3503 + 268
    frame #1: 0x00007ffff7df1998 libc.so.6`raise + 24
    frame #2: 0x00007ffff7ddb53d libc.so.6`abort + 215
    frame #3: 0x000000000ec86429 blender`_BLI_assert_abort at BLI_assert.c:46:3
    frame #4: 0x00000000003666a1 blender`blender::Span<blender::vec_base<float, 2> >::operator[](this=0x00007fffffffcc48, index=0) const at BLI_span.hh:233:5
  * frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25
    frame #6: 0x0000000001f4244b blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(this=0x00007fffffffd6e8) at curves_sculpt_slide.cc:257:13
    frame #7: 0x0000000001f41d61 blender`blender::ed::sculpt_paint::SlideOperationExecutor::execute(this=0x00007fffffffd6e8, self=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:221:13
    frame #8: 0x0000000001f410e6 blender`blender::ed::sculpt_paint::SlideOperation::on_stroke_extended(this=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:480:12
    frame #9: 0x0000000001f19fbc blender`blender::ed::sculpt_paint::stroke_update_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, UNUSED_stroke=0x00007fffcaa12208, stroke_element=0x00007fffffffdc08) at curves_sculpt_ops.cc:193:25
    frame #10: 0x0000000001f8c4d3 blender`paint_brush_stroke_add_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, stroke=0x00007fffcaa12208, mval=0x00007fffffffdce0, pressure=1) at paint_stroke.c:631:5
    frame #11: 0x0000000001f8a5e9 blender`paint_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8, stroke_p=0x00007fffc72283b0) at paint_stroke.c:1578:11
    frame #12: 0x0000000001f19dd9 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:236:22
    frame #13: 0x0000000001f19d42 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:221:22
    frame #14: 0x0000000000a5437d blender`wm_operator_invoke(C=0x00007ffff3f84388, ot=0x00007ffff44e4568, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1424:16
    frame #15: 0x0000000000a572da blender`wm_handler_operator_call(C=0x00007ffff3f84388, handlers=0x00007fffd36f5e40, handler_base=0x00007fffeb78bc68, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, kmi_idname="SCULPT_CURVES_OT_brush_stroke") at wm_event_system.cc:2458:16
    frame #16: 0x0000000000a55ce7 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40, handler=0x00007fffeb78bc68, keymap=0x00007fffd3475a28, do_debug_handler=false) at wm_event_system.cc:2850:21
    frame #17: 0x0000000000a55345 blender`wm_handlers_do_intern(C=0x00007ffff3f84388, win=0x00007fffd36ccf08, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3176:26
    frame #18: 0x0000000000a4d29f blender`wm_handlers_do(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3314:16
    frame #19: 0x0000000000a57f1e blender`wm_event_do_region_handlers(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, region=0x00007fffd36f5d08) at wm_event_system.cc:3733:10
    frame #20: 0x0000000000a4e414 blender`wm_event_do_handlers_area_regions(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, area=0x00007fffd36cac88) at wm_event_system.cc:3763:10
    frame #21: 0x0000000000a4c641 blender`::wm_event_do_handlers(C=0x00007ffff3f84388) at wm_event_system.cc:3959:23
    frame #22: 0x0000000000a3e547 blender`WM_main(C=0x00007ffff3f84388) at wm.c:637:5
    frame #23: 0x000000000022fea9 blender`main(argc=2, argv=0x00007fffffffe9a8) at creator.c:546:5
    frame #24: 0x00007ffff7ddc2d0 libc.so.6`___lldb_unnamed_symbol3142 + 128
    frame #25: 0x00007ffff7ddc38a libc.so.6`__libc_start_main + 138
    frame #26: 0x000000000022fa65 blender`_start at start.S:115
(lldb) p surface_uv_coords
(const blender::Span<blender::vec_base<float, 2> >) $1 = {
  data_ = nullptr
  size_ = 0
}

The Curves object misses the surface_UV_coordinate attribute, should rather look like this:

{F13433814 size=full}

In a repro case built from scratch, I can just remove that attribute by hand from the UI and also get the crash

**System Information** Operating system: Windows-10-10.0.19042-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.59 **Blender Version** Broken: version: 3.3.0 Beta, branch: master, commit date: 2022-08-27 07:09, hash: `f7ce20e340` Worked: (newest version of Blender that worked as expected) **Short description of error** Using the slide brush on the hair in the following file crashes Blender. [hairSlideBrushCrash.blend](https://archive.blender.org/developer/F13433364/hairSlideBrushCrash.blend) With the following backtrace. ```lines=10 frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25 282 const float radius_falloff = BKE_brush_curve_strength( 283 brush_, dist_to_brush_cu, brush_radius_cu); 284 -> 285 const float2 uv = surface_uv_coords[curve_i]; 286 ReverseUVSampler::Result result = reverse_uv_sampler_orig.sample(uv); 287 if (result.type != ReverseUVSampler::ResultType::Ok) { 288 /* The curve does not have a valid surface attachment. */ (lldb) bt * thread #1, name = 'blender', stop reason = signal SIGABRT frame #0: 0x00007ffff7e414dc libc.so.6`___lldb_unnamed_symbol3503 + 268 frame #1: 0x00007ffff7df1998 libc.so.6`raise + 24 frame #2: 0x00007ffff7ddb53d libc.so.6`abort + 215 frame #3: 0x000000000ec86429 blender`_BLI_assert_abort at BLI_assert.c:46:3 frame #4: 0x00000000003666a1 blender`blender::Span<blender::vec_base<float, 2> >::operator[](this=0x00007fffffffcc48, index=0) const at BLI_span.hh:233:5 * frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25 frame #6: 0x0000000001f4244b blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(this=0x00007fffffffd6e8) at curves_sculpt_slide.cc:257:13 frame #7: 0x0000000001f41d61 blender`blender::ed::sculpt_paint::SlideOperationExecutor::execute(this=0x00007fffffffd6e8, self=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:221:13 frame #8: 0x0000000001f410e6 blender`blender::ed::sculpt_paint::SlideOperation::on_stroke_extended(this=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:480:12 frame #9: 0x0000000001f19fbc blender`blender::ed::sculpt_paint::stroke_update_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, UNUSED_stroke=0x00007fffcaa12208, stroke_element=0x00007fffffffdc08) at curves_sculpt_ops.cc:193:25 frame #10: 0x0000000001f8c4d3 blender`paint_brush_stroke_add_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, stroke=0x00007fffcaa12208, mval=0x00007fffffffdce0, pressure=1) at paint_stroke.c:631:5 frame #11: 0x0000000001f8a5e9 blender`paint_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8, stroke_p=0x00007fffc72283b0) at paint_stroke.c:1578:11 frame #12: 0x0000000001f19dd9 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:236:22 frame #13: 0x0000000001f19d42 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:221:22 frame #14: 0x0000000000a5437d blender`wm_operator_invoke(C=0x00007ffff3f84388, ot=0x00007ffff44e4568, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1424:16 frame #15: 0x0000000000a572da blender`wm_handler_operator_call(C=0x00007ffff3f84388, handlers=0x00007fffd36f5e40, handler_base=0x00007fffeb78bc68, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, kmi_idname="SCULPT_CURVES_OT_brush_stroke") at wm_event_system.cc:2458:16 frame #16: 0x0000000000a55ce7 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40, handler=0x00007fffeb78bc68, keymap=0x00007fffd3475a28, do_debug_handler=false) at wm_event_system.cc:2850:21 frame #17: 0x0000000000a55345 blender`wm_handlers_do_intern(C=0x00007ffff3f84388, win=0x00007fffd36ccf08, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3176:26 frame #18: 0x0000000000a4d29f blender`wm_handlers_do(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3314:16 frame #19: 0x0000000000a57f1e blender`wm_event_do_region_handlers(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, region=0x00007fffd36f5d08) at wm_event_system.cc:3733:10 frame #20: 0x0000000000a4e414 blender`wm_event_do_handlers_area_regions(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, area=0x00007fffd36cac88) at wm_event_system.cc:3763:10 frame #21: 0x0000000000a4c641 blender`::wm_event_do_handlers(C=0x00007ffff3f84388) at wm_event_system.cc:3959:23 frame #22: 0x0000000000a3e547 blender`WM_main(C=0x00007ffff3f84388) at wm.c:637:5 frame #23: 0x000000000022fea9 blender`main(argc=2, argv=0x00007fffffffe9a8) at creator.c:546:5 frame #24: 0x00007ffff7ddc2d0 libc.so.6`___lldb_unnamed_symbol3142 + 128 frame #25: 0x00007ffff7ddc38a libc.so.6`__libc_start_main + 138 frame #26: 0x000000000022fa65 blender`_start at start.S:115 (lldb) p surface_uv_coords (const blender::Span<blender::vec_base<float, 2> >) $1 = { data_ = nullptr size_ = 0 } ``` The Curves object misses the `surface_UV_coordinate` attribute, should rather look like this: {[F13433814](https://archive.blender.org/developer/F13433814/image.png) size=full} In a repro case built from scratch, I can just remove that attribute by hand from the UI and also get the crash
Author

Added subscriber: @mill

Added subscriber: @mill
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Cannot repro here

**System Information**
Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.34.9000 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 495.44
version: 3.4.0 Alpha, branch: master, commit date: 2022-08-28 21:55, hash: `rB91b88d3d9409`

Please open Blender's installation directory and double click on the blender_debug_gpu.cmd. This will start Blender in debug mode and create log files. Try to reproduce the error again. Once it crashes or you close Blender manually the Windows Explorer should open and show you up to two files, a debug log and the system information. Add them to your bug report by clicking on the upload button as shown in the screenshot below or via drag and drop. Please also upload the crash log located in C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt (or simply type %TEMP% into the path bar of the Windows Explorer).2019_12_04_upload_icon_developer_blender_org.png

Also: does it crash in any file? Does sliding crash in the following file?
#100673.blend

If not, please provide an example .blend file where it crashes.

Cannot repro here ``` **System Information** Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.34.9000 64 Bits Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 495.44 version: 3.4.0 Alpha, branch: master, commit date: 2022-08-28 21:55, hash: `rB91b88d3d9409` ``` Please open Blender's installation directory and double click on the `blender_debug_gpu.cmd`. This will start Blender in debug mode and create log files. Try to reproduce the error again. Once it crashes or you close Blender manually the Windows Explorer should open and show you up to two files, a debug log and the system information. Add them to your bug report by clicking on the upload button as shown in the screenshot below or via drag and drop. Please also upload the crash log located in `C:\Users\[your username]\AppData\Local\Temp\[project name].crash.txt` (or simply type `%TEMP%` into the path bar of the Windows Explorer).![2019_12_04_upload_icon_developer_blender_org.png](https://archive.blender.org/developer/F8190038/2019_12_04_upload_icon_developer_blender_org.png) Also: does it crash in any file? Does sliding crash in the following file? [#100673.blend](https://archive.blender.org/developer/F13429612/T100673.blend) If not, please provide an example .blend file where it crashes.
Author

Hi,

It does not crash in a simple file.
Unfortunatlly I can not share the blend file.
Instead I attached the txt file.blender_debug_output.txt
tmp2.crash.txt

blender_debug_output.txt

blender_system_info.txt

Hi, It does not crash in a simple file. Unfortunatlly I can not share the blend file. Instead I attached the txt file.[blender_debug_output.txt](https://archive.blender.org/developer/F13430313/blender_debug_output.txt) [tmp2.crash.txt](https://archive.blender.org/developer/F13430321/tmp2.crash.txt) [blender_debug_output.txt](https://archive.blender.org/developer/F13430320/blender_debug_output.txt) [blender_system_info.txt](https://archive.blender.org/developer/F13430319/blender_system_info.txt)
Member

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

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

Added subscriber: @OmarEmaraDev

Added subscriber: @OmarEmaraDev
Member

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

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

Do you happened to have symmetry enabled for the brush? If yes, does disabling it make the crash go away?
Can you try to strip the file as much as possible such that it is possible to share? Or is that not feasible?

Do you happened to have symmetry enabled for the brush? If yes, does disabling it make the crash go away? Can you try to strip the file as much as possible such that it is possible to share? Or is that not feasible?
Author

Hi,

symmetry is not enabled.
I attached the blend file.tmp.blend

Hi, symmetry is not enabled. I attached the blend file.[tmp.blend](https://archive.blender.org/developer/F13430890/tmp.blend)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

I can repro the crash in uploaded file

I can repro the crash in uploaded file
Member

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

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

It seems to crash due to a missing UV map, but I can see a UV map correctly assigned, so not sure.

frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25
   282        const float radius_falloff = BKE_brush_curve_strength(
   283            brush_, dist_to_brush_cu, brush_radius_cu);
   284
-> 285        const float2 uv = surface_uv_coords[curve_i];
   286        ReverseUVSampler::Result result = reverse_uv_sampler_orig.sample(uv);
   287        if (result.type != ReverseUVSampler::ResultType::Ok) {
   288          /* The curve does not have a valid surface attachment. */
(lldb) bt
* thread #1, name = 'blender', stop reason = signal SIGABRT
    frame #0: 0x00007ffff7e414dc libc.so.6`___lldb_unnamed_symbol3503 + 268
    frame #1: 0x00007ffff7df1998 libc.so.6`raise + 24
    frame #2: 0x00007ffff7ddb53d libc.so.6`abort + 215
    frame #3: 0x000000000ec86429 blender`_BLI_assert_abort at BLI_assert.c:46:3
    frame #4: 0x00000000003666a1 blender`blender::Span<blender::vec_base<float, 2> >::operator[](this=0x00007fffffffcc48, index=0) const at BLI_span.hh:233:5
  * frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25
    frame #6: 0x0000000001f4244b blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(this=0x00007fffffffd6e8) at curves_sculpt_slide.cc:257:13
    frame #7: 0x0000000001f41d61 blender`blender::ed::sculpt_paint::SlideOperationExecutor::execute(this=0x00007fffffffd6e8, self=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:221:13
    frame #8: 0x0000000001f410e6 blender`blender::ed::sculpt_paint::SlideOperation::on_stroke_extended(this=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:480:12
    frame #9: 0x0000000001f19fbc blender`blender::ed::sculpt_paint::stroke_update_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, UNUSED_stroke=0x00007fffcaa12208, stroke_element=0x00007fffffffdc08) at curves_sculpt_ops.cc:193:25
    frame #10: 0x0000000001f8c4d3 blender`paint_brush_stroke_add_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, stroke=0x00007fffcaa12208, mval=0x00007fffffffdce0, pressure=1) at paint_stroke.c:631:5
    frame #11: 0x0000000001f8a5e9 blender`paint_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8, stroke_p=0x00007fffc72283b0) at paint_stroke.c:1578:11
    frame #12: 0x0000000001f19dd9 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:236:22
    frame #13: 0x0000000001f19d42 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:221:22
    frame #14: 0x0000000000a5437d blender`wm_operator_invoke(C=0x00007ffff3f84388, ot=0x00007ffff44e4568, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1424:16
    frame #15: 0x0000000000a572da blender`wm_handler_operator_call(C=0x00007ffff3f84388, handlers=0x00007fffd36f5e40, handler_base=0x00007fffeb78bc68, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, kmi_idname="SCULPT_CURVES_OT_brush_stroke") at wm_event_system.cc:2458:16
    frame #16: 0x0000000000a55ce7 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40, handler=0x00007fffeb78bc68, keymap=0x00007fffd3475a28, do_debug_handler=false) at wm_event_system.cc:2850:21
    frame #17: 0x0000000000a55345 blender`wm_handlers_do_intern(C=0x00007ffff3f84388, win=0x00007fffd36ccf08, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3176:26
    frame #18: 0x0000000000a4d29f blender`wm_handlers_do(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3314:16
    frame #19: 0x0000000000a57f1e blender`wm_event_do_region_handlers(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, region=0x00007fffd36f5d08) at wm_event_system.cc:3733:10
    frame #20: 0x0000000000a4e414 blender`wm_event_do_handlers_area_regions(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, area=0x00007fffd36cac88) at wm_event_system.cc:3763:10
    frame #21: 0x0000000000a4c641 blender`::wm_event_do_handlers(C=0x00007ffff3f84388) at wm_event_system.cc:3959:23
    frame #22: 0x0000000000a3e547 blender`WM_main(C=0x00007ffff3f84388) at wm.c:637:5
    frame #23: 0x000000000022fea9 blender`main(argc=2, argv=0x00007fffffffe9a8) at creator.c:546:5
    frame #24: 0x00007ffff7ddc2d0 libc.so.6`___lldb_unnamed_symbol3142 + 128
    frame #25: 0x00007ffff7ddc38a libc.so.6`__libc_start_main + 138
    frame #26: 0x000000000022fa65 blender`_start at start.S:115
(lldb) p surface_uv_coords
(const blender::Span<blender::vec_base<float, 2> >) $1 = {
  data_ = nullptr
  size_ = 0
}
It seems to crash due to a missing UV map, but I can see a UV map correctly assigned, so not sure. ``` frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25 282 const float radius_falloff = BKE_brush_curve_strength( 283 brush_, dist_to_brush_cu, brush_radius_cu); 284 -> 285 const float2 uv = surface_uv_coords[curve_i]; 286 ReverseUVSampler::Result result = reverse_uv_sampler_orig.sample(uv); 287 if (result.type != ReverseUVSampler::ResultType::Ok) { 288 /* The curve does not have a valid surface attachment. */ (lldb) bt * thread #1, name = 'blender', stop reason = signal SIGABRT frame #0: 0x00007ffff7e414dc libc.so.6`___lldb_unnamed_symbol3503 + 268 frame #1: 0x00007ffff7df1998 libc.so.6`raise + 24 frame #2: 0x00007ffff7ddb53d libc.so.6`abort + 215 frame #3: 0x000000000ec86429 blender`_BLI_assert_abort at BLI_assert.c:46:3 frame #4: 0x00000000003666a1 blender`blender::Span<blender::vec_base<float, 2> >::operator[](this=0x00007fffffffcc48, index=0) const at BLI_span.hh:233:5 * frame #5: 0x0000000001f42a1a blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(this=0x00007fffffffd6e8, brush_pos_cu=0x00007fffffffcd40, brush_radius_cu=21.0435963, reverse_uv_sampler_orig=0x00007fffffffcd88, r_curves_to_slide=0x00007fffd3713d18) at curves_sculpt_slide.cc:285:25 frame #6: 0x0000000001f4244b blender`blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(this=0x00007fffffffd6e8) at curves_sculpt_slide.cc:257:13 frame #7: 0x0000000001f41d61 blender`blender::ed::sculpt_paint::SlideOperationExecutor::execute(this=0x00007fffffffd6e8, self=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:221:13 frame #8: 0x0000000001f410e6 blender`blender::ed::sculpt_paint::SlideOperation::on_stroke_extended(this=0x00007fffcb62ea40, C=0x00007ffff3f84388, stroke_extension=0x00007fffffffdb60) at curves_sculpt_slide.cc:480:12 frame #9: 0x0000000001f19fbc blender`blender::ed::sculpt_paint::stroke_update_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, UNUSED_stroke=0x00007fffcaa12208, stroke_element=0x00007fffffffdc08) at curves_sculpt_ops.cc:193:25 frame #10: 0x0000000001f8c4d3 blender`paint_brush_stroke_add_step(C=0x00007ffff3f84388, op=0x00007fffc718cf48, stroke=0x00007fffcaa12208, mval=0x00007fffffffdce0, pressure=1) at paint_stroke.c:631:5 frame #11: 0x0000000001f8a5e9 blender`paint_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8, stroke_p=0x00007fffc72283b0) at paint_stroke.c:1578:11 frame #12: 0x0000000001f19dd9 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_modal(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:236:22 frame #13: 0x0000000001f19d42 blender`blender::ed::sculpt_paint::sculpt_curves_stroke_invoke(C=0x00007ffff3f84388, op=0x00007fffc718cf48, event=0x00007fffffffdeb8) at curves_sculpt_ops.cc:221:22 frame #14: 0x0000000000a5437d blender`wm_operator_invoke(C=0x00007ffff3f84388, ot=0x00007ffff44e4568, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1424:16 frame #15: 0x0000000000a572da blender`wm_handler_operator_call(C=0x00007ffff3f84388, handlers=0x00007fffd36f5e40, handler_base=0x00007fffeb78bc68, event=0x00007fffd3ba2f48, properties=0x00007fffd351ed88, kmi_idname="SCULPT_CURVES_OT_brush_stroke") at wm_event_system.cc:2458:16 frame #16: 0x0000000000a55ce7 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40, handler=0x00007fffeb78bc68, keymap=0x00007fffd3475a28, do_debug_handler=false) at wm_event_system.cc:2850:21 frame #17: 0x0000000000a55345 blender`wm_handlers_do_intern(C=0x00007ffff3f84388, win=0x00007fffd36ccf08, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3176:26 frame #18: 0x0000000000a4d29f blender`wm_handlers_do(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, handlers=0x00007fffd36f5e40) at wm_event_system.cc:3314:16 frame #19: 0x0000000000a57f1e blender`wm_event_do_region_handlers(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, region=0x00007fffd36f5d08) at wm_event_system.cc:3733:10 frame #20: 0x0000000000a4e414 blender`wm_event_do_handlers_area_regions(C=0x00007ffff3f84388, event=0x00007fffd3ba2f48, area=0x00007fffd36cac88) at wm_event_system.cc:3763:10 frame #21: 0x0000000000a4c641 blender`::wm_event_do_handlers(C=0x00007ffff3f84388) at wm_event_system.cc:3959:23 frame #22: 0x0000000000a3e547 blender`WM_main(C=0x00007ffff3f84388) at wm.c:637:5 frame #23: 0x000000000022fea9 blender`main(argc=2, argv=0x00007fffffffe9a8) at creator.c:546:5 frame #24: 0x00007ffff7ddc2d0 libc.so.6`___lldb_unnamed_symbol3142 + 128 frame #25: 0x00007ffff7ddc38a libc.so.6`__libc_start_main + 138 frame #26: 0x000000000022fa65 blender`_start at start.S:115 (lldb) p surface_uv_coords (const blender::Span<blender::vec_base<float, 2> >) $1 = { data_ = nullptr size_ = 0 } ```
Omar Emara changed title from curve hair slide brush crushes blender to Curve hair slide brush crashes due to empty surface_uv_coords() 2022-08-30 09:37:23 +02:00
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

The Curves object misses the surface_UV_coordinate attribute, should rather look like this:

{F13433814 size=full}

But can confirm, in a repro case built from scratch, I can just remove that attribute by hand from the UI and also get the crash

CC @JacquesLucke : if we show this "internal" attribute at all (and can also remove it -- should we?), we should safeguard against using it / poll for it prior, no?

The Curves object misses the surface_UV_coordinate attribute, should rather look like this: {[F13433814](https://archive.blender.org/developer/F13433814/image.png) size=full} But can confirm, in a repro case built from scratch, I can just remove that attribute by hand from the UI and also get the crash CC @JacquesLucke : if we show this "internal" attribute at all (and can also remove it -- should we?), we should safeguard against using it / poll for it prior, no?
Philipp Oeser changed title from Curve hair slide brush crashes due to empty surface_uv_coords() to Curve hair slide brush crashes due to empty/missing surface_uv_coords attribute 2022-08-30 11:43:30 +02:00

This issue was referenced by 34e30baedf

This issue was referenced by 34e30baedf7eee625deeba3ab1209be7efbaaf04
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jacques Lucke self-assigned this 2022-08-30 12:21:13 +02:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
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#100673
No description provided.