Page MenuHome

Voxel Remesh Crashes
Closed, ResolvedPublic

Description

Running into this when testing voxel remesh with ASAN.

  • Default Cube
  • Enter Sculpt Mode
  • Enable Top-Bar
  • Click on the button to the left of the "Remesh" popover.
==26696==ERROR: AddressSanitizer: heap-use-after-free on address 0x61b0000c24a8 at pc 0x5635e85b0047 bp 0x7ffde96b47b0 sp 0x7ffde96b47a0
READ of size 2 at 0x61b0000c24a8 thread T0
    #0 0x5635e85b0046 in id_can_have_animdata /src/blender/source/blender/blenkernel/intern/anim_sys.c:128
    #1 0x5635e85b09f5 in BKE_animdata_free /src/blender/source/blender/blenkernel/intern/anim_sys.c:248
    #2 0x5635e89e30dd in BKE_mesh_clear_geometry /src/blender/source/blender/blenkernel/intern/mesh.c:489
    #3 0x5635e89e2f33 in BKE_mesh_free /src/blender/source/blender/blenkernel/intern/mesh.c:483
    #4 0x5635ebfdf7de in voxel_remesh_exec /src/blender/source/blender/editors/object/object_remesh.c:122
    #5 0x5635ea304568 in wm_operator_invoke /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1452
    #6 0x5635ea306211 in wm_operator_call_internal /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1653
    #7 0x5635ea306502 in WM_operator_name_call_ptr /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1701
    #8 0x5635eb4cca9d in ui_apply_but_funcs_after /src/blender/source/blender/editors/interface/interface_handlers.c:835
    #9 0x5635eb553952 in ui_handler_region_menu /src/blender/source/blender/editors/interface/interface_handlers.c:10174
    #10 0x5635ea2f9977 in wm_handler_ui_call /src/blender/source/blender/windowmanager/intern/wm_event_system.c:623
    #11 0x5635ea311880 in wm_handlers_do_intern /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2707
    #12 0x5635ea3148ec in wm_handlers_do /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2953
    #13 0x5635ea31a156 in wm_event_do_handlers /src/blender/source/blender/windowmanager/intern/wm_event_system.c:3331
    #14 0x5635ea2dee3e in WM_main /src/blender/source/blender/windowmanager/intern/wm.c:417
    #15 0x5635e839dee9 in main /src/blender/source/creator/creator.c:491
    #16 0x7f906fef6ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)
    #17 0x5635e839d21d in _start (/src/cmake_debug/bin/blender+0xc39e21d)

0x61b0000c24a8 is located 40 bytes inside of 1584-byte region [0x61b0000c2480,0x61b0000c2ab0)
freed by thread T0 here:
    #0 0x7f9071a806c0 in __interceptor_free /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:122
    #1 0x5635e97f3de4 in MEM_lockfree_freeN /src/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:157
    #2 0x5635e8948faa in BKE_id_free_ex /src/blender/source/blender/blenkernel/intern/library_remap.c:980
    #3 0x5635e8948fdc in BKE_id_free /src/blender/source/blender/blenkernel/intern/library_remap.c:995
    #4 0x5635e8a1bd54 in BKE_mesh_nomain_to_mesh /src/blender/source/blender/blenkernel/intern/mesh_convert.c:1593
    #5 0x5635ebfdf7d2 in voxel_remesh_exec /src/blender/source/blender/editors/object/object_remesh.c:121
    #6 0x5635ea304568 in wm_operator_invoke /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1452
    #7 0x5635ea306211 in wm_operator_call_internal /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1653
    #8 0x5635ea306502 in WM_operator_name_call_ptr /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1701
    #9 0x5635eb4cca9d in ui_apply_but_funcs_after /src/blender/source/blender/editors/interface/interface_handlers.c:835
    #10 0x5635eb553952 in ui_handler_region_menu /src/blender/source/blender/editors/interface/interface_handlers.c:10174
    #11 0x5635ea2f9977 in wm_handler_ui_call /src/blender/source/blender/windowmanager/intern/wm_event_system.c:623
    #12 0x5635ea311880 in wm_handlers_do_intern /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2707
    #13 0x5635ea3148ec in wm_handlers_do /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2953
    #14 0x5635ea31a156 in wm_event_do_handlers /src/blender/source/blender/windowmanager/intern/wm_event_system.c:3331
    #15 0x5635ea2dee3e in WM_main /src/blender/source/blender/windowmanager/intern/wm.c:417
    #16 0x5635e839dee9 in main /src/blender/source/creator/creator.c:491
    #17 0x7f906fef6ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)

previously allocated by thread T0 here:
    #0 0x7f9071a80ce8 in __interceptor_calloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cc:153
    #1 0x5635e97f458e in MEM_lockfree_callocN /src/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:267
    #2 0x5635e88f1985 in BKE_libblock_alloc_notest /src/blender/source/blender/blenkernel/intern/library.c:1197
    #3 0x5635e88f1b6d in BKE_libblock_alloc /src/blender/source/blender/blenkernel/intern/library.c:1213
    #4 0x5635e89e6541 in BKE_mesh_new_nomain /src/blender/source/blender/blenkernel/intern/mesh.c:642
    #5 0x5635ecdc2753 in BKE_remesh_voxel_ovdb_volume_to_mesh_nomain /src/blender/source/blender/blenkernel/intern/remesh.c:104
    #6 0x5635ecdc40d7 in BKE_remesh_voxel_to_mesh_nomain /src/blender/source/blender/blenkernel/intern/remesh.c:153
    #7 0x5635ebfdf223 in voxel_remesh_exec /src/blender/source/blender/editors/object/object_remesh.c:105
    #8 0x5635ea304568 in wm_operator_invoke /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1452
    #9 0x5635ea306211 in wm_operator_call_internal /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1653
    #10 0x5635ea306502 in WM_operator_name_call_ptr /src/blender/source/blender/windowmanager/intern/wm_event_system.c:1701
    #11 0x5635eb4cca9d in ui_apply_but_funcs_after /src/blender/source/blender/editors/interface/interface_handlers.c:835
    #12 0x5635eb553952 in ui_handler_region_menu /src/blender/source/blender/editors/interface/interface_handlers.c:10174
    #13 0x5635ea2f9977 in wm_handler_ui_call /src/blender/source/blender/windowmanager/intern/wm_event_system.c:623
    #14 0x5635ea311880 in wm_handlers_do_intern /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2707
    #15 0x5635ea3148ec in wm_handlers_do /src/blender/source/blender/windowmanager/intern/wm_event_system.c:2953
    #16 0x5635ea31a156 in wm_event_do_handlers /src/blender/source/blender/windowmanager/intern/wm_event_system.c:3331
    #17 0x5635ea2dee3e in WM_main /src/blender/source/blender/windowmanager/intern/wm.c:417
    #18 0x5635e839dee9 in main /src/blender/source/creator/creator.c:491
    #19 0x7f906fef6ee2 in __libc_start_main (/usr/lib/libc.so.6+0x26ee2)

SUMMARY: AddressSanitizer: heap-use-after-free /src/blender/source/blender/blenkernel/intern/anim_sys.c:128 in id_can_have_animdata