[MPlayer-users] Segmentation fault in pre5

Stefan Sassenberg stefan.sassenberg at gmx.de
Fri Oct 15 22:52:51 CEST 2004


Hello,

I frequently have segmentation faults when mencoding a movie.
Unfortunately this happens at different positions. I can provide some
information about this problem. I should add that I had other problems
of similar kind that I only solved by rebuilding mencoder with
./configure --disable-mmx2 which I'm currently using.

This is the command I executed:
(gdb) run -v fdk.mpg -vf crop=720:432:0:72 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1300:mbd=2:v4mv:autoaspect:keyint=100:trell:vpass=1 -oac mp3lame -lameopts vbr=0 -o /usr/local/share/multimedia/movies/fdk.avi

The last few lines and the where command outputs are
Pos: 727.9s  18199f ( 8%)  19fps Trem: 170min 1441mb  A-V:0.075 [1300:127] A/VmsPos: 727.9s  18200f ( 8%)  19fps Trem: 170min 1441mb  A-V:0.075 [1300:127] A/VmsPos: 728.0s  18201f ( 8%)  19fps Trem: 170min 1441mb  A-V:0.077 [1300:127] A/Vms 1/46 D/B/S 0/2/1 
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 3038)]
0xd2600fd2 in ?? ()
(gdb) where
#0  0xd2600fd2 in ?? ()
#1  0x081b7216 in encode_mb (s=0x84c0900, motion_x=-7, motion_y=-10)
    at mpegvideo.c:3664
#2  0x081b8e9f in encode_mb_hq (s=0x84c0900, backup=0xbfff637c, 
    best=0xbfffc4c0, type=2, pb=0xbfff64c0, pb2=0xbfff6490, tex_pb=0xbfff6460, 
    dmin=0xbfff6378, next_block=0xbfff637c, motion_x=-7, motion_y=265511183)
    at mpegvideo.c:3919
#3  0x081baff1 in encode_thread (c=0x84b6890, arg=0x84c0900)
    at mpegvideo.c:4254
#4  0x081a7868 in avcodec_default_execute (c=0x84b6890, 
    func=0x81b9470 <encode_thread>, arg=0x84c09c4, ret=0x0, count=1)
    at utils.c:342
#5  0x081b4ec8 in MPV_encode_picture (avctx=0x84b6890, buf=0x40b78008 "", 
    buf_size=2097152, data=0x84b67a0) at mpegvideo.c:4885
#6  0x081a7c0c in avcodec_encode_video (avctx=0x84b6890, 
    buf=0xfd3610f <Address 0xfd3610f out of bounds>, buf_size=265511183, 
    pict=0x84b67a0) at utils.c:478
#7  0x0808fabf in put_image (vf=0x84b6738, mpi=0x84c10a4) at ve_lavc.c:775
#8  0x08099153 in decode_video (sh_video=0x8497698, 
    start=0xfd3610f <Address 0xfd3610f out of bounds>, in_size=265511183, 
    drop_frame=0) at dec_video.c:332
#9  0x080688e4 in main (argc=265511183, argv=0xfd3610f) at mencoder.c:1303

Here is the output after starting mencoder:
Starting program: /usr/local/bin/mencoder -v fdk.mpg -vf crop=720:432:0:72 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=1300:mbd=2:v4mv:autoaspect:keyint=100:trell:vpass=1 -oac mp3lame -lameopts vbr=0 -o /usr/local/share/multimedia/movies/fdk.avi
[New Thread 16384 (LWP 3255)]
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale

MEncoder 1.0pre5-3.4.1 (C) 2000-2004 MPlayer Team

CPU: Advanced Micro Devices Athlon 4 /Athlon MP/XP Palomino 1741 MHz (Family: 6, Stepping: 2)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
CPUflags: Type: 6 MMX: 1 MMX2: 0 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX 3DNow 3DNowEx SSE

Reading /root/.mplayer/codecs.conf: Can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open '/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /root/.mplayer/mencoder
init_freetype
get_path('font/font.desc') -> '/root/.mplayer/font/font.desc'
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit 3DNow) Optimized OnScreenDisplay
[file] File size is 5613302788 bytes
STREAM: [file] fdk.mpg
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x4E943404
AVI file format detected.
list_end=0x252
======= AVI Header =======
us/frame: 39999  (fps=25.001)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 38680   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 576
==========================
list_end=0x154
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC:  (10000002)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 25/1 = 25.000
Start: 0   Len: 205982
Suggested BufferSize: 170380
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 576
  biPlanes 1
  biBitCount 24
  biCompression 268435458=''
  biSizeImage 1244160
===========================
====== AVI Super Index Header ========
  FCC (indx) dwSize (120) wLongsPerEntry(4)
  bIndexSubType (0) bIndexType (0)
  nEntriesInUse (6) dwChunkId (00dc)
  dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (00dc): [0] 0x000000014e790aa4 0x4a548 38053
ODML (00dc): [1] 0x000000014e7dafec 0x4a548 38053
ODML (00dc): [2] 0x000000014e825534 0x4a548 38053
ODML (00dc): [3] 0x000000014e86fa7c 0x4a548 38053
ODML (00dc): [4] 0x000000014e8b9fc4 0x4a548 38053
ODML (00dc): [5] 0x000000014e90450c 0x1eb48 15717
list_end=0x23A
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (2000)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 48000/1 = 48000.000
Start: 0   Len: 395464704
Suggested BufferSize: 24000
Quality 0
Sample size: 1
==========================
found 'wf', 18 bytes of 18
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 2
Samplerate: 48000
avg byte/sec: 48000
Block align: 1
bits/sample: 16
cbSize: 0
===========================
====== AVI Super Index Header ========
  FCC (indx) dwSize (120) wLongsPerEntry(4)
  bIndexSubType (0) bIndexType (0)
  nEntriesInUse (6) dwChunkId (01wb)
  dwReserved[0] (0) dwReserved[1] (0) dwReserved[2] (0)
===========================
ODML (01wb): [0] 0x000000014e923054 0x5f40 73056000
ODML (01wb): [1] 0x000000014e928f94 0x5f40 73056000
ODML (01wb): [2] 0x000000014e92eed4 0x5f40 73056000
ODML (01wb): [3] 0x000000014e934e14 0x5f40 73056000
ODML (01wb): [4] 0x000000014e93ad54 0x5f40 73056000
ODML (01wb): [5] 0x000000014e940c94 0x2770 30184704
list_end=0x252
AVI: dmlh found (size=4) (total_frames=38680)
list_end=0x27E
hdr=Software  size=23
Software  : MEncoder 1.0pre4-3.3.1
list_end=0x3FF5BF3C
Found movie at 0x100C - 0x3FF5BF3C
Reading INDEX block, 41776 chunks for 38680 frames (fpos=0x3ff5bf44)
additional RIFF header...
list_end=0x7FFFF234
Found movie at 0x100C - 0x7FFFF234
additional RIFF header...
list_end=0xBFFFCB8C
Found movie at 0x100C - 0xBFFFCB8C
additional RIFF header...
list_end=0xFFFF922C
Found movie at 0x100C - 0xFFFF922C
additional RIFF header...
list_end=0x3FFF0650
Found movie at 0x100C - 0x3FFF0650
additional RIFF header...
list_end=0x4E943404
Found movie at 0x100C - 0x4E943404
AVI: ODML: Building odml index (2 superindexchunks)
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (304448) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (38053) dwChunkId (00dc)
  qwBaseOffset (0x6DDC) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (304448) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (38053) dwChunkId (00dc)
  qwBaseOffset (0x3EF38E64) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (304448) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (38053) dwChunkId (00dc)
  qwBaseOffset (0x7E980480) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (304448) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (38053) dwChunkId (00dc)
  qwBaseOffset (0xB8A97354) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (304448) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (38053) dwChunkId (00dc)
  qwBaseOffset (0xF8932E4C) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix00) dwSize (125760) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (15717) dwChunkId (00dc)
  qwBaseOffset (0x1353680C8) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (24376) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (3044) dwChunkId (01wb)
  qwBaseOffset (0x1014) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (24376) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (3044) dwChunkId (01wb)
  qwBaseOffset (0x3EECD208) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (24376) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (3044) dwChunkId (01wb)
  qwBaseOffset (0x7E907CC4) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (24376) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (3044) dwChunkId (01wb)
  qwBaseOffset (0xB8A3C960) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (24376) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (3044) dwChunkId (01wb)
  qwBaseOffset (0xF88B3D94) dwReserved3 (0)
===========================
====== AVI Standard Index Header ========
  FCC (ix01) dwSize (10088) wLongsPerEntry(2)
  bIndexSubType (0) bIndexType (1)
  nEntriesInUse (1258) dwChunkId (01wb)
  qwBaseOffset (0x1352AE750) dwReserved3 (0)
===========================
AVI index offset: 0x0 (movi=0x100C idx0=0x100C idx1=0x6DD4)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=918638392 (205982) audio size=395464704 (395464704)
VIDEO:  []  720x576  24bpp  25.000 fps  892.0 kbps (108.9 kbyte/s)
Searching for sequence header... OK!
VIDEO:  MPEG2  720x576  (aspect 3)  25.000 fps  9800.0 kbps (1225.0 kbyte/s)
[V] filefmt:3  fourcc:0x10000002  size:720x576  fps:25.00  ftime:=0.0400
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
dec_audio: Allocating 3840 bytes for input buffer.
dec_audio: Allocating 6144 + 65536 = 71680 bytes for output buffer.
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  384.0 kbit/s
A52 flags before a52_frame: 0x2A
A52 flags after a52_frame: 0xA
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 48000->192000 (384.0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [crop w=720 h=432 x=0 y=72]
Crop: 720 x 432, 0 ; 72
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Trying filter chain: crop expand lavc
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale crop expand lavc
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
MP3 audio selected
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[libaf] Adding filter dummy 
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and bps = 2
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and bps = 2
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
LAME version 3.93  (http://www.mp3dev.org/)
Using polyphase lowpass  filter, transition band: 14903 Hz - 15484 Hz

misc:

        scaling: 0.000000
        ch0 (left) scaling: 0.000000
        ch1 (right) scaling: 0.000000
        filter type: 0
        quantization: ISO
        huffman search: normal
        experimental X=0 Y=0 Z=0
        ...

stream format:

        MPEG-1 Layer 3
        2 channel - joint stereo
        padding: auto
        constant bitrate - CBR 
        ...

psychoacoustic:

        tonality estimation limit: 8871.700195 Hz
        using short blocks: channel coupled
        adjust masking: 0.000000 dB
        psymodel: 1
        noise shaping: 1
         ^ amplification: 0
         ^ stopping: 0
        ATH: using
         ^ type: 2
         ^ adjust type: 0
         ^ adapt threshold type: 2
        using temporal masking effect: yes
        interchannel masking ratio: 0.000000
        ...

XXX initial  v_pts=0.000  a_pos=24000 (0.500) 
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
Trying filter chain: crop expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (720x576->1024x576,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x400  
REQ: flags=0x401  req=0x0  
videocodec: libavcodec (720x432 fourcc=58564944 [DIVX])
High quality encoding selected (non real time)!
*** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
Pos:   0.0s      1f ( 0%)   0fps Trem:   0min   0mb  A-V:0.000 [0:0] A/Vms 1/35 *** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
*** [expand] Exporting mp_image_t, 720x432x12bpp YUV planar, 466560 bytes
*** [lavc] Allocating mp_image_t, 720x432x12bpp YUV planar, 466560 bytes
get_path('subfont.ttf') -> '/root/.mplayer/subfont.ttf'
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
Pos:   0.0s      2f ( 0%)   0fps Trem:   0min   0mb  A-V:0.004 [0:0] A/Vms 1/71 *** [crop] Allocating mp_image_t, 720x576x12bpp YUV planar, 622080 bytes
Pos:   0.1s      3f ( 0%)   0fps Trem:   0min   0mb  A-V:0.008 [0:0] A/Vms 1/63 Pos:   0.1s      4f ( 0%)   0fps Trem:   0min   0mb  A-V:0.012 [0:0] A/Vms 1/57 Pos:   0.2s      5f ( 0%)   0fps Trem:   0min   0mb  A-V:0.016 [0:0] A/Vms 1/51 Pos:   0.2s      6f ( 0%)   0fps Trem:   0min   0mb  A-V:0.020 [0:0] A/Vms 1/47 Pos:   0.2s      7f ( 0%)   0fps Trem:   0min   0mb  A-V:0.024 [0:0] A/Vms 1/43

I hope you can find a reason for the segfault. If you need more information
please tell me what to do. Although I still hope to reencode the file
completely by chance I think I can reproduce the error.

Best regards

Stefan




More information about the MPlayer-users mailing list