Page MenuHome

Harden normals crash.
Closed, ResolvedPublic

Description

System Information
Operating system: macOS
Graphics card: Intel

Blender Version
Broken: 0f99845d2f153cf5fce42264bd9217e9f2eb2759 Thu Jan 10 18:04:27 2019 +1100

Short description of error
Blender segfaults when deselecting the Hardern Normals option of Bevel.

Exact steps for others to reproduce the error
Add a bevel modifier to the default cube, click harden normals twice.

Here's a quick backtrace from lldb and a debug build:

blender(92399,0x700002f95000) malloc: *** error for object 0x1217ed7c0: pointer being freed was not allocated
blender(92399,0x700002f95000) malloc: *** set a breakpoint in malloc_error_break to debug
Process 92399 stopped
* thread #15, stop reason = signal SIGABRT
    frame #0: 0x00007fff7bea623e libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff7bea623e <+10>: jae    0x7fff7bea6248            ; <+20>
    0x7fff7bea6240 <+12>: movq   %rax, %rdi
    0x7fff7bea6243 <+15>: jmp    0x7fff7bea03b7            ; cerror_nocancel
    0x7fff7bea6248 <+20>: retq
Target 0: (blender) stopped.
(lldb) thread backtrace
* thread #15, stop reason = signal SIGABRT
  * frame #0: 0x00007fff7bea623e libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff7bf5cc1c libsystem_pthread.dylib`pthread_kill + 285
    frame #2: 0x00007fff7be0f1c9 libsystem_c.dylib`abort + 127
    frame #3: 0x00007fff7bf1e6e2 libsystem_malloc.dylib`malloc_vreport + 545
    frame #4: 0x00007fff7bf1e4a3 libsystem_malloc.dylib`malloc_report + 152
    frame #5: 0x0000000101bac98d blender`MEM_lockfree_freeN(vmemh=0x00000001217ed7c8) at mallocn_lockfree_impl.c:164
    frame #6: 0x00000001013061e1 blender`BKE_object_synchronize_to_original(depsgraph=0x0000000117896548, object=0x000000011331ec08) at object_update.c:313
    frame #7: 0x00000001017a236d blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] decltype(__f=(0x0000000112a821a0), __args=0x0000700002f94de8, __args=0x0000000112a821a8)(Depsgraph*, Object*)>(fp)(std::__1::forward<Depsgraph*, Object*&>(fp0))) std::__1::__invoke<void (*&)(Depsgraph*, Object*), Depsgraph*, Object*&>(void (*&&&)(Depsgraph*, Object*), Depsgraph*&&, Object*&&&) at type_traits:4428
    frame #8: 0x00000001017a2323 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] std::__1::__bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&>, __is_valid_bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&> >::value>::type std::__1::__apply_functor<void (__f=(0x0000000112a821a0), __bound_args=size=2, __args=size=1)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, 0ul, 1ul, std::__1::tuple<Depsgraph*&&> >(void (*&)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>&, std::__1::__tuple_indices<0ul, 1ul>, std::__1::tuple<Depsgraph*&&>&&) at functional:2216
    frame #9: 0x00000001017a2257 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] std::__1::__bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&>, __is_valid_bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&> >::value>::type std::__1::__bind<void (this=0x0000000112a821a0, __args=0x0000700002f94de8)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>::operator()<Depsgraph*>(Depsgraph*&&) at functional:2249
    frame #10: 0x00000001017a21bb blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] decltype(__f=0x0000000112a821a0, __args=0x0000700002f94de8)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&>(fp)(std::__1::forward<Depsgraph*>(fp0))) std::__1::__invoke<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) at type_traits:4428
    frame #11: 0x00000001017a2182 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=0x0000000112a821a0, __args=0x0000700002f94de8)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) at __functional_base:349
    frame #12: 0x00000001017a2099 blender`std::__1::__function::__func<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>, std::__1::allocator<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&> >, void (Depsgraph*)>::operator(this=0x0000000112a82198, __arg=0x0000700002f94de8)(Depsgraph*&&) at functional:1562
    frame #13: 0x00000001017dd704 blender`std::__1::function<void (Depsgraph*)>::operator(this=0x0000000112a82198, __arg=0x0000000117896548)(Depsgraph*) const at functional:1913
    frame #14: 0x00000001017dd644 blender`DEG::deg_task_run_func(pool=0x0000000111f4c208, taskdata=0x0000000112a82138, thread_id=3) at deg_eval.cc:95
    frame #15: 0x0000000101783aae blender`task_scheduler_thread_run at task.c:420
    frame #16: 0x00000001017839db blender`task_scheduler_thread_run(thread_p=0x00000001177dc898) at task.c:449
    frame #17: 0x00007fff7bf5a305 libsystem_pthread.dylib`_pthread_body + 126
    frame #18: 0x00007fff7bf5d26f libsystem_pthread.dylib`_pthread_start + 70
    frame #19: 0x00007fff7bf59415 libsystem_pthread.dylib`thread_start + 13

After setting the requested breakpoint and rerunning:

(lldb) thread backtrace
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
  * frame #0: 0x00007fff7bf2b0de libsystem_malloc.dylib`malloc_error_break
    frame #1: 0x00007fff7bf1e676 libsystem_malloc.dylib`malloc_vreport + 437
    frame #2: 0x00007fff7bf1e4a3 libsystem_malloc.dylib`malloc_report + 152
    frame #3: 0x0000000101bac98d blender`MEM_lockfree_freeN(vmemh=0x000000011fea78c8) at mallocn_lockfree_impl.c:164
    frame #4: 0x00000001013061e1 blender`BKE_object_synchronize_to_original(depsgraph=0x0000000117a61fc8, object=0x0000000113c4ac08) at object_update.c:313
    frame #5: 0x00000001017a236d blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] decltype(__f=(0x000000011fea45a0), __args=0x00007ffeefbff148, __args=0x000000011fea45a8)(Depsgraph*, Object*)>(fp)(std::__1::forward<Depsgraph*, Object*&>(fp0))) std::__1::__invoke<void (*&)(Depsgraph*, Object*), Depsgraph*, Object*&>(void (*&&&)(Depsgraph*, Object*), Depsgraph*&&, Object*&&&) at type_traits:4428
    frame #6: 0x00000001017a2323 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] std::__1::__bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&>, __is_valid_bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&> >::value>::type std::__1::__apply_functor<void (__f=(0x000000011fea45a0), __bound_args=size=2, __args=size=1)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, 0ul, 1ul, std::__1::tuple<Depsgraph*&&> >(void (*&)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>&, std::__1::__tuple_indices<0ul, 1ul>, std::__1::tuple<Depsgraph*&&>&&) at functional:2216
    frame #7: 0x00000001017a2257 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] std::__1::__bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&>, __is_valid_bind_return<void (*)(Depsgraph*, Object*), std::__1::tuple<std::__1::placeholders::__ph<1>, Object*>, std::__1::tuple<Depsgraph*&&> >::value>::type std::__1::__bind<void (this=0x000000011fea45a0, __args=0x00007ffeefbff148)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>::operator()<Depsgraph*>(Depsgraph*&&) at functional:2249
    frame #8: 0x00000001017a21bb blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) [inlined] decltype(__f=0x000000011fea45a0, __args=0x00007ffeefbff148)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&>(fp)(std::__1::forward<Depsgraph*>(fp0))) std::__1::__invoke<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) at type_traits:4428
    frame #9: 0x00000001017a2182 blender`void std::__1::__invoke_void_return_wrapper<void>::__call<std::__1::__bind<void (__args=0x000000011fea45a0, __args=0x00007ffeefbff148)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&, Depsgraph*>(std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>&&&, Depsgraph*&&) at __functional_base:349
    frame #10: 0x00000001017a2099 blender`std::__1::__function::__func<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&>, std::__1::allocator<std::__1::__bind<void (&)(Depsgraph*, Object*), std::__1::placeholders::__ph<1> const&, Object*&> >, void (Depsgraph*)>::operator(this=0x000000011fea4598, __arg=0x00007ffeefbff148)(Depsgraph*&&) at functional:1562
    frame #11: 0x00000001017dd704 blender`std::__1::function<void (Depsgraph*)>::operator(this=0x000000011fea4598, __arg=0x0000000117a61fc8)(Depsgraph*) const at functional:1913
    frame #12: 0x00000001017dd644 blender`DEG::deg_task_run_func(pool=0x0000000116a7ea08, taskdata=0x000000011fea4538, thread_id=0) at deg_eval.cc:95
    frame #13: 0x0000000101785505 blender`BLI_task_pool_work_and_wait at task.c:420
    frame #14: 0x0000000101785432 blender`BLI_task_pool_work_and_wait(pool=0x0000000116a7ea08) at task.c:906
    frame #15: 0x00000001017dc6f0 blender`DEG::deg_evaluate_on_refresh(graph=0x0000000117a61fc8) at deg_eval.cc:334
    frame #16: 0x00000001018029aa blender`::DEG_evaluate_on_refresh(graph=0x0000000117a61fc8) at depsgraph_eval.cc:70
    frame #17: 0x000000010136b95c blender`BKE_scene_graph_update_tagged(depsgraph=0x0000000117a61fc8, bmain=0x000000011211aa08) at scene.c:1501
    frame #18: 0x0000000100152f39 blender`wm_event_do_depsgraph(C=0x0000000111887e58) at wm_event_system.c:336
    frame #19: 0x0000000100153012 blender`wm_event_do_refresh_wm_and_depsgraph(C=0x0000000111887e58) at wm_event_system.c:361
    frame #20: 0x00000001001537c1 blender`wm_event_do_notifiers(C=0x0000000111887e58) at wm_event_system.c:519
    frame #21: 0x000000010014e230 blender`WM_main(C=0x0000000111887e58) at wm.c:430
    frame #22: 0x00000001001486a5 blender`main(argc=1, argv=0x00007ffeefbff6c0) at creator.c:521
    frame #23: 0x00007fff7bd66ed9 libdyld.dylib`start + 1

Looks like the DepGraph is trying to free something twice, maybe?

Details

Type
Bug