Page MenuHome

Sculpt: Masking operations crash if multires is in play
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 445.87

Blender Version
Broken: version: 2.92.0 Alpha, branch: master, commit date: 2020-12-19 06:25, hash: rBa5a302bd1806
Worked: 2.91
Caused by rB90e12e823ff0: Fix T81854: crash when undoing switch between sculpt and edit mode.

Short description of error
Sculpt: Masking operations crash if multires is in play

Exact steps for others to reproduce the error

  • add a multiresolution modifier to the default cube
  • subdivide (at least) once
  • with the mask brush: do a stroke [should crash]
  • OR: do a box mask
  • OR: clear a mask

Event Timeline

Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Dec 21 2020, 10:42 AM
Philipp Oeser (lichtwerk) claimed this task.

Can confirm, checking.

I can reproduce this issue with the provided file, but couldn't with the sculpting application template.

sculpt_undo_store_mask(Object * ob, SculptUndoNode * unode) (/home/dev/01-data/01-git/blender-git/blender/source/blender/editors/sculpt_paint/sculpt_undo.c:1101)
SCULPT_undo_push_node(Object * ob, PBVHNode * node, SculptUndoType type) (/home/dev/01-data/01-git/blender-git/blender/source/blender/editors/sculpt_paint/sculpt_undo.c:1306)
mask_flood_fill_task_cb(void * restrict userdata, const int i, const TaskParallelTLS * restrict UNUSED_tls) (/home/dev/01-data/01-git/blender-git/blender/source/blender/editors/sculpt_paint/paint_mask.c:132)
RangeTask::operator()(tbb::blocked_range<int> const&) const::{lambda()#1}::operator()() const(const RangeTask::<lambda()> * const __closure) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_range.cc:96)
tbb::interface7::internal::delegated_function<RangeTask::operator()(tbb::blocked_range<int> const&) const::{lambda()#1} const, void>::operator()() const(const tbb::interface7::internal::delegated_function<const RangeTask::operator()(const tbb::blocked_range<int>&) const::<lambda()>, void> * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:93)
tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (Unknown Source:0)
tbb::interface7::internal::isolate_impl<void, RangeTask::operator()(tbb::blocked_range<int> const&) const::{lambda()#1} const>(RangeTask::operator()(tbb::blocked_range<int> const&) const::{lambda()#1} const&)(const RangeTask::<lambda()> & f) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:160)
tbb::interface7::this_task_arena::isolate<RangeTask::operator()(tbb::blocked_range<int> const&) const::{lambda()#1}>(tbb::interface7::internal::return_type_or_void const&)(const RangeTask::<lambda()> & f) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/task_arena.h:395)
RangeTask::operator()(const RangeTask * const this, const tbb::blocked_range<int> & r) (/home/dev/01-data/01-git/blender-git/blender/source/blender/blenlib/intern/task_range.cc:92)
tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const>::run_body(tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const> * const this, tbb::blocked_range<int> & r) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/parallel_for.h:115)
tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> >::work_balance<tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const>, tbb::blocked_range<int> >(tbb::interface9::internal::dynamic_grainsize_mode<tbb::interface9::internal::adaptive_mode<tbb::interface9::internal::auto_partition_type> > * const this, tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const> & start, tbb::blocked_range<int> & range) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/partitioner.h:438)
tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type>::execute<tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const>, tbb::blocked_range<int> >(tbb::interface9::internal::partition_type_base<tbb::interface9::internal::auto_partition_type> * const this, tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const> & start, tbb::blocked_range<int> & range) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/partitioner.h:256)
tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const>::execute(tbb::interface9::internal::start_for<tbb::blocked_range<int>, RangeTask, tbb::auto_partitioner const> * const this) (/home/dev/01-data/01-git/blender-git/lib/linux_centos7_x86_64/tbb/include/tbb/parallel_for.h:142)
tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop(tbb::internal::context_guard_helper<false>&, tbb::task*, long) (Unknown Source:0)
tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all(tbb::task&, tbb::task*) (Unknown Source:0)
tbb::internal::arena::process(tbb::internal::generic_scheduler&) (Unknown Source:0)
tbb::internal::market::process(rml::job&) (Unknown Source:0)
tbb::internal::rml::private_worker::run() (Unknown Source:0)
tbb::internal::rml::private_worker::thread_routine(void*) (Unknown Source:0)
libpthread.so.0!start_thread(void * arg) (/build/glibc-ZN95T4/glibc-2.31/nptl/pthread_create.c:477)
Philipp Oeser (lichtwerk) triaged this task as High priority.EditedDec 21 2020, 11:51 AM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".

In fact, any masking operation crashes since rB90e12e823ff0: Fix T81854: crash when undoing switch between sculpt and edit mode. if multires is in play

Philipp Oeser (lichtwerk) renamed this task from Clear mask in sculpt mode crashes to Sculpt: Masking operations crash if multires is in play.Dec 21 2020, 11:55 AM
Philipp Oeser (lichtwerk) updated the task description. (Show Details)

@Bastien Montagne (mont29): I assume you are quicker here: mind having a look?

This is actually a nightmare of several entangled issues, involving very, very bad code and general architecture of sculpt mode...

Will probably have some patches ready by tomorrow, but we'll have to wait for @Sergey Sharybin (sergey) since some involve multires and am highly unsure I fully grasp the whole picture there.