[MPlayer-users] memory leak in mplayer

Jerry Wang jerry.wang at beonic.com
Thu Dec 23 01:33:44 CET 2010


Here is the report:

[jerryw at localhost newcastle]$ valgrind --leak-check=full ./mplayer
-playlist plt.plt 
==14979== Memcheck, a memory error detector
==14979== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et
al.
==14979== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright
info
==14979== Command: ./mplayer -playlist newcastle.plt
==14979== 
MPlayer SVN-r30448-4.4.1 (C) 2000-2010 MPlayer Team

Playing movie.mov.
libavformat file format detected.
[lavf] Video stream found, -vid 0
VIDEO:  [H264]  720x576  24bpp  15.000 fps  221.3 kbps (27.0 kbyte/s)
Clip info:
 major_brand: qt  
 minor_version: 537199360
 compatible_brands: qt  
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 720x576 => 720x576 Planar YV12 
==14979== Conditional jump or move depends on uninitialised value(s)
==14979==    at 0x65D418F: _XUpdateGCCache (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x65D47DD: XCreateGC (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x80C8C07: vo_x11_create_vo_window (x11_common.c:1148)
==14979==    by 0x80C9E55: config (vo_xv.c:250)
==14979==    by 0x80BC47C: config_video_out (video_out.c:361)
==14979==    by 0x23F: ???
==14979== 
V:   5.2   0/  0 95% 33%  0.0% 0 0 

Exiting... (End of file)
==14979== 
==14979== HEAP SUMMARY:
==14979==     in use at exit: 112,262 bytes in 1,663 blocks
==14979==   total heap usage: 9,320 allocs, 7,657 frees, 11,914,853
bytes allocated
==14979== 
==14979== 6 bytes in 1 blocks are definitely lost in loss record 4 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x6436AF: strdup (in /lib/libc-2.12.so)
==14979==    by 0x81BADDB: get_term_charset (getch2.c:300)
==14979==    by 0x5E2CC5: (below main) (in /lib/libc-2.12.so)
==14979== 
==14979== 18 bytes in 1 blocks are possibly lost in loss record 23 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F83A4: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32EA900: FcDefaultSubstitute
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x82202B6: load_font_ft (font_load_ft.c:1164)
==14979==    by 0x81B8DED: vo_update_osd_ext.clone.1 (sub.c:1122)
==14979==    by 0x81B8FE1: vo_draw_text (sub.c:1259)
==14979== 
==14979== 37 bytes in 2 blocks are possibly lost in loss record 61 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBA06: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBB29: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FD2E3: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32BC754: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BD9B1: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BEEE8: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BFA8A: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32B653C: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32FAB7A: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FAECB: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979== 
==14979== 55 bytes in 3 blocks are possibly lost in loss record 67 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBA06: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBB29: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FD373: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32BC754: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BD9B1: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BEEE8: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BFA8A: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32B653C: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32FAB7A: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FAECB: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979== 
==14979== 112 (8 direct, 104 indirect) bytes in 1 blocks are definitely
lost in loss record 83 of 129
==14979==    at 0x4005CD2: realloc (vg_replace_malloc.c:476)
==14979==    by 0x660BF62: ??? (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x660CC7E: ??? (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x660E472: ??? (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x660EBF5: _XlcCreateLC (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x662F57B: _XlcDefaultLoader
(in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x6616ED3: _XOpenLC (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x6616FFE: _XrmInitParseInfo
(in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x65FC8F1: ??? (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x65FE968: XrmGetStringDatabase
(in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x65DB40A: ??? (in /usr/lib/libX11.so.6.3.0)
==14979==    by 0x65DB606: XGetDefault (in /usr/lib/libX11.so.6.3.0)
==14979== 
==14979== 416 bytes in 6 blocks are possibly lost in loss record 95 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F79B7: FcValueSave
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F7AC3: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F82EC: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F4465: FcFontRenderPrepare
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32F463A: FcFontMatch
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x82202D2: load_font_ft (font_load_ft.c:1166)
==14979==    by 0x81B8DED: vo_update_osd_ext.clone.1 (sub.c:1122)
==14979==    by 0x81B8FE1: vo_draw_text (sub.c:1259)
==14979== 
==14979== 498 bytes in 21 blocks are possibly lost in loss record 97 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FB93A: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FB9DA: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBB29: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FD373: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32BC754: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BD9B1: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BEEE8: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BFA8A: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32B653C: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32FAB7A: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979== 
==14979== 730 bytes in 39 blocks are possibly lost in loss record 102 of
129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FB93A: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FB9DA: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FBB29: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FD2E3: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32BC754: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BD9B1: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BEEE8: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BFA8A: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32B653C: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32FAB7A: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979== 
==14979== 3,931 bytes in 166 blocks are possibly lost in loss record 123
of 129
==14979==    at 0x4005BDC: malloc (vg_replace_malloc.c:195)
==14979==    by 0x32F6883: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FB93A: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FCE5F: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32BC754: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BD9B1: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BEEE8: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32BFA8A: ??? (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32B653C: XML_ParseBuffer (in /lib/libexpat.so.1.5.2)
==14979==    by 0x32FAB7A: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FAECB: FcConfigParseAndLoad
(in /usr/lib/libfontconfig.so.1.4.4)
==14979==    by 0x32FC614: ??? (in /usr/lib/libfontconfig.so.1.4.4)
==14979== 
==14979== LEAK SUMMARY:
==14979==    definitely lost: 14 bytes in 2 blocks
==14979==    indirectly lost: 104 bytes in 4 blocks
==14979==      possibly lost: 5,685 bytes in 238 blocks
==14979==    still reachable: 106,459 bytes in 1,419 blocks
==14979==         suppressed: 0 bytes in 0 blocks
==14979== Reachable blocks (those to which a pointer was found) are not
shown.
==14979== To see them, rerun with: --leak-check=full
--show-reachable=yes
==14979== 
==14979== For counts of detected and suppressed errors, rerun with: -v
==14979== Use --track-origins=yes to see where uninitialised values come
from
==14979== ERROR SUMMARY: 10 errors from 10 contexts (suppressed: 94 from
9)

Thanks,
Jerry

On Wed, 2010-12-22 at 20:42 +1100, Carl Eugen Hoyos wrote:
> Jerry Wang <jerry.wang <at> beonic.com> writes:
> 
> > There do has a memory leak.
> > 
> > I tried two case:
> > 1) mplayer -quiet -vo null -loop 0 -playlist playlist.txt
> > 2) mplayer -quiet -vo xv -loop 0 -playlist playlist.txt
> > 
> > Both without any screen connected.  It turns out 1) do not consume more
> > memory, but 2) will hold a little bit more memory (around 300 byte
> > maybe) every time it start to play a movie,
> 
> Please provide "valgrind --leak-check=full" output after building mplayer with
> "--extra-cflags=-g3" (-loop should not be needed).
> 
> Carl Eugen
> 
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users




More information about the MPlayer-users mailing list