Issue780

Title valgrind: memory leaks
Priority release-blocker Status resolved
Assigned To fluzz Keywords
Linked issues Watchers fluzz

Submitted on 2014-12-15 16h38 by matthiaskrgr, last changed by fluzz.

Messages
Author: matthiaskrgr Date: 2014-12-15   16h38
Was walking around start of the game a bit, talking a bit to Francis, fighting a
bit.

Tux looks stuck...ESCAPING just for this frame...
---------------------------------------------------------------------------------
Termination of freedroidRPG initiated... Thank you for playing freedroidRPG.

==13675== 
==13675== HEAP SUMMARY:
==13675==     in use at exit: 165,787,571 bytes in 171,917 blocks
==13675==   total heap usage: 402,732 allocs, 230,815 frees, 2,107,051,347 bytes
allocated
==13675== 
==13675== 1 bytes in 1 blocks are definitely lost in loss record 1 of 890
==13675==    at 0x4C29F90: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x7A17C18: _XlcDefaultMapModifiers (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17FE5: XSetLocaleModifiers (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x6201FEC: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x6202C10: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61F1265: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61CAD4B: SDL_InitSubSystem (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61CADC3: SDL_Init (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x4583C1: InitFreedroid (init.c:963)
==13675==    by 0x415A75: main (main.c:152)
==13675== 
==13675== 16 bytes in 1 blocks are definitely lost in loss record 57 of 890
==13675==    at 0x4C2C080: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x44579F: MyMalloc (text_public.c:68)
==13675==    by 0x421202: dynarray_alloc (dynarray.c:53)
==13675==    by 0x45F167: decode_extension_chest (map.c:594)
==13675==    by 0x45F167: decode_obstacle_extensions (map.c:727)
==13675==    by 0x45F167: decode_level.lto_priv.314 (map.c:1143)
==13675==    by 0x4BA637: LoadShip.constprop.94 (map.c:1261)
==13675==    by 0x41D593: Single_Player_Menu (menu.c:1752)
==13675==    by 0x41DA7E: Startup_handle.lto_priv.289 (menu.c:804)
==13675==    by 0x4B87DA: RunSubMenu.constprop.55 (menu.c:747)
==13675==    by 0x415B75: RunMenu (menu.c:776)
==13675==    by 0x415B75: StartupMenu (menu.c:782)
==13675==    by 0x415B75: main (main.c:178)
==13675== 
==13675== 26 bytes in 2 blocks are definitely lost in loss record 93 of 890
==13675==    at 0x4C29F90: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x4EB7BC9: strdup (in /usr/lib/libc-2.20.so)
==13675==    by 0x7A269E6: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A27814: _XimSetICValueData (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A22D48: _XimLocalCreateIC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A082F4: XCreateIC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x6201BE3: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x6202C10: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61F1265: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61CAD4B: SDL_InitSubSystem (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61CADC3: SDL_Init (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x4583C1: InitFreedroid (init.c:963)
==13675== 
==13675== 31 bytes in 31 blocks are definitely lost in loss record 102 of 890
==13675==    at 0x4C2C080: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x44579F: MyMalloc (text_public.c:68)
==13675==    by 0x446976: ReadAndMallocStringFromDataOptional (text_public.c:401)
==13675==    by 0x45E662: decode_random_droids (map.c:385)
==13675==    by 0x45E662: decode_header (map.c:425)
==13675==    by 0x45E662: decode_level.lto_priv.314 (map.c:1131)
==13675==    by 0x4BA637: LoadShip.constprop.94 (map.c:1261)
==13675==    by 0x41D593: Single_Player_Menu (menu.c:1752)
==13675==    by 0x41DA7E: Startup_handle.lto_priv.289 (menu.c:804)
==13675==    by 0x4B87DA: RunSubMenu.constprop.55 (menu.c:747)
==13675==    by 0x415B75: RunMenu (menu.c:776)
==13675==    by 0x415B75: StartupMenu (menu.c:782)
==13675==    by 0x415B75: main (main.c:178)
==13675== 
==13675== 88 (24 direct, 64 indirect) bytes in 1 blocks are definitely lost in
loss record 351 of 890
==13675==    at 0x4C2C080: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x44579F: MyMalloc (text_public.c:68)
==13675==    by 0x4BDD62: alloc_autostr (string.c:54)
==13675==    by 0x46E84B: check_chat_context_stack_size (chat.c:62)
==13675==    by 0x46E84B: chat_push_context (chat.c:106)
==13675==    by 0x46E84B: chat_with_droid (chat.c:791)
==13675==    by 0x4490EB: act_terminal (action.c:544)
==13675==    by 0x4490EB: __obstacle_action (action.c:622)
==13675==    by 0x442C0A: move_tux_towards_intermediate_point (influ.c:609)
==13675==    by 0x442C0A: move_tux (influ.c:733)
==13675==    by 0x474BF0: Game (main.c:106)
==13675==    by 0x415BBE: main (main.c:185)
==13675== 
==13675== 176 (48 direct, 128 indirect) bytes in 2 blocks are definitely lost in
loss record 446 of 890
==13675==    at 0x4C2C080: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x44579F: MyMalloc (text_public.c:68)
==13675==    by 0x4BDD62: alloc_autostr (string.c:54)
==13675==    by 0x46E84B: check_chat_context_stack_size (chat.c:62)
==13675==    by 0x46E84B: chat_push_context (chat.c:106)
==13675==    by 0x46E84B: chat_with_droid (chat.c:791)
==13675==    by 0x44F273: state_machine_rush_tux_and_open_talk (enemy.c:1904)
==13675==    by 0x44F273: update_enemy (enemy.c:2056)
==13675==    by 0x451BEB: move_enemies (enemy.c:2131)
==13675==    by 0x474BFA: Game (main.c:109)
==13675==    by 0x415BBE: main (main.c:185)
==13675== 
==13675== 192 (16 direct, 176 indirect) bytes in 1 blocks are definitely lost in
loss record 451 of 890
==13675==    at 0x4C2C29E: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x7A0DF30: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A0E4AF: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A0FD9E: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A105AB: _XlcCreateLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A2D8BF: _XlcDefaultLoader (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17E4D: _XOpenLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17F87: _XlcCurrentLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17FBD: XSetLocaleModifiers (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x6201D17: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x6202C10: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61F1265: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675== 
==13675== 1,688 (136 direct, 1,552 indirect) bytes in 1 blocks are definitely
lost in loss record 646 of 890
==13675==    at 0x4C2C29E: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==13675==    by 0x7A0DF30: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A0E4AF: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A0FD9E: ??? (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A105AB: _XlcCreateLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A318CF: _XlcUtf8Loader (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17E4D: _XOpenLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17F87: _XlcCurrentLC (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x7A17FBD: XSetLocaleModifiers (in /usr/lib/libX11.so.6.3.0)
==13675==    by 0x6201FEC: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x6202C10: ??? (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675==    by 0x61F1265: SDL_VideoInit (in /usr/lib/libSDL-1.2.so.0.11.4)
==13675== 
==13675== LEAK SUMMARY:
==13675==    definitely lost: 298 bytes in 40 blocks
==13675==    indirectly lost: 1,920 bytes in 41 blocks
==13675==      possibly lost: 6,372,971 bytes in 7,529 blocks
==13675==    still reachable: 159,412,382 bytes in 164,307 blocks
==13675==         suppressed: 0 bytes in 0 blocks
==13675== Reachable blocks (those to which a pointer was found) are not shown.
==13675== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==13675== 
==13675== For counts of detected and suppressed errors, rerun with: -v
==13675== ERROR SUMMARY: 243 errors from 205 contexts (suppressed: 1723 from 1)
Author: fluzz Date: 2015-03-10   18h27
Some memleaks were fixed recently, some being related with what you've found
here. So I close this ticket.
Please, open an other one if new memleaks are found.
History
Date User Action Args
2015-03-10 18:27:24fluzzsetstatus: open -> resolved
messages: + msg3082
2014-12-15 16:38:03matthiaskrgrcreate