Maniphest T100985

Crash on sculpt mask brush when Multiresolution modifier is copied from another object
Confirmed, NormalBUG

Assigned To
None
Authored By
Pedro Gomes (ReonPG)
Sep 11 2022, 7:42 PM
Tags
  • BF Blender
  • Sculpt, Paint & Texture
Subscribers
Julien Kaspar (JulienKaspar)
Omar Emara (OmarSquircleArt)
Pedro Gomes (ReonPG)
TheRedWaxPolice (TheRedWaxPolice)

Description

System Information
Operating system: Windows 11
Graphics card: GTX 1060

Blender Version
Broken: 3.3.0 / 3.2.0 / 2.93.10
Worked: (First time trying multires hasn't worked on any of the versions I've tested on)

Short description of error

Crash on sculpt mask brush when Multiresolution modifier is copied from another object.

Exact steps for others to reproduce the error

Replicate problem 1:

  • Add a Cube (#1)
  • Add Multiresolution modifier to Cube (#1)
  • Subdivide 4 times
  • Add a Cube (#2)
  • Copy Cube (#1)'s modifier onto Cube (#2) through the use of Link/Transfer Data > Copy Modifier
  • Select Cube (#2) and enter sculpt mode
  • Select Mask Brush
  • Use Mask Brush (Should crash blender)

Event Timeline

Pedro Gomes (ReonPG) created this task.Sep 11 2022, 7:42 PM
Pedro Gomes (ReonPG) updated the task description.Sep 11 2022, 8:20 PM
TheRedWaxPolice (TheRedWaxPolice) added a subscriber: TheRedWaxPolice (TheRedWaxPolice).Sep 11 2022, 9:21 PM
Omar Emara (OmarSquircleArt) changed the task status from Needs Triage to Confirmed.Sep 12 2022, 3:05 PM
Omar Emara (OmarSquircleArt) added a project: Sculpt, Paint & Texture.
Omar Emara (OmarSquircleArt) added a subscriber: Omar Emara (OmarSquircleArt).
* thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000000020f9cb4 blender`sculpt_undo_store_mask(ob=0x00007fffcb289e08, unode=0x00007fffcb423808) at sculpt_undo.c:1297:25
   1294   PBVHVertexIter vd;
   1295
   1296   BKE_pbvh_vertex_iter_begin (ss->pbvh, unode->node, vd, PBVH_ITER_ALL) {
-> 1297     unode->mask[vd.i] = *vd.mask;
   1298   }
   1299   BKE_pbvh_vertex_iter_end;
   1300 }
(lldb) bt
* thread #1, name = 'blender', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00000000020f9cb4 blender`sculpt_undo_store_mask(ob=0x00007fffcb289e08, unode=0x00007fffcb423808) at sculpt_undo.c:1297:25
    frame #1: 0x00000000020f7363 blender`SCULPT_undo_push_node(ob=0x00007fffcb289e08, node=0x00007fffe9652988, type=SCULPT_UNDO_MASK) at sculpt_undo.c:1516:7
    frame #2: 0x0000000002086f5c blender`do_brush_action_task_cb(userdata=0x00007fffffffd588, n=0, UNUSED_tls=0x00007fffffffd460) at sculpt.c:3267:5
    frame #3: 0x000000000eefa534 blender`::BLI_task_parallel_range(start=0, stop=1, userdata=0x00007fffffffd588, func=(blender`do_brush_action_task_cb at sculpt.c:3252), settings=0x00007fffffffd540) at task_range.cc:125:5
    frame #4: 0x0000000002082a0f blender`do_brush_action(sd=0x00007fffeb854c88, ob=0x00007fffcb289e08, brush=0x00007fffeb919e08, ups=0x00007fffeb8ede88, paint_mode_settings=0x00007fffeb8edd60) at sculpt.c:3395:5
    frame #5: 0x0000000002086374 blender`do_tiled(sd=0x00007fffeb854c88, ob=0x00007fffcb289e08, brush=0x00007fffeb919e08, ups=0x00007fffeb8ede88, paint_mode_settings=0x00007fffeb8edd60, action=(blender`do_brush_action at sculpt.c:3289)) at sculpt.c:3903:3
    frame #6: 0x0000000002081ece blender`do_symmetrical_brush_actions(sd=0x00007fffeb854c88, ob=0x00007fffcb289e08, action=(blender`do_brush_action at sculpt.c:3289), ups=0x00007fffeb8ede88, paint_mode_settings=0x00007fffeb8edd60) at sculpt.c:3989:5
    frame #7: 0x0000000002080325 blender`sculpt_stroke_update_step(C=0x00007ffff3f8a388, UNUSED_op=0x00007fffcb2f9d48, stroke=0x00007fffc7273b08, itemptr=0x00007fffffffdc38) at sculpt.c:5440:3
    frame #8: 0x0000000002003843 blender`paint_brush_stroke_add_step(C=0x00007ffff3f8a388, op=0x00007fffcb2f9d48, stroke=0x00007fffc7273b08, mval=0x00007fffffffdd18, pressure=1) at paint_stroke.c:631:5
    frame #9: 0x00000000020019f1 blender`paint_stroke_modal(C=0x00007ffff3f8a388, op=0x00007fffcb2f9d48, event=0x00007fffffffdef8, stroke_p=0x00007fffcb2f9da8) at paint_stroke.c:1589:5
    frame #10: 0x000000000207e7cd blender`sculpt_brush_stroke_modal(C=0x00007ffff3f8a388, op=0x00007fffcb2f9d48, event=0x00007fffffffdef8) at sculpt.c:5657:10
    frame #11: 0x000000000207e6a1 blender`sculpt_brush_stroke_invoke(C=0x00007ffff3f8a388, op=0x00007fffcb2f9d48, event=0x00007fffffffdef8) at sculpt.c:5600:17
    frame #12: 0x0000000000aaa38d blender`wm_operator_invoke(C=0x00007ffff3f8a388, ot=0x00007ffff44d2f28, event=0x00007fffc7359b48, properties=0x00007fffd2d9c4a8, reports=0x0000000000000000, poll_only=false, use_last_properties=true) at wm_event_system.cc:1434:16
    frame #13: 0x0000000000aad2ea blender`wm_handler_operator_call(C=0x00007ffff3f8a388, handlers=0x00007fffeb837ac0, handler_base=0x00007fffe19a7aa8, event=0x00007fffc7359b48, properties=0x00007fffd2d9c4a8, kmi_idname="SCULPT_OT_brush_stroke") at wm_event_system.cc:2469:16
    frame #14: 0x0000000000aabcf7 blender`wm_handlers_do_keymap_with_keymap_handler(C=0x00007ffff3f8a388, event=0x00007fffc7359b48, handlers=0x00007fffeb837ac0, handler=0x00007fffe19a7aa8, keymap=0x00007fffcd700ee8, do_debug_handler=false) at wm_event_system.cc:2861:21
    frame #15: 0x0000000000aab355 blender`wm_handlers_do_intern(C=0x00007ffff3f8a388, win=0x00007fffeb83b988, event=0x00007fffc7359b48, handlers=0x00007fffeb837ac0) at wm_event_system.cc:3187:26
    frame #16: 0x0000000000aa32af blender`wm_handlers_do(C=0x00007ffff3f8a388, event=0x00007fffc7359b48, handlers=0x00007fffeb837ac0) at wm_event_system.cc:3325:16
    frame #17: 0x0000000000aadf2e blender`wm_event_do_region_handlers(C=0x00007ffff3f8a388, event=0x00007fffc7359b48, region=0x00007fffeb837988) at wm_event_system.cc:3744:10
    frame #18: 0x0000000000aa4424 blender`wm_event_do_handlers_area_regions(C=0x00007ffff3f8a388, event=0x00007fffc7359b48, area=0x00007fffeb83d308) at wm_event_system.cc:3774:10
    frame #19: 0x0000000000aa2651 blender`::wm_event_do_handlers(C=0x00007ffff3f8a388) at wm_event_system.cc:3970:23
    frame #20: 0x0000000000a94567 blender`WM_main(C=0x00007ffff3f8a388) at wm.c:640:5
    frame #21: 0x000000000022fea9 blender`main(argc=1, argv=0x00007fffffffe9e8) at creator.c:554:5
    frame #22: 0x00007ffff7ddc2d0 libc.so.6`___lldb_unnamed_symbol3142 + 128
    frame #23: 0x00007ffff7ddc38a libc.so.6`__libc_start_main + 138
    frame #24: 0x000000000022fa65 blender`_start at start.S:115
Omar Emara (OmarSquircleArt) renamed this task from Multiresolution Issues to Crash on sculpt mask brush when Multiresolution modifier is copied from another object.Sep 12 2022, 3:06 PM
Omar Emara (OmarSquircleArt) updated the task description.

I split the second issue into T101008.

Julien Kaspar (JulienKaspar) moved this task from Backlog to Bugs on the Sculpt, Paint & Texture board.EditedSep 16 2022, 10:31 AM
Julien Kaspar (JulienKaspar) changed the subtype of this task from "Report" to "Bug".
Julien Kaspar (JulienKaspar) added a subscriber: Julien Kaspar (JulienKaspar).

I can still reproduce this but I got the crash on using the mask brush on Cube #1 instead.
This only seems to happen if no mask was created so far.