Page MenuHome

Crash on undo
Closed, ResolvedPublic

Description

System Information
Operating system: Tested on Windows 10, Windows 7 and Ubuntu 14.04

Blender Version
Broken:

  • 2.79, 10f724cec5e3, master, 2019-04-18, from builder.blender.org
  • 2.80, b46245470f79, 2019-04-18, from builder.blender.org

Short description of error
Blender crashes when undo is performed in the specific attached scene.

Exact steps for others to reproduce the error

  • Do a factory reset of Blender
  • Open attached .blend above (ignore the warning about missing LuxCore addon)
  • Select the cube, move it a bit and left click, then undo -> Blender crashes

Additional information
gdb backtrace done with debug build of Blender:

Read blend: /home/simon/Downloads/cube.blend
Color management: scene view "Filmic" not found, setting default "Default".
Color management: scene look "Filmic - Medium High Contrast" not found, setting default "None".

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x00000000032a5c2d in MEM_lockfree_allocN_len (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:125
125			return MEMHEAD_FROM_PTR(vmemh)->len & ~((size_t) (MEMHEAD_MMAP_FLAG | MEMHEAD_ALIGN_FLAG));

(gdb) bt
#0  0x00000000032a5c2d in MEM_lockfree_allocN_len (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:125
#1  0x00000000032a5c61 in MEM_lockfree_freeN (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:135
#2  0x0000000002b9a6d4 in curvemapping_free_data (cumap=0x7fffd8a2c208) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/colortools.c:111
#3  0x0000000002b9a825 in curvemapping_free (cumap=0x7fffd8a2c208) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/colortools.c:128
#4  0x0000000002e12b31 in node_free_curves (node=0x7fffcdf65808) at /home/simon/programs/blender-git/blender/source/blender/nodes/intern/node_util.c:58
#5  0x0000000002cca8e0 in node_free_node_ex (ntree=0x7fffd8a2c048, node=0x7fffcdf65808, remove_animdata=false, use_api_free_cb=false) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/node.c:1726
#6  0x0000000002ccac7c in ntreeFreeTree (ntree=0x7fffd8a2c048) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/node.c:1826
#7  0x0000000002c6cafc in BKE_libblock_free_datablock (id=0x7fffd8a2c048) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:823
#8  0x0000000002c6cc45 in BKE_libblock_free_ex (bmain=0x7fffcd77ff08, idv=0x7fffd8a2c048, do_id_user=false, do_ui_user=false) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:883
#9  0x0000000002c5b441 in BKE_main_free (mainvar=0x7fffcd77ff08) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library.c:1172
#10 0x0000000002b66975 in BKE_blender_globals_clear () at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blender.c:136
#11 0x0000000002b688c5 in setup_app_data (C=0x7fffe0087d38, bfd=0x7fffccae5a08, filepath=0x6d1aafa "<memory1>", reports=0x0) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blendfile.c:219
#12 0x0000000002b690b4 in BKE_blendfile_read_from_memfile (C=0x7fffe0087d38, memfile=0x7fffd801d958, reports=0x0, skip_flags=0) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blendfile.c:419
#13 0x0000000002b67a06 in read_undosave (C=0x7fffe0087d38, uel=0x7fffd801d508) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blender_undo.c:113
#14 0x0000000002b67f67 in BKE_undo_step (C=0x7fffe0087d38, step=1) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blender_undo.c:245
#15 0x0000000002097049 in ed_undo_step (C=0x7fffe0087d38, step=1, undoname=0x0) at /home/simon/programs/blender-git/blender/source/blender/editors/util/undo.c:202
#16 0x0000000002097444 in ed_undo_exec (C=0x7fffe0087d38, UNUSED_op=0x7fffccaa7b48) at /home/simon/programs/blender-git/blender/source/blender/editors/util/undo.c:314
#17 0x0000000001e4f71e in wm_operator_invoke (C=0x7fffe0087d38, ot=0x7fffd9cd7e88, event=0x7fffd8d35a88, properties=0x7fffcc812f88, reports=0x0, poll_only=false)
    at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1140
#18 0x0000000001e50e25 in wm_handler_operator_call (C=0x7fffe0087d38, handlers=0x7fffd8fa1c20, handler=0x7fffcc9036a8, event=0x7fffd8d35a88, properties=0x7fffcc812f88)
    at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1782
#19 0x0000000001e5177c in wm_handlers_do_intern (C=0x7fffe0087d38, event=0x7fffd8d35a88, handlers=0x7fffd8fa1c20) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2062
#20 0x0000000001e51b3a in wm_handlers_do (C=0x7fffe0087d38, event=0x7fffd8d35a88, handlers=0x7fffd8fa1c20) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2173
#21 0x0000000001e52b18 in wm_event_do_handlers (C=0x7fffe0087d38) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2539
#22 0x0000000001e462c7 in WM_main (C=0x7fffe0087d38) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm.c:504
#23 0x0000000001e41295 in main (argc=1, argv=0x7fffffffe5b8) at /home/simon/programs/blender-git/blender/source/creator/creator.c:527
(gdb)

Note: A crash also happens when opening any .blend file while the attached .blend file is loaded. Since the gdb backtrace is very similar, I suspect that the same code is used in both cases.
The gdb backtrace of opening any .blend while attached .blend is loaded:

Read blend: /home/simon/Downloads/cube.blend
Color management: scene view "Filmic" not found, setting default "Default".
Color management: scene look "Filmic - Medium High Contrast" not found, setting default "None".
[New Thread 0x7fffc75d9700 (LWP 30605)]
[Thread 0x7fffc75d9700 (LWP 30605) exited]
Read blend: /home/simon/Downloads/fire.blend

Thread 1 "blender" received signal SIGSEGV, Segmentation fault.
0x00000000032a5c2d in MEM_lockfree_allocN_len (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:125
125			return MEMHEAD_FROM_PTR(vmemh)->len & ~((size_t) (MEMHEAD_MMAP_FLAG | MEMHEAD_ALIGN_FLAG));

(gdb) bt
#0  0x00000000032a5c2d in MEM_lockfree_allocN_len (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:125
#1  0x00000000032a5c61 in MEM_lockfree_freeN (vmemh=0xe7cf9a9f68) at /home/simon/programs/blender-git/blender/intern/guardedalloc/intern/mallocn_lockfree_impl.c:135
#2  0x0000000002b9a6d4 in curvemapping_free_data (cumap=0x7fffcddbe748) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/colortools.c:111
#3  0x0000000002b9a825 in curvemapping_free (cumap=0x7fffcddbe748) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/colortools.c:128
#4  0x0000000002e12b31 in node_free_curves (node=0x7fffd7a56808) at /home/simon/programs/blender-git/blender/source/blender/nodes/intern/node_util.c:58
#5  0x0000000002cca8e0 in node_free_node_ex (ntree=0x7fffcddbe588, node=0x7fffd7a56808, remove_animdata=false, use_api_free_cb=false) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/node.c:1726
#6  0x0000000002ccac7c in ntreeFreeTree (ntree=0x7fffcddbe588) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/node.c:1826
#7  0x0000000002c6cafc in BKE_libblock_free_datablock (id=0x7fffcddbe588) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:823
#8  0x0000000002c6cc45 in BKE_libblock_free_ex (bmain=0x7fffcc413f08, idv=0x7fffcddbe588, do_id_user=false, do_ui_user=false) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:883
#9  0x0000000002c5b441 in BKE_main_free (mainvar=0x7fffcc413f08) at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/library.c:1172
#10 0x0000000002b66975 in BKE_blender_globals_clear () at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blender.c:136
#11 0x0000000002b688c5 in setup_app_data (C=0x7fffe0087d38, bfd=0x7fffd80cf608, filepath=0x7fffffffdda0 "/home/simon/Downloads/fire.blend", reports=0x7fffcccb2c48)
    at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blendfile.c:219
#12 0x0000000002b68f0a in BKE_blendfile_read (C=0x7fffe0087d38, filepath=0x7fffffffdda0 "/home/simon/Downloads/fire.blend", reports=0x7fffcccb2c48, skip_flags=0)
    at /home/simon/programs/blender-git/blender/source/blender/blenkernel/intern/blendfile.c:376
#13 0x0000000001e55bb3 in WM_file_read (C=0x7fffe0087d38, filepath=0x7fffffffdda0 "/home/simon/Downloads/fire.blend", reports=0x7fffcccb2c48) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_files.c:560
#14 0x0000000001e589c4 in wm_file_read_opwrap (C=0x7fffe0087d38, filepath=0x7fffffffdda0 "/home/simon/Downloads/fire.blend", reports=0x7fffcccb2c48, autoexec_init=true)
    at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_files.c:1690
#15 0x0000000001e58c27 in wm_open_mainfile_exec (C=0x7fffe0087d38, op=0x7fffcc951688) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_files.c:1749
#16 0x0000000001e510a4 in wm_handler_fileselect_do (C=0x7fffe0087d38, handlers=0x7fffd7b3e3b0, handler=0x7fffcc8a1e28, val=2) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1884
#17 0x0000000001e51429 in wm_handler_fileselect_call (C=0x7fffe0087d38, handlers=0x7fffd7b3e3b0, handler=0x7fffcc8a1e28, event=0x7fffd9efa888)
    at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1971
#18 0x0000000001e518e0 in wm_handlers_do_intern (C=0x7fffe0087d38, event=0x7fffd9efa888, handlers=0x7fffd7b3e3b0) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2095
#19 0x0000000001e51b3a in wm_handlers_do (C=0x7fffe0087d38, event=0x7fffd9efa888, handlers=0x7fffd7b3e3b0) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2173
#20 0x0000000001e526cd in wm_event_do_handlers (C=0x7fffe0087d38) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:2446
#21 0x0000000001e462c7 in WM_main (C=0x7fffe0087d38) at /home/simon/programs/blender-git/blender/source/blender/windowmanager/intern/wm.c:504
#22 0x0000000001e41295 in main (argc=1, argv=0x7fffffffe5b8) at /home/simon/programs/blender-git/blender/source/creator/creator.c:527
(gdb)