Haunting bug in DVD subtitle handling [even longer]

Stepan Roh stepan at srnet.cz
Mon Jul 16 01:08:43 CEST 2001



On Sun, 15 Jul 2001, Gildas Bazin wrote:

> I cannot help you to solve this subtitles problem (sam is the SPU expert :-)
> but I just wanted to report that I also have problems running vlc under
> GDB-5.0.
> The problem is related to the sdl library (bug ?), and just compiling VLC
> without sdl support (./configure --without-sdl --enable-debug) solves the
> problem.

Thanks, that helped. I used ./configure --without-sdl --enable-debug
--disable-optimizations --disable-ppro --disable-mmx and it worked (BTW,
why is there no uninstall makefile target? I forgot to delete installed
sdl plugin which caused gdb not to work. Or did I miss something?). This
is the output from gdb (note that my previous post stated that I'm using
x11 vout which was not true (sdl plugin was used), but as you can see,
--vout has no influence on crash) - same configuration as in my original
post :

GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-slackware-linux"...
(gdb) run --vout x11 -vvvvvv
Starting program: /usr/local/bin/vlc --vout x11 -vvvvvv
[New Thread 1024 (LWP 9656)]
VideoLAN Client - version 0.2.80 Ourumov - (C)1996-2001 VideoLAN

intf: playlist initialized
module: checking built-in modules
module: new builtin module `es', ISO 13818-1 MPEG Elementary Stream input module
module: new builtin module `ps', ISO 13818-1 MPEG Program Stream input module
module: new builtin module `ts', ISO 13818-1 MPEG Transport Stream input module
module: new builtin module `yuv', YUV transformations module
module: new builtin module `idct', IDCT module
module: new builtin module `idctclassic', classic IDCT module
module: new builtin module `motion', motion compensation module
module: new builtin module `imdct', AC3 IMDCT module
module: new builtin module `downmix', AC3 downmix module
module: new builtin module `dvd', full DVD input module with CSS decryption
module: new builtin module `dummy', dummy functions module
module: new builtin module `null', the Null module that does nothing
module: new builtin module `rc', remote control interface module
module: checking plugin modules
module: browsing `.'
module: browsing `plugins'
module: browsing `/usr/local/lib/videolan/vlc'
module: new plugin module `dsp', Linux OSS /dev/dsp module
module: new plugin module `gtk', Gtk+ interface module
module: new plugin module `x11', X11 module
module: new plugin module `xvideo', XVideo extension module
module: module bank initialized
module: locking module `gtk'
intf: interface initialized
intf: added `dvd:/dev/dvd' to playlist
[New Thread 2049 (LWP 9657)]
[New Thread 1026 (LWP 9658)]
module: locking module `dvd'
dvd info: netlist initialized
ifo info: vmg initialized
dvd info: number of titles: 2
ifo info: vts 1 initialized
dvd: title 1 vts_title 1 pgc 1
dvd info: title: 1
    vobstart at: 5960 blocks
    stream size: 2128328 blocks
    number of chapters: 36
    number of angles: 1
dvd info: video
    compression: mpeg-2
    tv system: pal 625/50 Hz
    aspect ratio: 16:9
    display mode: letterboxed
    line21-1:
    line21-2:
    source res: 720x480 ntsc or 720x576 pal
    letterboxed: no
    mode: camera
module: locking module `motion'
module: locking module `idctclassic'
[New Thread 2051 (LWP 9659)]
dvd info: audio 1
    language: English
    mode: ac3
    channel(s): 2
    sampling: 48000 Hz
    appl_mode: not specified
    caption:
    quantization: drc
    status: 0
dvd info: audio 2
    language: Deutsch
    mode: ac3
    channel(s): 2
    sampling: 48000 Hz
    appl_mode: not specified
    caption:
    quantization: drc
    status: 1
dvd info: spu 1
    caption: 0
    language: English
    prefix: 100
    status: 4:3 0 wide 0 letter 0 pan 0
dvd info: spu 2
    caption: 0
    language: Deutsch
    prefix: 100
    status: 4:3 0 wide 1 letter 1 pan 0
dvd info: spu 3
    caption: 0
    language: Espanol
    prefix: 100
    status: 4:3 0 wide 2 letter 2 pan 0
dvd info: spu 4
    caption: 0
    language: Nederlands
    prefix: 100
    status: 4:3 0 wide 3 letter 3 pan 0
dvd info: spu 5
    caption: 0
    language: Svenska
    prefix: 100
    status: 4:3 0 wide 4 letter 4 pan 0
dvd info: spu 6
    caption: 0
    language: Norsk
    prefix: 100
    status: 4:3 0 wide 5 letter 5 pan 0
dvd info: spu 7
    caption: 0
    language: Dansk
    prefix: 100
    status: 4:3 0 wide 6 letter 6 pan 0
dvd info: spu 8
    caption: 0
    language: Suomi
    prefix: 100
    status: 4:3 0 wide 7 letter 7 pan 0
dvd info: spu 9
    caption: 0
    language: Portugues
    prefix: 100
    status: 4:3 0 wide 8 letter 8 pan 0
dvd info: spu 10
    caption: 0
    language: *Hebrew
    prefix: 100
    status: 4:3 0 wide 9 letter 9 pan 0
dvd info: spu 11
    caption: 0
    language: *Polish
    prefix: 100
    status: 4:3 0 wide a letter a pan 0
dvd info: spu 12
    caption: 0
    language: *Greek
    prefix: 100
    status: 4:3 0 wide b letter b pan 0
dvd info: spu 13
    caption: 0
    language: *Czech(Ceske)
    prefix: 100
    status: 4:3 0 wide c letter c pan 0
dvd info: spu 14
    caption: 0
    language: *Turkish
    prefix: 100
    status: 4:3 0 wide d letter d pan 0
dvd info: spu 15
    caption: 0
    language: Magyar
    prefix: 100
    status: 4:3 0 wide e letter e pan 0
dvd info: spu 16
    caption: 0
    language: Islenska
    prefix: 100
    status: 4:3 0 wide f letter f pan 0
dvd info: spu 17
    caption: 0
    language: Hrvatski
    prefix: 100
    status: 4:3 0 wide 10 letter 10 pan 0
dvd info: spu 18
    caption: 0
    language: Francais
    prefix: 100
    status: 4:3 0 wide 11 letter 11 pan 0
dvd info: spu 19
    caption: 0
    language: Italiano
    prefix: 100
    status: 4:3 0 wide 12 letter 12 pan 0
dvd info: spu 20
    caption: 1
    language: English
    prefix: 100
    status: 4:3 0 wide 13 letter 13 pan 0
dvd info: spu 21
    caption: 1
    language: Deutsch
    prefix: 100
    status: 4:3 0 wide 14 letter 14 pan 0
module: locking module `downmix'
module: locking module `imdct'
[New Thread 3076 (LWP 9660)]
intf info: menus refreshed as stream has changed
vpar: no vout present, spawning one
module: locking module `x11'
vout info: asking for 720x576, 15/16 bpp (1440 Bpl)
[New Thread 4101 (LWP 9661)]
vout: video display initialized (720x576, 16/16 bpp)
vout info: got 720x576, 16/16 bpp (1440 Bpl), masks: 0xf800/0x7e0/0x1f
module: locking module `yuv'
aout: no aout present, spawning one
module: locking module `dsp'
aout info: signed 16 bits stereo thread
[New Thread 5126 (LWP 9662)]
vpar info: stream periodicity changed from B[1] to B[2]
aout info: audio output thread 9660 spawned
aout info: fifo #0 allocated, 2 channels, rate 0
vout warning: late picture skipped (0x8167d58)
vpar info: stream periodicity changed from P[5] to P[4]
vpar synchro warning: dts != current_pts (-52851)
vout warning: late picture skipped (0x8167dc4)
vout warning: late picture skipped (0x8167dc4)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
[New Thread 6151 (LWP 9663)]
spudec: spu decoder thread 9663 spawned
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
module: hiding unused plugin module `xvideo'
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167dc4)
vout warning: late picture skipped (0x8167d58)
vout warning: late picture skipped (0x8167dc4)
vout warning: late picture skipped (0x8167d58)
input: seeking position 206640000/4358815744 (0:02:44/0:57:39)
vout warning: late picture skipped (0x8167d58)
vpar info: stream periodicity changed from B[2] to B[4]
vpar synchro warning: backward_pts != current_pts (80000)
vpar info: stream periodicity changed from B[4] to B[2]
vout warning: late picture skipped (0x8167d58)
vpar synchro warning: dts != current_pts (-80711)
spudec: trying to gather a 0x6b0 long subtitle
spudec: valid subtitle, size: 420x44, position: 150,444
spudec: cropped to: 420x29, position: 150,452
spudec: total size: 0x6b0, RLE offsets: 0x0 0x342
spudec: trying to gather a 0x340 long subtitle
spudec: valid subtitle, size: 142x44, position: 289,444
spudec: cropped to: 142x29, position: 289,452
spudec: total size: 0x340, RLE offsets: 0x0 0x13c
error: subpicture 0x8167f74 has invalid status 2
error: subpicture 0x8167fc8 has invalid status 2
spudec: trying to gather a 0x424 long subtitle

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 6151 (LWP 9663)]
0x400db0a7 in memcpy (dstpp=0x818d878, srcpp=0x40456025, len=2019) at ../sysdeps/generic/memcpy.c:55
55      ../sysdeps/generic/memcpy.c: No such file or directory.
(gdb) bt
#0  0x400db0a7 in memcpy (dstpp=0x818d878, srcpp=0x40456025, len=2019) at ../sysdeps/generic/memcpy.c:55
#1  0x8073765 in GetChunk (p_bit_stream=0x81865f0, p_buffer=0x818d858 "", i_buf_len=2) at include/input_ext-dec.h:431
#2  0x8072b76 in ParsePacket (p_spudec=0x81865e8) at src/spu_decoder/spu_decoder.c:330
#3  0x80727b3 in RunThread (p_spudec=0x81865e8) at src/spu_decoder/spu_decoder.c:176
#4  0x40055065 in pthread_start_thread (arg=0xbedffc00) at manager.c:274
#5  0x400550ad in pthread_start_thread_event () at manager.c:298
(gdb) print *((char *)dstpp)
$2 = 10 '\n'
(gdb) print *((char *)srcpp)
$3 = 10 '\n'
(gdb) print *((char *)dstpp+2018)
Cannot access memory at address 0x818e05a
(gdb) print *((char *)srcpp+2018)
$11 = -127 '\201'

You can see that dstpp is not long enough (I guess). I'll try to find that
bug (maybe, as it's late here).

Have a nice day.

Stepan Roh





More information about the vlc mailing list