Hello Clutter Team I am using the clutter-0.6.2 in my system. I have slightly modified the test-depth program since the environment does not accept mouse or keyboard inputs.Hence to end the program I use a timer my making use of g_timeout_add function and then in callback function i use clutter_main_quit.
1)Using valgrind I am able to see memory leaks wherein memory allocated during
clutter_context_get_default is not freed.Is this a known issue or am I missing
something?
2)Also is any memory check done before a clutter version is released .If so
this would help narrow down the memory leak to the application.
I have attached the clutter application along with valgrind output
I used the following command
valgrind --tool=memcheck --leak-check=full --show-reachable=yes test-depth_timer
Regards
Dilip
---------------------------------
Explore your hobbies and interests. Click here to begin.==2232== ==2232== ERROR SUMMARY: 3047 errors from 13 contexts (suppressed: 64 from 2) ==2232== malloc/free: in use at exit: 317,227 bytes in 3,135 blocks. ==2232== malloc/free: 95,087 allocs, 91,952 frees, 20,455,672 bytes allocated. ==2232== For counts of detected errors, rerun with: -v ==2232== searching for pointers to 3,135 not-freed blocks. ==2232== checked 575,156 bytes. ==2232== ==2232== ==2232== 20 bytes in 1 blocks are definitely lost in loss record 1 of 8 ==2232== at 0x401C7F9: malloc (vg_replace_malloc.c:207) ==2232== by 0x402211A: malloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB855: g_malloc (gmem.c:131) ==2232== by 0x41154B6: g_timer_new (gtimer.c:72) ==2232== by 0x427F30C: clutter_context_get_default (clutter-main.c:701) ==2232== by 0x427FAA9: clutter_get_option_group (clutter-main.c:898) ==2232== by 0x4280A08: clutter_init (clutter-main.c:1025) ==2232== by 0x80493A1: main (test-depth_timer.c:124) ==2232== ==2232== ==2232== 800 bytes in 20 blocks are possibly lost in loss record 2 of 8 ==2232== at 0x401DD59: calloc (vg_replace_malloc.c:397) ==2232== by 0x40224E9: calloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB7EB: g_malloc0 (gmem.c:150) ==2232== by 0x40B14F7: type_node_any_new_W (gtype.c:342) ==2232== by 0x40B1584: type_node_fundamental_new_W (gtype.c:447) ==2232== by 0x40B6F31: g_type_register_fundamental (gtype.c:2197) ==2232== by 0x40BD9AA: g_value_types_init (gvaluetypes.c:398) ==2232== by 0x40B976C: g_type_init_with_debug_flags (gtype.c:3439) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== by 0x80493A1: main (test-depth_timer.c:124) ==2232== ==2232== ==2232== 3,368 bytes in 148 blocks are still reachable in loss record 3 of 8 ==2232== at 0x401C7F9: malloc (vg_replace_malloc.c:207) ==2232== by 0x401DE97: realloc (vg_replace_malloc.c:429) ==2232== by 0x40221B0: realloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB77E: g_realloc (gmem.c:168) ==2232== by 0x40E3CD9: g_quark_from_static_string (gdataset.c:683) ==2232== by 0x40B9626: g_type_init_with_debug_flags (gtype.c:3404) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== by 0x80493A1: main (test-depth_timer.c:124) ==2232== ==2232== ==2232== 18,096 bytes in 148 blocks are still reachable in loss record 4 of 8 ==2232== at 0x401DE39: realloc (vg_replace_malloc.c:429) ==2232== by 0x40221B0: realloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB77E: g_realloc (gmem.c:168) ==2232== by 0x40B1382: type_node_any_new_W (gtype.c:403) ==2232== by 0x40B16C1: type_node_new_W (gtype.c:465) ==2232== by 0x40B6CE7: g_type_register_static (gtype.c:2262) ==2232== by 0x40A47D4: g_param_type_register_static (gparam.c:1078) ==2232== by 0x40A6388: g_param_spec_types_init (gparamspecs.c:1484) ==2232== by 0x40B9785: g_type_init_with_debug_flags (gtype.c:3459) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== ==2232== ==2232== 26,728 bytes in 83 blocks are still reachable in loss record 5 of 8 ==2232== at 0x401DF3F: memalign (vg_replace_malloc.c:460) ==2232== by 0x401E034: posix_memalign (vg_replace_malloc.c:569) ==2232== by 0x410C961: slab_allocator_alloc_chunk (gslice.c:1136) ==2232== by 0x410D8EA: g_slice_alloc (gslice.c:661) ==2232== by 0x40E89BE: g_hash_table_new_full (ghash.c:142) ==2232== by 0x40E8A28: g_hash_table_new (ghash.c:113) ==2232== by 0x40E3D8D: g_quark_from_static_string (gdataset.c:687) ==2232== by 0x40B9626: g_type_init_with_debug_flags (gtype.c:3404) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== by 0x80493A1: main (test-depth_timer.c:124) ==2232== ==2232== ==2232== 27,192 bytes in 25 blocks are possibly lost in loss record 6 of 8 ==2232== at 0x401DF3F: memalign (vg_replace_malloc.c:460) ==2232== by 0x401E034: posix_memalign (vg_replace_malloc.c:569) ==2232== by 0x410C961: slab_allocator_alloc_chunk (gslice.c:1136) ==2232== by 0x410D8EA: g_slice_alloc (gslice.c:661) ==2232== by 0x410DFE1: g_slice_alloc0 (gslice.c:833) ==2232== by 0x40B43F1: g_type_create_instance (gtype.c:1549) ==2232== by 0x409E55F: g_object_constructor (gobject.c:1046) ==2232== by 0x4294401: clutter_backend_egl_constructor (clutter-backend-egl.c:161) ==2232== by 0x409D9A1: g_object_newv (gobject.c:937) ==2232== by 0x409E45B: g_object_new_valist (gobject.c:986) ==2232== by 0x409E535: g_object_new (gobject.c:795) ==2232== by 0x427F2FD: clutter_context_get_default (clutter-main.c:695) ==2232== ==2232== ==2232== 32,771 bytes in 475 blocks are still reachable in loss record 7 of 8 ==2232== at 0x401DD59: calloc (vg_replace_malloc.c:397) ==2232== by 0x40224E9: calloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB7EB: g_malloc0 (gmem.c:150) ==2232== by 0x410C140: g_slice_init_nomessage (gslice.c:329) ==2232== by 0x410DBC0: g_slice_alloc (gslice.c:359) ==2232== by 0x40E89BE: g_hash_table_new_full (ghash.c:142) ==2232== by 0x40E8A28: g_hash_table_new (ghash.c:113) ==2232== by 0x40E3D8D: g_quark_from_static_string (gdataset.c:687) ==2232== by 0x40B9626: g_type_init_with_debug_flags (gtype.c:3404) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== ==2232== ==2232== 208,252 bytes in 2,235 blocks are still reachable in loss record 8 of 8 ==2232== at 0x401C7F9: malloc (vg_replace_malloc.c:207) ==2232== by 0x402211A: malloc (in /smobee_util/lib/libmemusage.so) ==2232== by 0x40FB855: g_malloc (gmem.c:131) ==2232== by 0x40A4786: g_param_type_register_static (gparam.c:1070) ==2232== by 0x40A5CB9: g_param_spec_types_init (gparamspecs.c:1104) ==2232== by 0x40B9785: g_type_init_with_debug_flags (gtype.c:3459) ==2232== by 0x40B97A4: g_type_init (gtype.c:3475) ==2232== by 0x428091E: clutter_base_init (clutter-main.c:1568) ==2232== by 0x4280958: clutter_init (clutter-main.c:1062) ==2232== by 0x80493A1: main (test-depth_timer.c:124) ==2232== ==2232== LEAK SUMMARY: ==2232== definitely lost: 20 bytes in 1 blocks. ==2232== possibly lost: 27,992 bytes in 45 blocks. ==2232== still reachable: 289,215 bytes in 3,089 blocks. ==2232== suppressed: 0 bytes in 0 blocks.
test-depth_timer.c
Description: 3537577285-test-depth_timer.c
