[MPlayer-cygwin] Problems compiling mencoder with MinGW + crashes

Stefan Gürtler Stefan.guertler at stud.tum.de
Mon Jun 21 23:05:02 CEST 2004



> > > Ooops. RahXephon.avi's height is not modolo 16 (352 x 236). Maybe that
> > keeps
> > > lavc from encoding?
> >
> > When encoding with mencoder from 20040620 compiled under linux
> > (without --enable-static), i can throw any command line to mencoder and
it
> > will encode RahXephon.avi, no matter wether resolution is modolo 16 or
> not.
> > So looks like libavcodec is broken when compiled under MinGW.
> >
>
> The problem could be sse. Arpi told me that he encounter many crashes
> when encoding on windows. I don't have a sse capable system by hand
> right now, but I disabled sse on Friday. Could you please compile current
> cvs with --enable-runtime-cpudetection --enable-debug=3 and make a gdb
> backtrace as described in the DOCS?
>
> Sascha

Thanks for the hint wih the SSE issues. Actually i have seen your changes
while browsing the CVS web interface, but I did not try compiling without
SSE yesterday, though I had the idea, too. Today I have done it. The
frequent crashes have stopped as far as i could see.

But as you have ask me for the backtrace, I have done that, too. I succeeded
in the second try. Both tryes are given below:


Stefan at CF ~/MPlayer-20040621
$
./configure --enable-runtime-cpudetection --enable-debug=3 --prefix=/opt/mpl
ayer_debug

Stefan at CF ~
$ export PATH=/opt/mplayer_debug/bin:$PATH

Stefan at CF ~
$ mencoder.exe MPlayer-20040620/RahXephon.avi -oac copy -ovc lavc -lavcopts
vco
dec=mpeg4:vpass=1:vqscale=3 -o test.avi
CRASH!

First try:
Stefan at CF ~
gdb mencoder
GNU gdb 5.2.1
Copyright 2002 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 "i686-pc-mingw32"...
(gdb) run -v -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vqscale=3 -o
test.avi MPlayer-20040620/RahXephon.avi
Starting program:
C:\Programme\Stefan\msys\1.0\opt\mplayer_debug\bin/mencoder.exe -v -oac
copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vqscale=3 -o test.avi
MPlayer-20040620/RahXephon.avi

Program received signal SIGSEGV, Segmentation fault.
0x0058463e in encode_thread (c=0x1623708, arg=0x1a7b120) at mpegvideo.c:4082
4082        for(i=0; i<2; i++){
(gdb)
 --------------------------------------------------------------------
output of cmd.exe window running mencoder:
Using GNU internationalization
Original domain: messages
Original dirname: c:/programme/stefan/mingw/share/locale
Current domain: mplayer
Current dirname: /opt/mplayer_debug/share/locale

MEncoder dev-CVS-040621-20:04-3.3.3 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2971 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer
with --disable-runtime-cpudetection.
Reading C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/codecs.conf: Can't
open
 'C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/codecs.conf': No such
file or
 directory
Reading /opt/mplayer_debug/etc/mplayer/codecs.conf: Can't open
'/opt/mplayer_deb
ug/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
C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/mencoder: N
o such file or directory
get_path('font/font.desc') ->
'C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/
font/font.desc'
font: can't open file:
C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/font/fon
t.desc
font: can't open file: /opt/mplayer_debug/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
WINSOCK2 init: 0
[file] File size is 629852 bytes
STREAM: [file] MPlayer-20040620/RahXephon.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x99C5C
AVI file format detected.
list_end=0x144
======= AVI Header =======
us/frame: 33333  (fps=30,000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 198   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  352 x 236
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 300000/10000 = 30,000
Start: 0   Len: 198
Suggested BufferSize: 12413
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 352
  biHeight 236
  biPlanes 1
  biBitCount 24
  biCompression 863398244='div3'
  biSizeImage 249216
===========================
Regenerating keyframe table for DIVX 3 video
list_end=0x144
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 8000/1 = 8000,000
Start: 0   Len: 56640
Suggested BufferSize: 192
Quality 0
Sample size: 1
==========================
found 'wf', 28 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 8000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=192
mp3.nFramesPerBlock=1
mp3.nCodecDelay=43947
===========================
list_end=0x17A
hdr=Software  size=34
Software  : MEncoder CVS-030130-03:00-2.95.4
list_end=0x97D84
Found movie at 0x80C - 0x97D84
Reading INDEX block, 493 chunks for 198 frames (fpos=00097D8C)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0xCC)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=559214 (198) audio size=56640 (56640)
VIDEO:  [div3]  352x236  24bpp  30,000 fps  677,8 kbps (82,7 kbyte/s)
[V] filefmt:3  fourcc:0x33766964  size:352x236  fps:30,00  ftime:=0,0333
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=8000
sample=1)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp h
eader.
[ffmpeg] aspect_ratio: 0,000000
VDec: vo config request - 352 x 236 (preferred csp: Planar YV12)
Trying filter chain: expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (352x236->352x236,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0
videocodec: libavcodec (352x236 fourcc=58564944 [DIVX])
Using constant qscale = 3,000000 (VBR)
*** [lavc] Allocating mp_image_t, 352x240x12bpp YUV planar, 126720 bytes
*** [expand] Direct Rendering mp_image_t, 352x240x12bpp YUV planar, 126720
bytes

---------------------------------------------------------------------
Now back to gdb:
(gdb) bt
#0  0x0058463e in encode_thread (c=0x1623708, arg=0x1a7b120)
    at mpegvideo.c:4082
#1  0x00000000 in ?? ()
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x58461e to 0x58465e:
0x58461e <write_slice_end+142>: jmp    0xc9899bb3
0x584623 <encode_thread+3>:     mov    %esp,%ebp
0x584625 <encode_thread+5>:     push   %edi
0x584626 <encode_thread+6>:     mov    $0x7b9c,%eax
0x58462b <encode_thread+11>:    lea    0xffff85c8(%ebp),%edi
0x584631 <encode_thread+17>:    push   %esi
0x584632 <encode_thread+18>:    lea    0xffff85f8(%ebp),%esi
0x584638 <encode_thread+24>:    push   %ebx
0x584639 <encode_thread+25>:    mov    $0x1,%ebx
0x58463e <encode_thread+30>:    mov    %ecx,0xffff84a8(%ebp)
0x584644 <encode_thread+36>:    lea    0xffff8628(%ebp),%ecx
0x58464a <encode_thread+42>:    call   0x6b9fb0 <_alloca>
0x58464f <encode_thread+47>:    movl   $0x20,0x4(%ecx)
0x584656 <encode_thread+54>:    mov    0xffff84a8(%ebp),%edx
0x58465c <encode_thread+60>:    lea    0xffffb538(%ebp),%eax
End of assembler dump.
(gdb) info all-registers
-> Message Box
MINGW32:~:rxvt.exe - Fehler in der Anwendung
Die Anweisung in "0x7106b5da" verweist auf Speicher in "0x00000000". Der
Vorgang "read" konnte nicht auf dem Speicher durchgeführt werden.
Klick auf "OK", um das Programm zu beenden.
Klick auf "Abbrechen", um das Programm zu debuggen.

Window is gone! :(


Second try:
Stefan at CF /opt/mplayer_debug/bin
$ gdb ./mencoder.exe
GNU gdb 5.2.1
Copyright 2002 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 "i686-pc-mingw32"...
(gdb) run -v -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vqscale=3 -o
test.avi RahXephon.avi
Starting program:
C:\Programme\Stefan\msys\1.0\opt\mplayer_debug\bin/./mencoder.exe -v -oac
copy -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vqscale=3 -o test.avi
RahXephon.avi

Program received signal SIGSEGV, Segmentation fault.
0x0058463e in encode_thread (c=0x1623700, arg=0x1a7b120) at mpegvideo.c:4082
4082        for(i=0; i<2; i++){

(gdb)
--------------------------------------------------------------------
output of cmd.exe window:
Using GNU internationalization
Original domain: messages
Original dirname: c:/programme/stefan/mingw/share/locale
Current domain: mplayer
Current dirname: /opt/mplayer_debug/share/locale

MEncoder dev-CVS-040621-20:04-3.3.3 (C) 2000-2004 MPlayer Team

CPU: Intel Pentium 4/Xeon/Celeron Foster 2976 MHz (Family: 8, Stepping: 9)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer
with --disable-runtime-cpudetection.
Reading C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/codecs.conf: Can't
open
 'C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/codecs.conf': No such
file or
 directory
Reading /opt/mplayer_debug/etc/mplayer/codecs.conf: Can't open
'/opt/mplayer_deb
ug/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
C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/mencoder: N
o such file or directory
get_path('font/font.desc') ->
'C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/
font/font.desc'
font: can't open file:
C:/Programme/Stefan/msys/1.0/home/Stefan/mplayer/font/fon
t.desc
font: can't open file: /opt/mplayer_debug/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
WINSOCK2 init: 0
[file] File size is 629852 bytes
STREAM: [file] RahXephon.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
success: format: 0  data: 0x0 - 0x99C5C
AVI file format detected.
list_end=0x144
======= AVI Header =======
us/frame: 33333  (fps=30,000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 198   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  352 x 236
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 300000/10000 = 30,000
Start: 0   Len: 198
Suggested BufferSize: 12413
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 352
  biHeight 236
  biPlanes 1
  biBitCount 24
  biCompression 863398244='div3'
  biSizeImage 249216
===========================
Regenerating keyframe table for DIVX 3 video
list_end=0x144
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 8000/1 = 8000,000
Start: 0   Len: 56640
Suggested BufferSize: 192
Quality 0
Sample size: 1
==========================
found 'wf', 28 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 8000
Block align: 1
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=192
mp3.nFramesPerBlock=1
mp3.nCodecDelay=43947
===========================
list_end=0x17A
hdr=Software  size=34
Software  : MEncoder CVS-030130-03:00-2.95.4
list_end=0x97D84
Found movie at 0x80C - 0x97D84
Reading INDEX block, 493 chunks for 198 frames (fpos=00097D8C)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0xCC)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=559214 (198) audio size=56640 (56640)
VIDEO:  [div3]  352x236  24bpp  30,000 fps  677,8 kbps (82,7 kbyte/s)
[V] filefmt:3  fourcc:0x33766964  size:352x236  fps:30,00  ftime:=0,0333
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=8000
sample=1)
Writing AVI header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp h
eader.
[ffmpeg] aspect_ratio: 0,000000
VDec: vo config request - 352 x 236 (preferred csp: Planar YV12)
Trying filter chain: expand lavc
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (352x236->352x236,flags=0,'MPlayer',0x32315659)
REQ: flags=0x401  req=0x0
videocodec: libavcodec (352x236 fourcc=58564944 [DIVX])
Using constant qscale = 3,000000 (VBR)
*** [lavc] Allocating mp_image_t, 352x240x12bpp YUV planar, 126720 bytes
*** [expand] Direct Rendering mp_image_t, 352x240x12bpp YUV planar, 126720
bytes

---------------------------------------------------------------------
(gdb) bt
#0  0x0058463e in encode_thread (c=0x1623700, arg=0x1a7b120)
    at mpegvideo.c:4082
#1  0x00000000 in ?? ()
(gdb) info all-registers
eax            0x7b9c   31644
ecx            0x0      0
edx            0x1a7b1e4        27767268
ebx            0x1      1
esp            0x22fb7c 0x22fb7c
ebp            0x22fb88 0x22fb88
esi            0x228180 2261376
edi            0x228150 2261328
eip            0x58463e 0x58463e
eflags         0x10246  66118
cs             0x1b     27
ss             0x23     35
ds             0x23     35
es             0x23     35
fs             0x3b     59
gs             0x0      0
st0            -nan(0x8a8a8a8a8a8a8a8a) (raw 0xffff8a8a8a8a8a8a8a8a)
st1            -nan(0x8989898989898989) (raw 0xffff8989898989898989)
st2            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st3            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st4            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st5            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
st6            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
st7            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
fctrl          0xffff037f       -64641
fstat          0xffff4020       -49120
ftag           0xffffffff       -1
fiseg          0x1b     27
fioff          0x42da38 4381240
foseg          0xffff0023       -65501
fooff          0x79a028 7970856
fop            0x402    1026
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x58461e to 0x58465e:
0x58461e <write_slice_end+142>: jmp    0xc9899bb3
0x584623 <encode_thread+3>:     mov    %esp,%ebp
0x584625 <encode_thread+5>:     push   %edi
0x584626 <encode_thread+6>:     mov    $0x7b9c,%eax
0x58462b <encode_thread+11>:    lea    0xffff85c8(%ebp),%edi
0x584631 <encode_thread+17>:    push   %esi
0x584632 <encode_thread+18>:    lea    0xffff85f8(%ebp),%esi
0x584638 <encode_thread+24>:    push   %ebx
0x584639 <encode_thread+25>:    mov    $0x1,%ebx
0x58463e <encode_thread+30>:    mov    %ecx,0xffff84a8(%ebp)
0x584644 <encode_thread+36>:    lea    0xffff8628(%ebp),%ecx
0x58464a <encode_thread+42>:    call   0x6b9fb0 <_alloca>
0x58464f <encode_thread+47>:    movl   $0x20,0x4(%ecx)
0x584656 <encode_thread+54>:    mov    0xffff84a8(%ebp),%edx
0x58465c <encode_thread+60>:    lea    0xffffb538(%ebp),%eax
End of assembler dump.
(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x58461e to 0x58465e:
0x58461e <write_slice_end+142>: jmp    0xc9899bb3
0x584623 <encode_thread+3>:     mov    %esp,%ebp
0x584625 <encode_thread+5>:     push   %edi
0x584626 <encode_thread+6>:     mov    $0x7b9c,%eax
0x58462b <encode_thread+11>:    lea    0xffff85c8(%ebp),%edi
0x584631 <encode_thread+17>:    push   %esi
0x584632 <encode_thread+18>:    lea    0xffff85f8(%ebp),%esi
0x584638 <encode_thread+24>:    push   %ebx
0x584639 <encode_thread+25>:    mov    $0x1,%ebx
0x58463e <encode_thread+30>:    mov    %ecx,0xffff84a8(%ebp)
0x584644 <encode_thread+36>:    lea    0xffff8628(%ebp),%ecx
0x58464a <encode_thread+42>:    call   0x6b9fb0 <_alloca>
0x58464f <encode_thread+47>:    movl   $0x20,0x4(%ecx)
0x584656 <encode_thread+54>:    mov    0xffff84a8(%ebp),%edx
0x58465c <encode_thread+60>:    lea    0xffffb538(%ebp),%eax
End of assembler dump.
(gdb) info all-registers
eax            0x7b9c   31644
ecx            0x0      0
edx            0x1a7b1e4        27767268
ebx            0x1      1
esp            0x22fb7c 0x22fb7c
ebp            0x22fb88 0x22fb88
esi            0x228180 2261376
edi            0x228150 2261328
eip            0x58463e 0x58463e
eflags         0x10246  66118
cs             0x1b     27
ss             0x23     35
ds             0x23     35
es             0x23     35
fs             0x3b     59
gs             0x0      0
st0            -nan(0x8a8a8a8a8a8a8a8a) (raw 0xffff8a8a8a8a8a8a8a8a)
st1            -nan(0x8989898989898989) (raw 0xffff8989898989898989)
st2            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st3            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st4            -nan(0x8888888888888888) (raw 0xffff8888888888888888)
st5            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
st6            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
st7            -nan(0x8585858585858585) (raw 0xffff8585858585858585)
fctrl          0xffff037f       -64641
fstat          0xffff4020       -49120
ftag           0xffffffff       -1
fiseg          0x1b     27
fioff          0x42da38 4381240
foseg          0xffff0023       -65501
fooff          0x79a028 7970856
fop            0x402    1026
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Stefan at CF /opt/mplayer_debug/bin
$


I hope that I did not make any mistakes (my first contact with gdb) and that
you can use the information.

Stefan








More information about the MPlayer-cygwin mailing list