[vlc-devel] Segfault in freetype

Gilles Sabourin gilles.sabourin at free.fr
Sun Nov 25 09:08:14 CET 2007


Le Sunday 25 November 2007 06:08:22 Bernie Purcell, vous avez écrit :
> I've made a change to freetype.c to try and deal with part of the
> segfault issue that jpsaman and Gilles Sabourin have noticed.
> I've never actually been able to reproduce the issue myself, so not sure
> if the change has made things better or worse. If it has made things
> worse let me know and I'll revert it.
>
> Bitmap
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel

Ok, I have given it a try. Under gdb and 64 bits architecture, I have another 
segmentation fault where it looks like that freetype.c and subtitle plugin 
are involved in the crash. Here are the backtraces :

(gdb) run --m3u-extvlcopt Desktop/TV_fbx.m3u
Starting program: /usr/bin/vlc --m3u-extvlcopt Desktop/TV_fbx.m3u
[Thread debugging using libthread_db enabled]
[New Thread 47249342136064 (LWP 20842)]
VLC media player 0.9.0-svn Grishenko
[00000001] main libvlc debug: VLC media player - version 0.9.0-svn Grishenko - 
(c) 1996-2007 the VideoLAN team
[00000001] main libvlc debug: libvlc was configured 
with ./configure  '--prefix=/usr' '--libdir=/usr/lib64' '--enable-fast-install' '--enable-shout' '--enable-skins2' '--disable-pda' '--disable-macosx' '--disable-qnx' '--enable-ncurses' '--enable-xosd' '--enable-visual' '--disable-goom' '--enable-slp' '--enable-lirc' '--disable-joystick' '--disable-corba' '--enable-dvdread' '--enable-dvdnav' '--disable-dshow' '--enable-v4l' '--enable-pvr' '--enable-vcd' '--enable-satellite' '--enable-ogg' '--enable-mkv' '--enable-mod' '--enable-libcdio' '--enable-vcdx' '--enable-cddax' '--enable-libcddb' '--enable-x11' '--enable-xvideo' '--enable-glx' '--enable-fb' '--enable-mga' '--enable-freetype' '--enable-fribidi' '--enable-svg' '--disable-hd1000v' '--disable-directx' '--disable-wingdi' '--disable-glide' '--enable-aa' '--enable-caca' '--enable-oss' '--enable-esd' '--enable-arts' '--enable-waveout' '--enable-portaudio' '--disable-coreaudio' '--disable-hd1000a' '--enable-mad' '--enable-ffmpeg' '--enable-faad' '--enable-a52' '--enable-dca' '--enable-flac' '--enable-libmpeg2' '--enable-vorbis' '--enable-tremor' '--enable-speex' '--disable-tarkin' '--enable-theora' '--enable-cmml' '--enable-utf8' '--disable-pth' '--disable-st' '--disable-gprof' '--disable-cprof' '--disable-testsuite' '--disable-optimizations' '--disable-altivec' '--enable-debug' '--enable-release' '--enable-sout' '--with-ffmpeg-faac' '--disable-galaktos' '--enable-httpd' '--disable-jack' '--enable-mozilla' '--enable-alsa' '--enable-real' '--enable-realrtsp' '--enable-live555' '--with-live555-tree=/usr/lib64/live' '--enable-dvbpsi' '--enable-dvb'
[00000001] main libvlc: Running vlc with the default interface. Use 'cvlc' to 
use vlc without interface.
[New Thread 1082132800 (LWP 20845)]
[00000001] main libvlc debug: translation test: code is "Fr"
[New Thread 1090541888 (LWP 20870)]
[New Thread 1098934592 (LWP 20871)]
[New Thread 1107327296 (LWP 20872)]
[New Thread 1115720000 (LWP 20873)]
[New Thread 1124112704 (LWP 20874)]
[New Thread 1132505408 (LWP 20875)]
[New Thread 1140898112 (LWP 20876)]
[New Thread 1149290816 (LWP 20877)]
[Thread 1149290816 (LWP 20877) exited]
[New Thread 1149290816 (LWP 20878)]
[00000747] live555 demuxer: 
[rtsp://mafreebox.freebox.fr/freeboxtv/stream?id=201] user= pwd=
[New Thread 1157683520 (LWP 20882)]
[New Thread 1166076224 (LWP 20883)]
libdvbpsi error (PSI decoder): TS discontinuity (received 9, expected 0) for 
PID 0
libdvbpsi error (PSI decoder): TS discontinuity (received 4, expected 0) for 
PID 1285
[New Thread 1174468928 (LWP 20884)]
[New Thread 1182861632 (LWP 20885)]
[New Thread 1191254336 (LWP 20886)]
[New Thread 1199647040 (LWP 20890)]
[New Thread 1208039744 (LWP 20894)]
*** glibc detected *** /usr/bin/vlc: free(): invalid next size (fast): 
0x00000000013bbdf0 ***
======= Backtrace: =========
/lib64/libc.so.6[0x2af9179d6abe]
/lib64/libc.so.6(cfree+0x76)[0x2af9179d80f6]
/usr/lib64/vlc/misc/libfreetype_plugin.so[0x2aaab7b31e5a]
/usr/lib64/libvlc.so.1(spu_RenderSubpictures+0xe14)[0x2af916c70246]
/usr/lib64/libvlc.so.1[0x2af916c6c15e]
/usr/lib64/libvlc.so.1[0x2af916c6a099]
/lib64/libpthread.so.0[0x2af91755009e]
/lib64/libc.so.6(clone+0x6d)[0x2af917a2b68d]
======= Memory map: ========
00400000-00402000 r-xp 00000000 08:25 
4087395                            /usr/bin/vlc
00601000-00603000 rw-p 00001000 08:25 
4087395                            /usr/bin/vlc
00603000-018df000 rw-p 00603000 00:00 0                                  
[heap]
40000000-40001000 ---p 40000000 00:00 0
40001000-40801000 rwxp 40001000 00:00 0
40803000-40805000 rwxp 00000000 00:0e 
3332                               /dev/zero
40805000-40806000 ---p 40805000 00:00 0
40806000-41006000 rwxp 40806000 00:00 0
41006000-41007000 ---p 41006000 00:00 0
41007000-41807000 rwxp 41007000 00:00 0
41807000-41808000 ---p 41807000 00:00 0
41808000-42008000 rwxp 41808000 00:00 0
42008000-42009000 ---p 42008000 00:00 0
42009000-42809000 rwxp 42009000 00:00 0
42809000-4280a000 ---p 42809000 00:00 0
4280a000-4300a000 rwxp 4280a000 00:00 0
4300a000-4300b000 ---p 4300a000 00:00 0
4300b000-4380b000 rwxp 4300b000 00:00 0
4380b000-4380c000 ---p 4380b000 00:00 0
4380c000-4400c000 rwxp 4380c000 00:00 0
4400c000-4400d000 ---p 4400c000 00:00 0
4400d000-4480d000 rwxp 4400d000 00:00 0
4480d000-4480e000 ---p 4480d000 00:00 0
4480e000-4500e000 rwxp 4480e000 00:00 0
4500e000-4500f000 ---p 4500e000 00:00 0
4500f000-4580f000 rwxp 4500f000 00:00 0
4580f000-45810000 ---p 4580f000 00:00 0
45810000-46010000 rwxp 45810000 00:00 0
46010000-46011000 ---p 46010000 00:00 0
46011000-46811000 rwxp 46011000 00:00 0
46811000-46812000 ---p 46811000 00:00 0
46812000-47012000 rwxp 46812000 00:00 0
47012000-47013000 ---p 47012000 00:00 0
47013000-47813000 rwxp 47013000 00:00 0
47813000-47814000 ---p 47813000 00:00 0
47814000-48014000 rwxp 47814000 00:00 0
2aaaaaaab000-2aaaaab01000 r--p 00000000 08:25 
3723088                    /usr/share/locale/fr/LC_MESSAGES/vlc.mo
2aaaaab01000-2aaaaac03000 r-xp 00000000 08:25 
3722683                    /usr/lib64/vlc/gui/libskins2_plugin.so
2aaaaac03000-2aaaaae02000 ---p 00102000 08:25 
3722683                    /usr/lib64/vlc/gui/libskins2_plugin.so
2aaaaae02000-2aaaaae08000 r--p 00101000 08:25 
3722683                    /usr/lib64/vlc/gui/libskins2_plugin.so
2aaaaae08000-2aaaaae0b000 rw-p 00107000 08:25 
3722683                    /usr/lib64/vlc/gui/libskins2_plugin.so
2aaaaae0b000-2aaaaae0c000 r--s 80000000 00:0e 
6591                       /dev/snd/pcmC0D0p
2aaaaae0c000-2aaaaae0d000 rw-s 81000000 00:0e 
6591                       /dev/snd/pcmC0D0p
2aaaaae0d000-2aaaaae1d000 rw-s 00000000 00:0e 
6591                       /dev/snd/pcmC0D0p
2aaaaae3e000-2aaaaae47000 r-xp 00000000 08:25 
25982                      /usr/lib64/libSM.so.6.0.0
2aaaaae47000-2aaaab047000 ---p 00009000 08:25 
25982                      /usr/lib64/libSM.so.6.0.0
2aaaab047000-2aaaab049000 rw-p 00009000 08:25 
25982                      /usr/lib64/libSM.so.6.0.0
2aaaab049000-2aaaab060000 r-xp 00000000 08:25 
25113                      /usr/lib64/libICE.so.6.3.0
2aaaab060000-2aaaab25f000 ---p 00017000 08:25 
25113                      /usr/lib64/libICE.so.6.3.0
2aaaab25f000-2aaaab261000 rw-p 00016000 08:25 
25113                      /usr/lib64/libICE.so.6.3.0
2aaaab261000-2aaaab265000 rw-p 2aaaab261000 00:00 0
2aaaab265000-2aaaab275000 r-xp 00000000 08:25 
30143                      /usr/lib64/libXext.so.6.4.0
2aaaab275000-2aaaab474000 ---p 00010000 08:25 
30143                      /usr/lib64/libXext.so.6.4.0
2aaaab474000-2aaaab476000 rw-p 0000f000 08:25 
30143                      /usr/lib64/libXext.so.6.4.0
2aaaab476000-2aaaab5a8000 r-xp 00000000 08:25 
29184                      /usr/lib64/libX11.so.6.2.0
2aaaab5a8000-2aaaab7a8000 ---p 00132000 08:25 29184
Program received signal SIGABRT, Aborted.
[Switching to Thread 1199647040 (LWP 20890)]
0x00002af91799a6f5 in raise () from /lib64/libc.so.6
(gdb) bt full
#0  0x00002af91799a6f5 in raise () from /lib64/libc.so.6
No symbol table info available.
#1  0x00002af91799bb50 in abort () from /lib64/libc.so.6
No symbol table info available.
#2  0x00002af9179d189b in __libc_message () from /lib64/libc.so.6
No symbol table info available.
#3  0x00002af9179d6abe in malloc_printerr () from /lib64/libc.so.6
No symbol table info available.
#4  0x00002af9179d80f6 in free () from /lib64/libc.so.6
No symbol table info available.
#5  0x00002aaab7b31e5a in RenderText (p_filter=0x13c2670, 
p_region_out=0x13bb350, p_region_in=0x13bb350) at freetype.c:1355
        p_sys = (filter_sys_t *) 0x13d15c0
        p_lines = (line_desc_t *) 0x13c5800
        p_line = (line_desc_t *) 0x13c5800
        p_next = (line_desc_t *) 0x0
        p_prev = (line_desc_t *) 0x0
        i = 8
        i_pen_y = 0
        i_pen_x = 135
        i_error = 0
        i_glyph_index = 21
        i_previous = 21
        psz_unicode = (uint32_t *) 0x13bbe10
        psz_unicode_orig = (uint32_t *) 0x13bbdf0
        i_char = 50
        psz_line_start = (uint32_t *) 0x13bbdf0
        i_string_length = 8
        psz_string = 0x13c15b0 "France 2"
        iconv_handle = (vlc_iconv_t) 0x13c6750
        i_font_color = 16777215
        i_font_alpha = 0
        i_font_size = 0
        i_red = 255
        i_green = 255
        i_blue = 255
        val = {i_int = 1000, b_bool = 1000, f_float = 1.40129846e-42, 
psz_string = 0x3e8 <Address 0x3e8 out of bounds>,
  p_address = 0x3e8, p_object = 0x3e8, p_list = 0x3e8, i_time = 1000, var = 
{psz_name = 0x3e8 <Address 0x3e8 out of bounds>,
    i_object_id = 20719120}, padding = {a = -24 'è', b = 3 '\003', c = 0 '\0', 
d = 0 '\0', e = 0 '\0', f = 0 '\0', g = 0 '\0',
    h = 0 '\0'}}
        i_scale = 1000
        line = {xMin = 0, yMin = -1, xMax = 135, yMax = 25}
        glyph_size = {xMin = 0, yMin = 0, xMax = 18, yMax = 25}
        result = {x = 135, y = 26}
        tmp_glyph = (FT_Glyph) 0xe822a0
#6  0x00002af916c70246 in spu_RenderSubpictures (p_spu=0xe8bbe0, 
p_fmt=0xcb9440, p_pic_dst=0xcb9738, p_pic_src=0xcb9738,
    p_subpic=0xe8bce8, i_scale_width_orig=1000, i_scale_height_orig=1000) at 
video_output/vout_subpictures.c:786
        val = {i_int = 1261112, b_bool = 1261112, f_float = 1.76719431e-39, 
psz_string = 0x133e38 <Address 0x133e38 out of bounds>,
  p_address = 0x133e38, p_object = 0x133e38, p_list = 0x133e38, i_time = 
1261112, var = {
    psz_name = 0x133e38 <Address 0x133e38 out of bounds>, i_object_id = 
379699200}, padding = {a = 56 '8', b = 62 '>', c = 19 '\023',
    d = 0 '\0', e = 0 '\0', f = 0 '\0', g = 0 '\0', h = 0 '\0'}}
        i_x_offset = 0
        i_inv_scale_x = 1000
        orig_fmt = {i_chroma = 1415071060, i_aspect = 0, i_width = 0, i_height 
= 0, i_x_offset = 0, i_y_offset = 0, i_visible_width = 0,
  i_visible_height = 0, i_bits_per_pixel = 0, i_sar_num = 8, i_sar_den = 5, 
i_frame_rate = 0, i_frame_rate_base = 0, i_rmask = 0,
  i_gmask = 0, i_bmask = 0, p_palette = 0x0}
        b_rerender_text = 0
        i_fade_alpha = 255
        i_y_offset = 0
---Type <return> to continue, or q <return> to quit---
        i_scale_idx = 0
        i_inv_scale_y = 1000
        pi_subpic_x = {30, 30}
        k = 2
        p_region = (subpicture_region_t *) 0x13bb350
        pi_scale_width = {1000, 1000}
        pi_scale_height = {1000, 1000}
        i_source_video_width = 480
        i_source_video_height = 576
#7  0x00002af916c6c15e in vout_RenderPicture (p_vout=0xcb8f90, p_pic=0xcb9738, 
p_subpic=0xe8bce8) at video_output/vout_pictures.c:320
        i_scale_width = 1000
        i_scale_height = 1000
#8  0x00002af916c6a099 in RunThread (p_vout=0xcb8f90) at 
video_output/video_output.c:1064
        i_index = 7
        i_idle_loops = 45
        current_date = 2729678630
        display_date = 2729858234
        p_picture = (picture_t *) 0xcb9738
        p_last_picture = (picture_t *) 0x0
        p_directbuffer = (picture_t *) 0x0
        p_subpic = (subpicture_t *) 0xe8bce8
        p_input = (input_thread_t *) 0xb905c0
        val = {i_int = 1, b_bool = 1, f_float = 1.40129846e-45, psz_string = 
0x1 <Address 0x1 out of bounds>, p_address = 0x1,
  p_object = 0x1, p_list = 0x1, i_time = 1, var = {psz_name = 0x1 <Address 0x1 
out of bounds>, i_object_id = 0}, padding = {a = 1 '\001',
    b = 0 '\0', c = 0 '\0', d = 0 '\0', e = 0 '\0', f = 0 '\0', g = 0 '\0', h 
= 0 '\0'}}
        b_drop_late = 1
        i_displayed = 7
        i_lost = 0
        i_loops = 46
#9  0x00002af91755009e in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#10 0x00002af917a2b68d in clone () from /lib64/libc.so.6
No symbol table info available.
#11 0x0000000000000000 in ?? ()
No symbol table info available.

Greetings,
Gilles Sabourin


More information about the vlc-devel mailing list