Opened 17 years ago

Last modified 13 years ago

#887 closed defect (invalid)

Segmentation Fault while mencoder converting

Reported by: camille.roux@… Owned by: reimar
Priority: important Component: core
Version: HEAD Severity: critical
Keywords: Cc: compn, camille.roux@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Hi,

With some ogg (not all), the flv conversion generate a segmentation fault at the end of the calculation. However, the destination file is created but some piece of information are wrong (see ExifTool result below).
What can i do?

Thank you very much

Here is the log of mencoder and the result of ExifTool on the movies:


mencoder log


mencoder src.ogg -o dst.flv -of lavf -oac mp3lame -lameopts abr:br=56 -ovc lavc -lavcopts vcodec=flv:acodec=mp3:abitrate=56:vbitrate=500:trell -mc 0 -srate 22050
MEncoder SVN-r24219 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 1.70GHz (Family: 15, Model: 1, Stepping: 2)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0 data: 0x0 - 0xf5c050
[Ogg] stream 0: audio (format 0x0055), -aid 0
[Ogg] stream 1: video (FOURCC DIV3), -vid 0
Ogg file format detected.
VIDEO: [DIV3] 720x576 24bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:18 fourcc:0x33564944 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 192.0 kbit/12.50% (ratio: 24000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
MUXER_LAVF *
REMEMBER: MEncoder's libavformat muxing is presently broken and can generate
INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer
will play these INCORRECT files as if nothing were wrong!
*
OK, exit
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffdivx] vfm: ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
MP3 audio selected.
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (720x576 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
AUDIO CODEC ID: 15001, TAG: 0
Writing header...
Pos: 0.1s 3f ( 2%) 1.70fps Trem: 1min 6mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Segmentation faultf (99%) 17.46fps Trem: 0min 9mb A-V:0.000 [681:57]]


ExifTool result on src.ogg


ExifTool Version Number : 6.95
File Name : src.ogg
Directory : .
File Size : 15 MB
File Modification Date/Time : 2007:08:27 14:28:32
File Type : OGG
MIME Type : audio/x-ogg
Warning : Missing page(s) in Ogg file


ExifTool result on dst.flv


ExifTool Version Number : 6.95
File Name : dst.flv
Directory : .
File Size : 9 MB
File Modification Date/Time : 2007:08:29 16:51:19
File Type : FLV
MIME Type : video/x-flv
Duration : 0.000s
Image Width : 720
Image Height : 576
Video Bitrate : 0
Frame Rate : 25
Video Codec ID : 2
Audio Sample Size : 16
Stereo : Yes
Audio Codec ID : 2
File Size Bytes : 0
Audio Encoding : MP3
Audio Sample Rate : 22050
Audio Sample Bits : 16
Audio Channels : 2 (stereo)
Video Encoding : Sorensen H.263
Image Size : 720x576

Change History (8)

comment:1 by camille.roux@…, 17 years ago

Cc: camille.roux@… added

comment:2 by camille.roux@…, 17 years ago

Summary: Segmentation Fault during a mencorder conversionSegmentation Fault while mencoder converting

comment:3 by compn, 17 years ago

can you give us a gdb trace?
you can find instructions how to do so at :
http://www.mplayerhq.hu/DOCS/HTML/en/bugreports_what.html#bugreports_crash

comment:4 by camille.roux@…, 17 years ago

I followed the procedure with gdb (but with mencoder instead of mplayer). I hope you could help me with that.
Here is the log:


The end of the converion


Pos: 103.8s 2593f (99%) 10fps Trem: 0min 9mb A-V:0.000 [682:57] A/Vms 5/Pos: 103.8s 2594f (99%) 10fps Trem: 0min 9mb A-V:0.000 [682:57] A/Vms 5/Pos: 103.8s 2595f (99%) 10fps Trem: 0min 9mb A-V:0.000 [682:57] A/Vms 6/Pos: 103.9s 2596f (99%) 10fps Trem: 0min 9mb A-V:0.000 [681:57] A/Vms 6/Pos: 103.9s 2597f (99%) 10fps Trem: 0min 9mb A-V:0.000 [681:57] A/Vms 6/85 D/B/S 1/0/0
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208588608 (LWP 12860)]
0x43f69a45 in memcpy () from /lib/libc.so.6


disass


Dump of assembler code from 0x43f69a25 to 0x43f69a65:
0x43f69a25 <memcpy_chk+5>: inc %esp
0x43f69a26 <
memcpy_chk+6>: and $0x10,%al
0x43f69a28 <memcpy_chk+8>: jb 0x43fdd1e0 <chk_fail>
0x43f69a2e <memcpy_chk+14>: data16
0x43f69a2f <
memcpy_chk+15>: nop
0x43f69a30 <memcpy+0>: mov 0xc(%esp),%ecx
0x43f69a34 <memcpy+4>: mov %edi,%eax
0x43f69a36 <memcpy+6>: mov 0x4(%esp),%edi
0x43f69a3a <memcpy+10>: mov %esi,%edx
0x43f69a3c <memcpy+12>: mov 0x8(%esp),%esi
0x43f69a40 <memcpy+16>: cld
0x43f69a41 <memcpy+17>: shr %ecx
0x43f69a43 <memcpy+19>: jae 0x43f69a46 <memcpy+22>
0x43f69a45 <memcpy+21>: movsb %ds:(%esi),%es:(%edi)
0x43f69a46 <memcpy+22>: shr %ecx
0x43f69a48 <memcpy+24>: jae 0x43f69a4c <memcpy+28>
0x43f69a4a <memcpy+26>: movsw %ds:(%esi),%es:(%edi)
0x43f69a4c <memcpy+28>: rep movsl %ds:(%esi),%es:(%edi)
0x43f69a4e <memcpy+30>: mov %eax,%edi
0x43f69a50 <memcpy+32>: mov %edx,%esi
0x43f69a52 <memcpy+34>: mov 0x4(%esp),%eax
0x43f69a56 <memcpy+38>: ret
0x43f69a57 <memcpy+39>: nop
0x43f69a58 <memcpy+40>: nop
0x43f69a59 <memcpy+41>: nop
0x43f69a5a <memcpy+42>: nop
0x43f69a5b <memcpy+43>: nop
0x43f69a5c <memcpy+44>: nop
0x43f69a5d <memcpy+45>: nop
0x43f69a5e <memcpy+46>: nop
0x43f69a5f <memcpy+47>: nop
0x43f69a60 <_wordcopy_fwd_aligned+0>: push %ebp
0x43f69a61 <_wordcopy_fwd_aligned+1>: mov %esp,%ebp
0x43f69a63 <_wordcopy_fwd_aligned+3>: sub $0xc,%esp
End of assembler dump.


info all-registers


eax 0x933c481 154387585
ecx 0x7fffffff 2147483647
edx 0x94b49e0 155929056
ebx 0xbfdee53c -1075911364
esp 0xbfdee41c 0xbfdee41c
ebp 0x9300e78 0x9300e78
esi 0x933c481 154387585
edi 0x0 0
eip 0x43f69a45 0x43f69a45 <memcpy+21>
eflags 0x210a07 [ CF PF IF OF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
st0 -nan(0x8080808080808080) (raw 0xffff8080808080808080)
st1 -nan(0x8080808080808080) (raw 0xffff8080808080808080)
st2 -nan(0x80008000800080) (raw 0xffff0080008000800080)
st3 0.0009765625 (raw 0x3ff58000000000000000)
st4 0.5 (raw 0x3ffe8000000000000000)
st5 0 (raw 0x00000000000000000000)
st6 0 (raw 0x00000000000000000000)
st7 -9223372036854775808 (raw 0xc03e8000000000000000)
fctrl 0x37f 895
fstat 0x20 32
ftag 0xffff 65535
fiseg 0x73 115
fioff 0x8187c3c 135822396
foseg 0x7b 123
fooff 0x94b49f4 155929076
fop 0x3c9 969
xmm0 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x50, 0x82, 0x18, 0xea, 0x70, 0xa4, 0x91, 0x39, 0xad, 0x13,

0x21, 0x1, 0xa0, 0xae, 0xd7, 0x24}, v8_int16 = {0x8250, 0xea18, 0xa470,
0x3991, 0x13ad, 0x121, 0xaea0, 0x24d7}, v4_int32 = {0xea188250,
0x3991a470, 0x12113ad, 0x24d7aea0}, v2_int64 = {0x3991a470ea188250,
0x24d7aea0012113ad}, uint128 = 0x24d7aea0012113ad3991a470ea188250}

xmm1 {v4_float = {0x4740000, 0x0, 0x0, 0x0}, v2_double = {

0x8000000000000000, 0x0}, v16_int8 = {0x74, 0x4, 0x3f, 0x53, 0x71, 0x35,
0xa6, 0x6b, 0x2e, 0x77, 0x29, 0x31, 0x34, 0xab, 0x48, 0x34}, v8_int16 = {
0x474, 0x533f, 0x3571, 0x6ba6, 0x772e, 0x3129, 0xab34, 0x3448},

v4_int32 = {0x533f0474, 0x6ba63571, 0x3129772e, 0x3448ab34}, v2_int64 = {

0x6ba63571533f0474, 0x3448ab343129772e},

uint128 = 0x3448ab343129772e6ba63571533f0474}

xmm2 {v4_float = {0xae5c0000, 0x0, 0x0, 0x46ec4}, v2_double = {0x0,
0x8000000000000000}, v16_int8 = {0xa4, 0x51, 0x54, 0xd3, 0x6a, 0xe0, 0x5e,

0xa2, 0x8, 0x88, 0x2b, 0x8d, 0x90, 0xd8, 0x8d, 0x48}, v8_int16 = {0x51a4,
0xd354, 0xe06a, 0xa25e, 0x8808, 0x8d2b, 0xd890, 0x488d}, v4_int32 = {
0xd35451a4, 0xa25ee06a, 0x8d2b8808, 0x488dd890}, v2_int64 = {
0xa25ee06ad35451a4, 0x488dd8908d2b8808},

uint128 = 0x488dd8908d2b8808a25ee06ad35451a4}

xmm3 {v4_float = {0x0, 0x0, 0x0, 0x0}, v2_double = {0x0, 0x0},

v16_int8 = {0x2d, 0x45, 0xa2, 0xe3, 0x79, 0x32, 0x83, 0x82, 0x2a, 0xa6,

0x9f, 0x9d, 0xc7, 0x52, 0xc8, 0x2a}, v8_int16 = {0x452d, 0xe3a2, 0x3279,
0x8283, 0xa62a, 0x9d9f, 0x52c7, 0x2ac8}, v4_int32 = {0xe3a2452d,
0x82833279, 0x9d9fa62a, 0x2ac852c7}, v2_int64 = {0x82833279e3a2452d,
0x2ac852c79d9fa62a}, uint128 = 0x2ac852c79d9fa62a82833279e3a2452d}

xmm4 {v4_float = {0xc24b42, 0x88000000, 0x0, 0xfffff904},

v2_double = {0x8000000000000000, 0x8000000000000000}, v16_int8 = {0x42,

0x4b, 0x42, 0x4b, 0x62, 0x68, 0x7e, 0x58, 0x46, 0xd7, 0xac, 0x9d, 0x9e,
0x97, 0xdf, 0xc4}, v8_int16 = {0x4b42, 0x4b42, 0x6862, 0x587e, 0xd746,
0x9dac, 0x979e, 0xc4df}, v4_int32 = {0x4b424b42, 0x587e6862, 0x9dacd746,
0xc4df979e}, v2_int64 = {0x587e68624b424b42, 0xc4df979e9dacd746},

uint128 = 0xc4df979e9dacd746587e68624b424b42}

xmm5 {v4_float = {0xc24b42, 0x0, 0x0, 0x0}, v2_double = {0x0,

0x8000000000000000}, v16_int8 = {0x42, 0x4b, 0x42, 0x4b, 0x21, 0x3b, 0xc3,
0x14, 0x54, 0x62, 0xba, 0x28, 0x7e, 0x58, 0x3d, 0xeb}, v8_int16 = {0x4b42,
0x4b42, 0x3b21, 0x14c3, 0x6254, 0x28ba, 0x587e, 0xeb3d}, v4_int32 = {

0x4b424}

comment:5 by camille.roux@…, 17 years ago


bt


#0 0x43f69a45 in memcpy () from /lib/libc.so.6
#1 0x08187cb9 in demux_ogg_add_packet ()
#2 0x00000000 in ?? ()

comment:6 by reimar, 17 years ago

This is a bug in the ogg demuxer. While I could hack it to not crash, that would still not make it work right, so there is no point in that.
To fix it properly I need a sample file - either a public URL or upload to ftp://upload.mplayerhq.hu/incoming
If you can't make a sample available or need a solution now, try -demuxer lavf.

comment:7 by reimar, 17 years ago

ups, the right upload location is
ftp://upload.mplayerhq.hu/MPlayer/incoming

comment:8 by compn, 13 years ago

Resolution: invalid
Status: newclosed, patriotact@gmail.com

lavf is default ogg demuxer now, no sample, no reply > bug closed.

Note: See TracTickets for help on using tickets.