Page MenuHome

Blender crashes after using Voxel Remesher in sculpt mode on an object with Subdivision Surface modifier
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Windows 10
Graphics card: GTX 1080 Ti
Blender Version
Broken: v2.81 beta v2.81.16

Blender crashes after using Voxel Remesher

add cube
add subdivision surface modifier to it and subdivide two times
switch to sculpt tab
select Grab brush
select Grab Active Vertex in brush options
sculpt with this brush
do a Voxel Remesh
do undo or save or basically try to continue working
crash

this recipe is not 100% reproducible, but I did it 10 times and 5 out of 10 it resulted in an instant crash, in other instances I had to remesh a few times

Based on the default startup.

Event Timeline

Thanks for report. I can confirm.
It only seems to crash once you do voxel remesh and then when you move brush back over object.

I got a bunch of different backtraces usually inside nvidia driver but here is one that wasn't:

#0  0x000055555da89b22 in buckets_lookup (name=0x55555df28a94 "rect", name_buffer=0x7fff8576fbf8 "pos", buckets=0x7fff82bf6818) at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_shader_interface.c:138
#1  0x000055555da89b22 in GPU_shaderinterface_uniform (shaderface=0x7fff82bf6008, name=0x55555df28a94 "rect") at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_shader_interface.c:321                 
#2  0x000055555da89ba6 in GPU_shaderinterface_uniform_ensure (shaderface=0x7fff82bf6008, name=0x55555df28a94 "rect") at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_shader_interface.c:327          
#3  0x000055555da6091b in GPU_batch_uniform_4fv (batch=0x7fff970a9348, name=0x55555df28a94 "rect", data=0x7fffffffd8a0) at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_batch.c:557                  
#4  0x0000555559604a44 in drawscredge_area_draw (sizex=3840, sizey=2027, x1=3174, y1=30, x2=3839, y2=1356, edge_thickness=1.67999995) at /home/krash/src/blender/src/source/blender/editors/screen/screen_draw.c:346
#5  0x0000555559604ae8 in drawscredge_area (sa=0x7fffcda02988, sizex=3840, sizey=2027, edge_thickness=1.67999995) at /home/krash/src/blender/src/source/blender/editors/screen/screen_draw.c:360                  
#6  0x0000555559604e02 in ED_screen_draw_edges (win=0x7fffc6c57388) at /home/krash/src/blender/src/source/blender/editors/screen/screen_draw.c:426                                                                
#7  0x00005555589f17f4 in wm_draw_window_onscreen (C=0x7fffce46d508, win=0x7fffc6c57388, view=-1) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:737                                
#8  0x00005555589f18fe in wm_draw_window (C=0x7fffce46d508, win=0x7fffc6c57388) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:770                                                                                                                                                                                                                                                                        
#9  0x00005555589f1eb3 in wm_draw_update (C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:947
#10 0x00005555589edb1b in WM_main (C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm.c:423
#11 0x0000555558311ec9 in main (argc=1, argv=0x7fffffffdc28) at /home/krash/src/blender/src/source/creator/creator.c:496

Ubuntu 18.04 build: 2.82 (sub 1), branch: master, commit date: 2019-11-20 21:25, hash: ba1e9ae4733a, type: Debug
Geforce 1080 driver version 4.5.0 NVIDIA 440.26

Can not mark confirmed.

Crash seems pretty random, now even on just rotating view. Memory seems pretty screwed. Got backtrace in X11 and jemalloc. Here's another backtrace in nvidia driver:

#0  0x00007fffb1509dfc in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#1  0x00007fffb150b574 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#2  0x00007fffb150ba61 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#3  0x00007fffb1584370 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#4  0x00007fffb1580de4 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#5  0x00007fffb15ebbf0 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#6  0x00007fffb15efed1 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#7  0x00007fffb15f0f9e in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#8  0x00007fffb11f976b in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#9  0x00007fffb1205523 in  () at /usr/lib/x86_64-linux-gnu/libnvidia-glcore.so.440.26
#10 0x000055555da8c267 in GPU_texture_create_nD (w=64, h=64, d=0, n=2, pixels=0x7ffffffecc80, tex_format=GPU_RGBA16F, gpu_data_format=GPU_DATA_FLOAT, samples=0, can_rescale=false, err_out=0x0) at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_texture.c:831
#11 0x000055555da8cfea in GPU_texture_create_2d (w=64, h=64, tex_format=GPU_RGBA16F, pixels=0x7ffffffecc80, err_out=0x0) at /home/krash/src/blender/src/source/blender/gpu/intern/gpu_texture.c:1148
#12 0x0000555558fa46ef in DRW_texture_create_2d (w=64, h=64, format=GPU_RGBA16F, flags=(DRW_TEX_FILTER | DRW_TEX_WRAP), fpixels=0x7ffffffecc80) at /home/krash/src/blender/src/source/blender/draw/intern/draw_manager_texture.c:91
#13 0x0000555558feaa71 in create_jitter_texture (num_samples=16) at /home/krash/src/blender/src/source/blender/draw/engines/workbench/workbench_deferred.c:325
#14 0x0000555558febbf8 in workbench_deferred_engine_init (vedata=0x7fff82c1e388) at /home/krash/src/blender/src/source/blender/draw/engines/workbench/workbench_deferred.c:561
#15 0x0000555558fe9a9e in workbench_solid_engine_init (vedata=0x7fff82c1e388) at /home/krash/src/blender/src/source/blender/draw/engines/workbench/solid_mode.c:39
#16 0x0000555558f92969 in drw_engines_init () at /home/krash/src/blender/src/source/blender/draw/intern/draw_manager.c:1072
#17 0x0000555558f9406c in DRW_draw_render_loop_ex (depsgraph=0x7fffc7234b08, engine_type=0x55555fe45d60 <DRW_engine_viewport_eevee_type>, ar=0x7fffc6ceb888, v3d=0x7fffcdfede08, viewport=0x7fffa622ff88, evil_C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/draw/intern/draw_manager.c:1639
#18 0x0000555558f93d1c in DRW_draw_view (C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/draw/intern/draw_manager.c:1575
#19 0x0000555559522753 in view3d_draw_view (C=0x7fffce46d508, ar=0x7fffc6ceb888) at /home/krash/src/blender/src/source/blender/editors/space_view3d/view3d_draw.c:1539
#20 0x00005555595227f8 in view3d_main_region_draw (C=0x7fffce46d508, ar=0x7fffc6ceb888) at /home/krash/src/blender/src/source/blender/editors/space_view3d/view3d_draw.c:1563
#21 0x00005555595f77f9 in ED_region_do_draw (C=0x7fffce46d508, ar=0x7fffc6ceb888) at /home/krash/src/blender/src/source/blender/editors/screen/area.c:534
#22 0x00005555589f135d in wm_draw_window_offscreen (C=0x7fffce46d508, win=0x7fffc6c57388, stereo=false) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:629
#23 0x00005555589f18db in wm_draw_window (C=0x7fffce46d508, win=0x7fffc6c57388) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:765
#24 0x00005555589f1eb3 in wm_draw_update (C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm_draw.c:947
#25 0x00005555589edb1b in WM_main (C=0x7fffce46d508) at /home/krash/src/blender/src/source/blender/windowmanager/intern/wm.c:423
#26 0x0000555558311ec9 in main (argc=1, argv=0x7fffffffdc28) at /home/krash/src/blender/src/source/creator/creator.c:496
Jacques Lucke (JacquesLucke) lowered the priority of this task from 90 to 50.Nov 21 2019, 4:51 PM

ASAN is helpful here. The array ss->preview_vert_index_list is accessed out of range.

==23418==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000442dc0 at pc 0x555577a38ecc bp 0x7fffffffcd10 sp 0x7fffffffcd00
WRITE of size 4 at 0x611000442dc0 thread T0
    #0 0x555577a38ecb in sculpt_geometry_preview_lines_update /home/jacques/blender-git/blender/source/blender/editors/sculpt_paint/sculpt.c:9377
    #1 0x555577a8b05c in paint_draw_cursor /home/jacques/blender-git/blender/source/blender/editors/sculpt_paint/paint_cursor.c:1448
    #2 0x5555750f01ab in wm_paintcursor_draw /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:111
    #3 0x5555750f7319 in wm_draw_window_onscreen /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:715
    #4 0x5555750f7901 in wm_draw_window /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:770
    #5 0x5555750f8cb0 in wm_draw_update /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:947
    #6 0x5555750e6501 in WM_main /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:423
    #7 0x55557322659d in main /home/jacques/blender-git/blender/source/creator/creator.c:499
    #8 0x7ffff4d901e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
    #9 0x5555732258dd in _start (/home/jacques/blender-git/build_linux_debug/bin/blender+0x1dcd18dd)

0x611000442dc0 is located 0 bytes to the right of 256-byte region [0x611000442cc0,0x611000442dc0)
allocated by thread T0 here:
    #0 0x7ffff768cce6 in calloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dce6)
    #1 0x55557468e153 in MEM_guarded_callocN /home/jacques/blender-git/blender/intern/guardedalloc/intern/mallocn_guarded_impl.c:613
    #2 0x555577a3897a in sculpt_geometry_preview_lines_update /home/jacques/blender-git/blender/source/blender/editors/sculpt_paint/sculpt.c:9362
    #3 0x555577a8b05c in paint_draw_cursor /home/jacques/blender-git/blender/source/blender/editors/sculpt_paint/paint_cursor.c:1448
    #4 0x5555750f01ab in wm_paintcursor_draw /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:111
    #5 0x5555750f7319 in wm_draw_window_onscreen /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:715
    #6 0x5555750f7901 in wm_draw_window /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:770
    #7 0x5555750f8cb0 in wm_draw_update /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_draw.c:947
    #8 0x5555750e6501 in WM_main /home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:423
    #9 0x55557322659d in main /home/jacques/blender-git/blender/source/creator/creator.c:499
    #10 0x7ffff4d901e2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x271e2)
Pablo Dobarro (pablodp606) changed the subtype of this task from "Report" to "Bug".