Resync Library Override: Crash when linked file is modified #81059

Closed
opened 2020-09-22 17:00:46 +02:00 by Demeter Dzadik · 13 comments
Member

System Information
Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-22 09:17, hash: 085329f114

Short description of error
Sometimes the Resync Library Override Hierarchy operator can result in a crash after updating the file which is being linked from. This only seems to happen sometimes, but never when Blender is freshly restarted before running the operator.

Exact steps for others to reproduce the error

  • Link and override a complex character rig
  • Animate some bones with some keyframes
  • Open another Blender, open the rig you are linking and modify it; add, delete, move bones or objects. Save these changes.
  • Go back to the other Blender, animate some more, then run Resync Library Override Hierarchy.
  • Sometimes it will crash.
    Trace: resync_crash.txt

CC @mont29 This is the crash that's been haunting Pablo for some time. I managed to reproduce it once on my computer without debug build, but it's pretty inconsistent and therefore time consuming. Could not reproduce with a simple rig. Hope the traceback helps though.

(On a smaller and separate note, bone transformations only seem to update after reloading the file.)

**System Information** Operating system: Linux-5.4.0-7634-generic-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100 **Blender Version** Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-22 09:17, hash: `085329f114` **Short description of error** Sometimes the Resync Library Override Hierarchy operator can result in a crash after updating the file which is being linked from. This only seems to happen sometimes, but never when Blender is freshly restarted before running the operator. **Exact steps for others to reproduce the error** - Link and override a complex character rig - Animate some bones with some keyframes - Open another Blender, open the rig you are linking and modify it; add, delete, move bones or objects. Save these changes. - Go back to the other Blender, animate some more, then run Resync Library Override Hierarchy. - Sometimes it will crash. Trace: [resync_crash.txt](https://archive.blender.org/developer/F8909424/resync_crash.txt) CC @mont29 This is the crash that's been haunting Pablo for some time. I managed to reproduce it once on my computer without debug build, but it's pretty inconsistent and therefore time consuming. Could not reproduce with a simple rig. Hope the traceback helps though. (On a smaller and separate note, bone transformations only seem to update after reloading the file.)
Author
Member

Added subscribers: @mont29, @Mets

Added subscribers: @mont29, @Mets

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Ok, could reproduce here with debug+Asan build and using Rain v2… Will check further tomorrow, thanks for the report.

Ok, could reproduce here with debug+Asan build and using Rain v2… Will check further tomorrow, thanks for the report.

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2020-09-23 11:08:01 +02:00

Changed status from 'Resolved' to: 'Needs Triage'

Changed status from 'Resolved' to: 'Needs Triage'

Grrr, wrong number in commit message...

Grrr, wrong number in commit message...

Hrmmm… Actually cannot reproduce anymore.

Also, backtrace from error yesterday is fairly weird, and not the same as reported issue here I think. It claims a collection's parent is created and then freed by some driver? Does Rain have any driver actually creating data, or moving collections around?

=================================================================
==299290==ERROR: AddressSanitizer: heap-use-after-free on address 0x612000b4dbaa at pc 0x00000f5a3029 bp 0x7ffc09069890 sp 0x7ffc09069888
READ of size 2 at 0x612000b4dbaa thread T0
    - 0 0xf5a3028 in collection_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/collection.c:153
    - 1 0xf695b5f in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    - 2 0xf695dee in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    - 3 0xf6c7018 in BKE_main_relations_create /home/bastien/blender/src/source/blender/blenkernel/intern/main.c:267
    - 4 0xf68323f in BKE_lib_override_library_override_group_tag /home/bastien/blender/src/source/blender/blenkernel/intern/lib_override.c:452
    - 5 0xf6854e0 in BKE_lib_override_library_resync /home/bastien/blender/src/source/blender/blenkernel/intern/lib_override.c:688
    - 6 0x143927bc in id_override_library_resync_fn /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:853
    - 7 0x1438d346 in outliner_do_libdata_operation /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:405
    - 8 0x1438d513 in outliner_do_libdata_operation /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:409
    - 9 0x1439b6d8 in outliner_id_operation_exec /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:1930
    - 10 0x1058fd98 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    - 11 0x1059168a in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1514
    - 12 0x105918e0 in WM_operator_name_call_ptr /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1562
    - 13 0x13ceaf20 in ui_apply_but_funcs_after /home/bastien/blender/src/source/blender/editors/interface/interface_handlers.c:932
    - 14 0x13d7367c in ui_popup_handler /home/bastien/blender/src/source/blender/editors/interface/interface_handlers.c:10878
    - 15 0x10589109 in wm_handler_ui_call /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:639
    - 16 0x1059ec67 in wm_handlers_do_intern /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2755
    - 17 0x1059fc8b in wm_handlers_do /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2866
    - 18 0x105a5325 in wm_event_do_handlers /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:3290
    - 19 0x1056bab2 in WM_main /home/bastien/blender/src/source/blender/windowmanager/intern/wm.c:482
    - 20 0xf1cde76 in main /home/bastien/blender/src/source/creator/creator.c:530
    - 21 0x7f2839be4cc9 in __libc_start_main ../csu/libc-start.c:308
    #22 0xf1cd029 in _start (/home/bastien/blender/build_master_debug/bin/blender+0xf1cd029)

0x612000b4dbaa is located 106 bytes inside of 264-byte region [0x612000b4db40,0x612000b4dc48)
freed by thread T0 here:
    - 0 0x7f284012bb6f in __interceptor_free (/lib/x86_64-linux-gnu/libasan.so.6+0xa9b6f)
    - 1 0x27624d78 in MEM_lockfree_freeN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:129
    - 2 0x2727f048 in BLI_expr_pylike_parse /home/bastien/blender/src/source/blender/blenlib/intern/expr_pylike_eval.c:1120
    - 3 0xf516460 in driver_compile_simple_expr_impl /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:994
    - 4 0xf516e31 in driver_compile_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1060
    - 5 0xf5170b7 in driver_try_evaluate_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1080
    - 6 0xf518458 in evaluate_driver_python /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1256
    - 7 0xf518698 in evaluate_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1300
    - 8 0xf509754 in evaluate_fcurve_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1930
    - 9 0xf509ca1 in calculate_fcurve /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1986
    - 10 0xf25d52b in BKE_animsys_eval_driver /home/bastien/blender/src/source/blender/blenkernel/intern/anim_sys.c:2897
    - 11 0x26d82bf3 in void std::__invoke_impl<void, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(std::__invoke_other, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:60
    - 12 0x26d7e75c in std::__invoke_result<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>::type std::__invoke<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:95
    - 13 0x26d77516 in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/10/functional:416
    - 14 0x26d7029a in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::operator()<Depsgraph*, void>(Depsgraph*&&) /usr/include/c++/10/functional:499
    - 15 0x26d672eb in void std::__invoke_impl<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::__invoke_other, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:60
    - 16 0x26d5c7bb in std::enable_if<is_invocable_r_v<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>, void>::type std::__invoke_r<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:110
    - 17 0x26d53ceb in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) /usr/include/c++/10/bits/std_function.h:291
    - 18 0x26e96dc4 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const /usr/include/c++/10/bits/std_function.h:622
    - 19 0x26e924f0 in evaluate_node /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:114
    - 20 0x26e9253a in deg_task_run_func /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:125
    - 21 0x275e9770 in Task::operator()() const::{lambda()#1}::operator()() const /home/bastien/blender/src/source/blender/blenlib/intern/task_pool.cc:118
    - 22 0x275eaa24 in tbb::interface7::internal::delegated_function<Task::operator()() const::{lambda()#1} const, void>::operator()() const /usr/include/tbb/task_arena.h:96
    - 23 0x7f2840062554 in tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (/lib/x86_64-linux-gnu/libtbb.so.2+0x25554)
    #24 0x7ffc0906aa3f  ([stack]+0x5ba3f)

previously allocated by thread T0 here:
    - 0 0x7f284012be8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    - 1 0x27625779 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276
    - 2 0x2727ebba in BLI_expr_pylike_parse /home/bastien/blender/src/source/blender/blenlib/intern/expr_pylike_eval.c:1098
    - 3 0xf516460 in driver_compile_simple_expr_impl /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:994
    - 4 0xf516e31 in driver_compile_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1060
    - 5 0xf5170b7 in driver_try_evaluate_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1080
    - 6 0xf518458 in evaluate_driver_python /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1256
    - 7 0xf518698 in evaluate_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1300
    - 8 0xf509754 in evaluate_fcurve_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1930
    - 9 0xf509ca1 in calculate_fcurve /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1986
    - 10 0xf25d52b in BKE_animsys_eval_driver /home/bastien/blender/src/source/blender/blenkernel/intern/anim_sys.c:2897
    - 11 0x26d82bf3 in void std::__invoke_impl<void, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(std::__invoke_other, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:60
    - 12 0x26d7e75c in std::__invoke_result<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>::type std::__invoke<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:95
    - 13 0x26d77516 in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/10/functional:416
    - 14 0x26d7029a in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::operator()<Depsgraph*, void>(Depsgraph*&&) /usr/include/c++/10/functional:499
    - 15 0x26d672eb in void std::__invoke_impl<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::__invoke_other, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:60
    - 16 0x26d5c7bb in std::enable_if<is_invocable_r_v<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>, void>::type std::__invoke_r<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:110
    - 17 0x26d53ceb in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) /usr/include/c++/10/bits/std_function.h:291
    - 18 0x26e96dc4 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const /usr/include/c++/10/bits/std_function.h:622
    - 19 0x26e924f0 in evaluate_node /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:114
    - 20 0x26e9253a in deg_task_run_func /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:125
    - 21 0x275e9770 in Task::operator()() const::{lambda()#1}::operator()() const /home/bastien/blender/src/source/blender/blenlib/intern/task_pool.cc:118
    - 22 0x275eaa24 in tbb::interface7::internal::delegated_function<Task::operator()() const::{lambda()#1} const, void>::operator()() const /usr/include/tbb/task_arena.h:96
    - 23 0x7f2840062554 in tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (/lib/x86_64-linux-gnu/libtbb.so.2+0x25554)
    #24 0x7ffc0906aa3f  ([stack]+0x5ba3f)
Hrmmm… Actually cannot reproduce anymore. Also, backtrace from error yesterday is fairly weird, and not the same as reported issue here I think. It claims a collection's parent is created and then freed by some driver? Does Rain have any driver actually creating data, or moving collections around? ```lines=20 ================================================================= ==299290==ERROR: AddressSanitizer: heap-use-after-free on address 0x612000b4dbaa at pc 0x00000f5a3029 bp 0x7ffc09069890 sp 0x7ffc09069888 READ of size 2 at 0x612000b4dbaa thread T0 - 0 0xf5a3028 in collection_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/collection.c:153 - 1 0xf695b5f in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269 - 2 0xf695dee in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292 - 3 0xf6c7018 in BKE_main_relations_create /home/bastien/blender/src/source/blender/blenkernel/intern/main.c:267 - 4 0xf68323f in BKE_lib_override_library_override_group_tag /home/bastien/blender/src/source/blender/blenkernel/intern/lib_override.c:452 - 5 0xf6854e0 in BKE_lib_override_library_resync /home/bastien/blender/src/source/blender/blenkernel/intern/lib_override.c:688 - 6 0x143927bc in id_override_library_resync_fn /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:853 - 7 0x1438d346 in outliner_do_libdata_operation /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:405 - 8 0x1438d513 in outliner_do_libdata_operation /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:409 - 9 0x1439b6d8 in outliner_id_operation_exec /home/bastien/blender/src/source/blender/editors/space_outliner/outliner_tools.c:1930 - 10 0x1058fd98 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313 - 11 0x1059168a in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1514 - 12 0x105918e0 in WM_operator_name_call_ptr /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1562 - 13 0x13ceaf20 in ui_apply_but_funcs_after /home/bastien/blender/src/source/blender/editors/interface/interface_handlers.c:932 - 14 0x13d7367c in ui_popup_handler /home/bastien/blender/src/source/blender/editors/interface/interface_handlers.c:10878 - 15 0x10589109 in wm_handler_ui_call /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:639 - 16 0x1059ec67 in wm_handlers_do_intern /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2755 - 17 0x1059fc8b in wm_handlers_do /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:2866 - 18 0x105a5325 in wm_event_do_handlers /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:3290 - 19 0x1056bab2 in WM_main /home/bastien/blender/src/source/blender/windowmanager/intern/wm.c:482 - 20 0xf1cde76 in main /home/bastien/blender/src/source/creator/creator.c:530 - 21 0x7f2839be4cc9 in __libc_start_main ../csu/libc-start.c:308 #22 0xf1cd029 in _start (/home/bastien/blender/build_master_debug/bin/blender+0xf1cd029) 0x612000b4dbaa is located 106 bytes inside of 264-byte region [0x612000b4db40,0x612000b4dc48) freed by thread T0 here: - 0 0x7f284012bb6f in __interceptor_free (/lib/x86_64-linux-gnu/libasan.so.6+0xa9b6f) - 1 0x27624d78 in MEM_lockfree_freeN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:129 - 2 0x2727f048 in BLI_expr_pylike_parse /home/bastien/blender/src/source/blender/blenlib/intern/expr_pylike_eval.c:1120 - 3 0xf516460 in driver_compile_simple_expr_impl /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:994 - 4 0xf516e31 in driver_compile_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1060 - 5 0xf5170b7 in driver_try_evaluate_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1080 - 6 0xf518458 in evaluate_driver_python /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1256 - 7 0xf518698 in evaluate_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1300 - 8 0xf509754 in evaluate_fcurve_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1930 - 9 0xf509ca1 in calculate_fcurve /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1986 - 10 0xf25d52b in BKE_animsys_eval_driver /home/bastien/blender/src/source/blender/blenkernel/intern/anim_sys.c:2897 - 11 0x26d82bf3 in void std::__invoke_impl<void, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(std::__invoke_other, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:60 - 12 0x26d7e75c in std::__invoke_result<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>::type std::__invoke<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:95 - 13 0x26d77516 in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/10/functional:416 - 14 0x26d7029a in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::operator()<Depsgraph*, void>(Depsgraph*&&) /usr/include/c++/10/functional:499 - 15 0x26d672eb in void std::__invoke_impl<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::__invoke_other, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:60 - 16 0x26d5c7bb in std::enable_if<is_invocable_r_v<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>, void>::type std::__invoke_r<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:110 - 17 0x26d53ceb in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) /usr/include/c++/10/bits/std_function.h:291 - 18 0x26e96dc4 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const /usr/include/c++/10/bits/std_function.h:622 - 19 0x26e924f0 in evaluate_node /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:114 - 20 0x26e9253a in deg_task_run_func /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:125 - 21 0x275e9770 in Task::operator()() const::{lambda()#1}::operator()() const /home/bastien/blender/src/source/blender/blenlib/intern/task_pool.cc:118 - 22 0x275eaa24 in tbb::interface7::internal::delegated_function<Task::operator()() const::{lambda()#1} const, void>::operator()() const /usr/include/tbb/task_arena.h:96 - 23 0x7f2840062554 in tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (/lib/x86_64-linux-gnu/libtbb.so.2+0x25554) #24 0x7ffc0906aa3f ([stack]+0x5ba3f) previously allocated by thread T0 here: - 0 0x7f284012be8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f) - 1 0x27625779 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276 - 2 0x2727ebba in BLI_expr_pylike_parse /home/bastien/blender/src/source/blender/blenlib/intern/expr_pylike_eval.c:1098 - 3 0xf516460 in driver_compile_simple_expr_impl /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:994 - 4 0xf516e31 in driver_compile_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1060 - 5 0xf5170b7 in driver_try_evaluate_simple_expr /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1080 - 6 0xf518458 in evaluate_driver_python /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1256 - 7 0xf518698 in evaluate_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve_driver.c:1300 - 8 0xf509754 in evaluate_fcurve_driver /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1930 - 9 0xf509ca1 in calculate_fcurve /home/bastien/blender/src/source/blender/blenkernel/intern/fcurve.c:1986 - 10 0xf25d52b in BKE_animsys_eval_driver /home/bastien/blender/src/source/blender/blenkernel/intern/anim_sys.c:2897 - 11 0x26d82bf3 in void std::__invoke_impl<void, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(std::__invoke_other, void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:60 - 12 0x26d7e75c in std::__invoke_result<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>::type std::__invoke<void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*, ID*&, int&, FCurve*&>(void (*&)(Depsgraph*, ID*, int, FCurve*), Depsgraph*&&, ID*&, int&, FCurve*&) /usr/include/c++/10/bits/invoke.h:95 - 13 0x26d77516 in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::__call<void, Depsgraph*&&, 0ul, 1ul, 2ul, 3ul>(std::tuple<Depsgraph*&&>&&, std::_Index_tuple<0ul, 1ul, 2ul, 3ul>) /usr/include/c++/10/functional:416 - 14 0x26d7029a in void std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>::operator()<Depsgraph*, void>(Depsgraph*&&) /usr/include/c++/10/functional:499 - 15 0x26d672eb in void std::__invoke_impl<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::__invoke_other, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:60 - 16 0x26d5c7bb in std::enable_if<is_invocable_r_v<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>, void>::type std::__invoke_r<void, std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*>(std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)>&, Depsgraph*&&) /usr/include/c++/10/bits/invoke.h:110 - 17 0x26d53ceb in std::_Function_handler<void (Depsgraph*), std::_Bind<void (*(std::_Placeholder<1>, ID*, int, FCurve*))(Depsgraph*, ID*, int, FCurve*)> >::_M_invoke(std::_Any_data const&, Depsgraph*&&) /usr/include/c++/10/bits/std_function.h:291 - 18 0x26e96dc4 in std::function<void (Depsgraph*)>::operator()(Depsgraph*) const /usr/include/c++/10/bits/std_function.h:622 - 19 0x26e924f0 in evaluate_node /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:114 - 20 0x26e9253a in deg_task_run_func /home/bastien/blender/src/source/blender/depsgraph/intern/eval/deg_eval.cc:125 - 21 0x275e9770 in Task::operator()() const::{lambda()#1}::operator()() const /home/bastien/blender/src/source/blender/blenlib/intern/task_pool.cc:118 - 22 0x275eaa24 in tbb::interface7::internal::delegated_function<Task::operator()() const::{lambda()#1} const, void>::operator()() const /usr/include/tbb/task_arena.h:96 - 23 0x7f2840062554 in tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long) (/lib/x86_64-linux-gnu/libtbb.so.2+0x25554) #24 0x7ffc0906aa3f ([stack]+0x5ba3f) ```

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Also, I think there is a step missing in your description? You do reload the edited library before trying to resync its overrides, right?

Also, I think there is a step missing in your description? You do reload the edited library before trying to resync its overrides, right?

Based solely on the traceback you pasted above, I tried this hack:

diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c
index de2ec273567..8dbbbf9a79b 100644
--- a/source/blender/blenkernel/intern/collection.c
+++ b/source/blender/blenkernel/intern/collection.c
@@ -596,10 +596,10 @@ static void collection_object_cache_fill(ListBase *lb, Collection *collection, i
   }
 }
 
+static ThreadMutex cache_lock = BLI_MUTEX_INITIALIZER;
 ListBase BKE_collection_object_cache_get(Collection *collection)
 {
   if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) {
-    static ThreadMutex cache_lock = BLI_MUTEX_INITIALIZER;
 
     BLI_mutex_lock(&cache_lock);
     if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) {
@@ -625,7 +625,9 @@ static void collection_object_cache_free(Collection *collection)
 
 void BKE_collection_object_cache_free(Collection *collection)
 {
+  BLI_mutex_lock(&cache_lock);
   collection_object_cache_free(collection);
+  BLI_mutex_unlock(&cache_lock);
 }
 
 Base *BKE_collection_or_layer_objects(const ViewLayer *view_layer, Collection *collection)

It would be nice if you could test it and see whether crashes still happen with it or not?

Based solely on the traceback you pasted above, I tried this hack: ``` diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index de2ec273567..8dbbbf9a79b 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -596,10 +596,10 @@ static void collection_object_cache_fill(ListBase *lb, Collection *collection, i } } +static ThreadMutex cache_lock = BLI_MUTEX_INITIALIZER; ListBase BKE_collection_object_cache_get(Collection *collection) { if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) { - static ThreadMutex cache_lock = BLI_MUTEX_INITIALIZER; BLI_mutex_lock(&cache_lock); if (!(collection->flag & COLLECTION_HAS_OBJECT_CACHE)) { @@ -625,7 +625,9 @@ static void collection_object_cache_free(Collection *collection) void BKE_collection_object_cache_free(Collection *collection) { + BLI_mutex_lock(&cache_lock); collection_object_cache_free(collection); + BLI_mutex_unlock(&cache_lock); } Base *BKE_collection_or_layer_objects(const ViewLayer *view_layer, Collection *collection) ``` It would be nice if you could test it and see whether crashes still happen with it or not?
Author
Member

To put here what we discussed in chat:

Rain's drivers or python scripts don't mess with moving collections or objects around. I did notice before, that when the linked collection isn't in the scene(root) collection, a duplicate of it shows up there after Resync, but that may not be related.
video-2020-09-23_14.57.10.mp4

We didn't do Reload before Resync, I assumed Resync does both but I understand why it actually doesn't. So from now we'll do both, except for when we're trying to reproduce this crash ;)

To put here what we discussed in chat: Rain's drivers or python scripts don't mess with moving collections or objects around. I did notice before, that when the linked collection isn't in the scene(root) collection, a duplicate of it shows up there after Resync, but that may not be related. [video-2020-09-23_14.57.10.mp4](https://archive.blender.org/developer/F8912002/video-2020-09-23_14.57.10.mp4) We didn't do Reload before Resync, I assumed Resync does both but I understand why it actually doesn't. So from now we'll do both, except for when we're trying to reproduce this crash ;)

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'

Looks like bdbe95578d was also the fix for the studio issue, so think we can consider this one as resolved now. Many thanks to @Mets for his reporting and testing work!

Looks like bdbe95578d was also the fix for the studio issue, so think we can consider this one as resolved now. Many thanks to @Mets for his reporting and testing work!
Thomas Dinges added this to the 2.91 milestone 2023-02-08 16:20:22 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#81059
No description provided.