Page MenuHome

Not freed memory blocks with Batch-Generate Previews
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Microsoft Windows 10 Home
Graphics card: AMD Radeon(TM) RX 560 1GB

Blender Version
Broken: (Blender Version: 2.83.4, Not freed memory blocks)
Worked: ---
Short description of error
Error in console: "Error: Not freed memory blocks: 28, total unfreed memory 0.016754 MB"

Exact steps for others to reproduce the error

  1. Open blender
  2. File > Data Previews > Batch-Generate Previews > select another blend file (not open actually) > Batch-Genereate Previews

Event Timeline

Robert Guetzkow (rjg) renamed this task from Not freed memory blocks with Bath-Generate Previews to Not freed memory blocks with Batch-Generate Previews.Sep 10 2020, 7:47 PM
Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Sep 15 2020, 2:06 PM

I see a lot of dupli_alloc, but not sure where exactly are these from, so i am not sure if I get project right.

Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Known Issue".
Bastien Montagne (mont29) edited projects, added BF Blender (2.91); removed BF Blender.

@Richard Antalik (ISS) ASAN is fairly explicative:

=================================================================
==196975==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 1459517 byte(s) in 785 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7f6208c27b37  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xeeb37)

Direct leak of 6168 byte(s) in 3 object(s) allocated from:
    #0 0x7f620b6127a7 in operator new[](unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xab7a7)
    #1 0x7f620b5477ed  (/lib/x86_64-linux-gnu/libtbb.so.2+0x257ed)

Direct leak of 1720 byte(s) in 3 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7f6208c27cf2  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xeecf2)

Direct leak of 1544 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b612647 in operator new(unsigned long) (/lib/x86_64-linux-gnu/libasan.so.6+0xab647)
    #1 0x7f6205a6a73b in std::vector<__gnu_cxx::_Hashtable_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::list<usdBlender__pxrReserved__::(anonymous namespace)::Tf_RegistryManagerImpl::_RegistrationValue, std::allocator<usdBlender__pxrReserved__::(anonymous namespace)::Tf_RegistryManagerImpl::_RegistrationValue> > > >*, std::allocator<__gnu_cxx::_Hashtable_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::list<usdBlender__pxrReserved__::(anonymous namespace)::Tf_RegistryManagerImpl::_RegistrationValue, std::allocator<usdBlender__pxrReserved__::(anonymous namespace)::Tf_RegistryManagerImpl::_RegistrationValue> > > >*> >::reserve(unsigned long) (/opt/lib/usd/lib/libusd_ms.so+0x4f173b)

Direct leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x275f6b00 in MEM_lockfree_callocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:235
    #2 0xf64150f in BKE_libblock_alloc_notest /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1024
    #3 0xf6415d5 in BKE_libblock_alloc /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1040
    #4 0xf6425a9 in BKE_libblock_copy_ex /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1210
    #5 0xf64304b in BKE_libblock_copy_for_localize /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1278
    #6 0xf6774bf in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:234
    #7 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #8 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #9 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #10 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #11 0x13d700be in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1956
    #12 0x1061fc0b in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3351
    #13 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #14 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #15 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #16 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #17 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #18 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #19 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #20 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #21 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #22 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #23 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Direct leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x275f6b00 in MEM_lockfree_callocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:235
    #2 0xf64150f in BKE_libblock_alloc_notest /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1024
    #3 0xf6415d5 in BKE_libblock_alloc /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1040
    #4 0xf6425a9 in BKE_libblock_copy_ex /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1210
    #5 0xf64304b in BKE_libblock_copy_for_localize /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1278
    #6 0xf6774bf in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:234
    #7 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #8 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #9 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #10 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #11 0x13d700e5 in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1960
    #12 0x1061fbec in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3350
    #13 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #14 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #15 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #16 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #17 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #18 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #19 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #20 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #21 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #22 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #23 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Direct leak of 312 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x275f6b00 in MEM_lockfree_callocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:235
    #2 0xf64150f in BKE_libblock_alloc_notest /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1024
    #3 0xf6415d5 in BKE_libblock_alloc /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1040
    #4 0xf6425a9 in BKE_libblock_copy_ex /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1210
    #5 0xf64304b in BKE_libblock_copy_for_localize /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1278
    #6 0x1054e44a in BKE_world_localize /home/bastien/blender/src/source/blender/blenkernel/intern/world.c:234
    #7 0x180961ad in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:348
    #8 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #9 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #10 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #11 0x13d700e5 in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1960
    #12 0x1061fbec in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3350
    #13 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #14 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #15 0xfc996c7 in scene_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/scene.c:463
    #16 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #17 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #18 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #19 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #20 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #21 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #22 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #23 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Direct leak of 312 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x275f6b00 in MEM_lockfree_callocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:235
    #2 0xf64150f in BKE_libblock_alloc_notest /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1024
    #3 0xf6415d5 in BKE_libblock_alloc /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1040
    #4 0xf6425a9 in BKE_libblock_copy_ex /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1210
    #5 0xf64304b in BKE_libblock_copy_for_localize /home/bastien/blender/src/source/blender/blenkernel/intern/lib_id.c:1278
    #6 0x1054e44a in BKE_world_localize /home/bastien/blender/src/source/blender/blenkernel/intern/world.c:234
    #7 0x180961ad in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:348
    #8 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #9 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #10 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #11 0x13d700be in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1956
    #12 0x1061fc0b in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3351
    #13 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #14 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #15 0xfc996c7 in scene_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/scene.c:463
    #16 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #17 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #18 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #19 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #20 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #21 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #22 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #23 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Direct leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b6111f8 in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa1f8)
    #1 0x7f61d1ffde1d  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x5fce1d)

Direct leak of 128 byte(s) in 4 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7f6208cfad95 in PyThread_allocate_lock (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x1c1d95)

Indirect leak of 1239476 byte(s) in 1322 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7f6208c27b37  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xeeb37)

Indirect leak of 2864 byte(s) in 2 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d2261510  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x860510)

Indirect leak of 1784 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61cce65c37 in amdgpu_cs_ctx_create2 (/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1+0x4c37)

Indirect leak of 488 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d1b26269  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x125269)

Indirect leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x275f6e23 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276
    #2 0x275f6587 in MEM_lockfree_dupallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:145
    #3 0xf2519ea in BKE_curvemapping_copy /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:149
    #4 0xf67753b in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:236
    #5 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #6 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #7 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #8 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #9 0x13d700be in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1956
    #10 0x1061fc0b in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3351
    #11 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #12 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #13 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #14 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #15 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #16 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #17 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #18 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #19 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #20 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #21 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Indirect leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x275f6e23 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276
    #2 0x275f6587 in MEM_lockfree_dupallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:145
    #3 0xf2519ea in BKE_curvemapping_copy /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:149
    #4 0xf67753b in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:236
    #5 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #6 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #7 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #8 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #9 0x13d700e5 in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1960
    #10 0x1061fbec in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3350
    #11 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #12 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #13 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #14 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #15 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #16 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #17 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #18 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #19 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #20 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #21 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Indirect leak of 400 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d3382b90  (/lib/x86_64-linux-gnu/libGLX_mesa.so.0+0x45b90)

Indirect leak of 264 byte(s) in 3 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61cce64867  (/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1+0x3867)

Indirect leak of 216 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d22a0b66  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x89fb66)

Indirect leak of 216 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d22a03dc  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x89f3dc)
    #2 0xfff  (<unknown module>)

Indirect leak of 112 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d338e366  (/lib/x86_64-linux-gnu/libGLX_mesa.so.0+0x51366)

Indirect leak of 112 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d3390ba6  (/lib/x86_64-linux-gnu/libGLX_mesa.so.0+0x53ba6)

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61cce6847c in amdgpu_va_range_alloc (/lib/x86_64-linux-gnu/libdrm_amdgpu.so.1+0x747c)

Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d228ed3e  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x88dd3e)

Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d22a716a  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x8a616a)

Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d1b22f68  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x121f68)

Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d1b23806  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x122806)

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x7f61d1fbb64c  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x5ba64c)

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b611037 in calloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa037)
    #1 0x7f61d22a3ac8  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x8a2ac8)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x275f6e23 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276
    #2 0x275f6587 in MEM_lockfree_dupallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:145
    #3 0xf25130a in BKE_curvemapping_copy_data /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:135
    #4 0xf251a01 in BKE_curvemapping_copy /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:150
    #5 0xf67753b in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:236
    #6 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #7 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #8 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #9 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #10 0x13d700be in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1956
    #11 0x1061fc0b in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3351
    #12 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #13 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #14 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #15 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #16 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #17 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #18 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #19 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #20 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #21 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #22 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b610e8f in malloc (/lib/x86_64-linux-gnu/libasan.so.6+0xa9e8f)
    #1 0x275f6e23 in MEM_lockfree_mallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:276
    #2 0x275f6587 in MEM_lockfree_dupallocN /home/bastien/blender/src/intern/guardedalloc/intern/mallocn_lockfree_impl.c:145
    #3 0xf25130a in BKE_curvemapping_copy_data /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:135
    #4 0xf251a01 in BKE_curvemapping_copy /home/bastien/blender/src/source/blender/blenkernel/intern/colortools.c:150
    #5 0xf67753b in BKE_light_localize /home/bastien/blender/src/source/blender/blenkernel/intern/light.c:236
    #6 0x1809619f in duplicate_ids /home/bastien/blender/src/source/blender/editors/render/render_preview.c:346
    #7 0x180a4a29 in ED_preview_icon_render /home/bastien/blender/src/source/blender/editors/render/render_preview.c:1328
    #8 0x13d6adaf in icon_set_image /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1431
    #9 0x13d6fece in ui_id_preview_image_render_size /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1943
    #10 0x13d700e5 in UI_id_icon_render /home/bastien/blender/src/source/blender/editors/interface/interface_icons.c:1960
    #11 0x1061fbec in previews_id_ensure /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3350
    #12 0x106201fa in previews_id_ensure_callback /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3368
    #13 0xf66c055 in BKE_lib_query_foreachid_process /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:76
    #14 0xf8e395c in object_foreach_id /home/bastien/blender/src/source/blender/blenkernel/intern/object.c:442
    #15 0xf66dbc9 in library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:269
    #16 0xf66de58 in BKE_library_foreach_ID_link /home/bastien/blender/src/source/blender/blenkernel/intern/lib_query.c:292
    #17 0x1062096b in previews_ensure_exec /home/bastien/blender/src/source/blender/windowmanager/intern/wm_operators.c:3396
    #18 0x10576c18 in wm_operator_invoke /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1313
    #19 0x10578670 in wm_operator_call_internal /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1548
    #20 0x10578c4e in WM_operator_call_py /home/bastien/blender/src/source/blender/windowmanager/intern/wm_event_system.c:1648
    #21 0x123a8976 in pyop_call /home/bastien/blender/src/source/blender/python/intern/bpy_operator.c:275
    #22 0x7f6208bda9c6  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0xa19c6)

Indirect leak of 8 byte(s) in 1 object(s) allocated from:
    #0 0x7f620b6111f8 in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.6+0xaa1f8)
    #1 0x7f61d22a69a8  (/usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so+0x8a59a8)

SUMMARY: AddressSanitizer: 2718033 byte(s) leaked in 2148 allocation(s).
Saved session recovery to '/tmp/quit.blend'

Blender quit

This will move to known issues really, time to finish refactoring of those horrible localize() functions, they are a real pita since forever in ID management…

Note: taging as 2.91 for now, but it is too late for thqt release, just waiting for 2.92 tag/project to be created…

Bastien Montagne (mont29) renamed this task from Not freed memory blocks with Batch-Generate Previews to Not freed memory blocks with Batch-Generate Previews - Need to refactor `localize` ID code..Sep 16 2020, 3:42 PM
Bastien Montagne (mont29) changed the subtype of this task from "Known Issue" to "Bug".Sep 28 2020, 2:47 PM

Actually, checking again that code, this is effectively a bug in ED_preview_icon_render() freeing logic. Fix incoming.

Bastien Montagne (mont29) renamed this task from Not freed memory blocks with Batch-Generate Previews - Need to refactor `localize` ID code. to Not freed memory blocks with Batch-Generate Previews.Sep 28 2020, 2:55 PM