Memory leaks
-
Current chatty leaks like
==6739==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 18421 byte(s) in 594 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb9367f900 in g_malloc ../../../glib/gmem.c:99
Direct leak of 7168 byte(s) in 28 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb916386d4 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x206d4)
Direct leak of 6400 byte(s) in 10 object(s) allocated from:
#0 0x7feb93a47720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
#1 0x7feb91638780 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20780)
Direct leak of 648 byte(s) in 27 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x7feb92c03491 in purple_blist_add_account ./libpurple/blist.c:2692
Direct leak of 312 byte(s) in 13 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x7feb92c41407 in purple_prpl_got_user_status ./libpurple/prpl.c:284
Direct leak of 268 byte(s) in 1 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
Direct leak of 240 byte(s) in 10 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x561adf6d2dbe in cb_buddy_signonoff_timeout ../src/chatty-buddy-list.c:208
#6 0x7feb9367a862 in g_timeout_dispatch ../../../glib/gmain.c:4667
Direct leak of 240 byte(s) in 10 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x7feb92c07685 in purple_buddy_icon_update ./libpurple/buddyicon.c:422
Direct leak of 128 byte(s) in 16 object(s) allocated from:
#0 0x7feb93a47720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
#1 0x7feb9367f99b in g_realloc ../../../glib/gmem.c:164
Direct leak of 101 byte(s) in 1 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb9367f900 in g_malloc ../../../glib/gmem.c:99
#2 0x60300060a74f (<unknown module>)
Direct leak of 83 byte(s) in 1 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb9367f900 in g_malloc ../../../glib/gmem.c:99
#2 0x6020006b41ef (<unknown module>)
Direct leak of 83 byte(s) in 1 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb9367f900 in g_malloc ../../../glib/gmem.c:99
#2 0x60200060edcf (<unknown module>)
Direct leak of 72 byte(s) in 3 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x561adf6d5116 in chatty_blist_refresh ../src/chatty-buddy-list.c:964
#6 0x561adf6d6a4d in chatty_blist_show ../src/chatty-buddy-list.c:1481
#7 0x561adf6db363 in init_libpurple ../src/chatty-purple-init.c:367
#8 0x561adf6db37e in libpurple_start ../src/chatty-purple-init.c:375
#9 0x561adf6beeba in chatty_window_init_data ../src/chatty-window.c:179
#10 0x561adf6bf6d3 in chatty_window_activate ../src/chatty-window.c:265
#11 0x7feb9375bc7c in g_closure_invoke ../../../gobject/gclosure.c:810
Direct leak of 61 byte(s) in 1 object(s) allocated from:
#0 0x7feb93a47720 in __interceptor_realloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9720)
#1 0x7feb92a406e6 in _IO_vasprintf /build/glibc-YJREGK/glibc-2.28/libio/vasprintf.c:81
Direct leak of 48 byte(s) in 2 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9367f948 in g_malloc0 ../../../glib/gmem.c:129
#2 0x561adf6cc19b in chatty_conv_message_get_last_msg ../src/chatty-conversation.c:1009
#3 0x561adf6d9290 in chatty_blist_update_buddy ../src/chatty-buddy-list.c:2137
#4 0x561adf6d954f in chatty_blist_update ../src/chatty-buddy-list.c:2184
#5 0x7feb92c043b6 in purple_blist_server_alias_buddy ./libpurple/blist.c:1175
Indirect leak of 15200 byte(s) in 475 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb91624d0f (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0xcd0f)
Indirect leak of 7744 byte(s) in 242 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb91638d18 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20d18)
Indirect leak of 7662 byte(s) in 635 object(s) allocated from:
#0 0x7feb93998810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
#1 0x7feb91637fc4 in FcValueSave (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1ffc4)
Indirect leak of 6236 byte(s) in 184 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb9367f900 in g_malloc ../../../glib/gmem.c:99
Indirect leak of 4000 byte(s) in 125 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb9163827c (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x2027c)
Indirect leak of 960 byte(s) in 30 object(s) allocated from:
#0 0x7feb93a47518 in calloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9518)
#1 0x7feb91638106 (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x20106)
Indirect leak of 240 byte(s) in 5 object(s) allocated from:
#0 0x7feb93a47330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x7feb916322ed in FcLangSetCreate (/usr/lib/x86_64-linux-gnu/libfontconfig.so.1+0x1a2ed)
SUMMARY: AddressSanitizer: 76315 byte(s) leaked in 2414 allocation(s).
-
Another memory issue
Found when monitoring Chatty's PID with TOP, while performing several tasks like:
-
Launching dialogs and entering conversations increased the RAM usage; when closing the dialogs or returning to the main-view again, the RAM usage decreased almost to the initial value.
-
When opening a couple of conversations, which have been active once but removed from the conversations list, the memory usage increases notably due to the loading of the chat history. But when leaving (not deleting) the conversations, the memory usage remains almost the same. Since the tabs/view closes when leaving a chat, the mem for the chat history seemingly wasn't freed. Seems to be related to chatty_conv_delete_message_history().