Opened 14 years ago

Closed 14 years ago

#1734 closed defect (fixed)

MPlayer crashing when using -vfm libmpeg2

Reported by: rectalogic@… Owned by: lu_zero@…
Priority: important Component: vd
Version: HEAD Severity: critical
Keywords: Cc: diego@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

I have a number of sample videos (different containers, MPEG-PS, MPEG-TS, Windows Media dvr-ms) with MPEG2 video that MPlayer now crashes when playing with -vfm libmpeg2.

These all decoded properly with r31179 but now crash with r31652 - I see a number of commits to the internal libmpeg2 between those revisions.

The videos decode OK with -vfm ffmpeg.

Sample uploaded to incoming/libmpeg2-crash/libmpeg2-crash.vob

$ ./mplayer -vfm libmpeg2 /Volumes/Passport/bugs/mplayer-libmpeg2/libmpeg2-crash.vob
MPlayer SVN-r31652-4.2.1 (C) 2000-2010 MPlayer Team

Playing /Volumes/Passport/bugs/mplayer-libmpeg2/libmpeg2-crash.vob.
MPEG-PS file format detected.
VIDEO: MPEG2 704x480 (aspect 2) 29.970 fps 9510.0 kbps (1188.8 kbyte/s)
==========================================================================
Trying to force video codec driver family libmpeg2...
Opening video decoder: [libmpeg2] libmpeg2 MPEG 1/2 Video decoder
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[ac3 @ 0x102040200] frame sync error
AUDIO: 48000 Hz, 2 ch, s16le, 256.0 kbit/16.67% (ratio: 32000->192000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
AO: [coreaudio] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler @ 0x102143000] BICUBIC scaler, from yuv420p to yuyv422 using MMX2
VO: [corevideo] 704x480 => 704x528 Packed YUY2
[ASPECT] Warning: No suitable new res found!

MPlayer interrupted by signal 11 in module: decode_video

  • MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
  • MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code _or_ in your drivers _or_ in your gcc version. If you think it's MPlayer's fault, please read DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and won't help unless you provide this information when reporting a possible bug.

gdb backtrace:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000000000e
MC_put_xy_16_mmxext (dest=0x117200010 "", ref=0xe <Address 0xe out of bounds>, stride=<value temporarily unavailable, due to optimizations>, height=8) at libmpeg2/motion_comp_mmx.c:896
896 MC_put4_16 (height, dest, ref, stride, CPU_MMXEXT);
(gdb) bt
#0 MC_put_xy_16_mmxext (dest=0x117200010 "", ref=0xe <Address 0xe out of bounds>, stride=<value temporarily unavailable, due to optimizations>, height=8) at libmpeg2/motion_comp_mmx.c:896
#1 0x000000010017d4c6 in motion_fr_field_420 (decoder=0x101990440, motion=0x1019904e8, table=0x100cd7d40) at libmpeg2/slice.c:1508
#2 0x00000001001790b4 in mpeg2_slice (decoder=0x101990440, code=<value temporarily unavailable, due to optimizations>, buffer=<value temporarily unavailable, due to optimizations>) at libmpeg2/slice.c:1917
#3 0x000000010017182e in mpeg2_parse (mpeg2dec=0x101990440) at libmpeg2/decode.c:188
#4 0x0000000100170978 in decode (sh=0x101646840, data=0x115a63000, len=<value temporarily unavailable, due to optimizations>, flags=<value temporarily unavailable, due to optimizations>) at libmpcodecs/vd_libmpeg2.c:179
#5 0x000000010006c976 in decode_video (sh_video=0x101646840, start=0x115a63000 "", in_size=13280, drop_frame=0, pts=<value temporarily unavailable, due to optimizations>) at libmpcodecs/dec_video.c:412
#6 0x000000010000d059 in update_video (blit_frame=0x7fff5fbfd568) at mplayer.c:2398
#7 0x00000001000103ed in SDL_main (argc=<value temporarily unavailable, due to optimizations>, argv=0x101612ae0) at mplayer.c:3819
#8 0x00000001005289b0 in -[SDLMain applicationDidFinishLaunching:] ()
#9 0x00007fff80b4984e in _nsnote_callback ()
#10 0x00007fff84bffa90 in CFXNotificationPost ()
#11 0x00007fff84bec008 in _CFXNotificationPostNotification ()
#12 0x00007fff80b407b8 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#13 0x00007fff8599a832 in -[NSApplication _postDidFinishNotification] ()
#14 0x00007fff8599a767 in -[NSApplication _sendFinishLaunchingNotification] ()
#15 0x00007fff85a65719 in -[NSApplication(NSAppleEventHandling) _handleAEOpen:] ()
#16 0x00007fff85a65395 in -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] ()
#17 0x00007fff80b7814a in -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] ()
#18 0x00007fff80b77f7a in _NSAppleEventManagerGenericHandler ()
#19 0x00007fff86af6323 in aeDispatchAppleEvent ()
#20 0x00007fff86af621c in dispatchEventAndSendReply ()
#21 0x00007fff86af6123 in aeProcessAppleEvent ()
#22 0x00007fff84575741 in AEProcessAppleEvent ()
#23 0x00007fff8596a481 in _DPSNextEvent ()
#24 0x00007fff85969bed in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#25 0x00007fff8592f8d3 in -[NSApplication run] ()
#26 0x0000000100529003 in main ()

Attachments (1)

libmpeg2-patch.diff (622 bytes ) - added by rectalogic@… 14 years ago.
add back some code deleted by commit r31354

Download all attachments as: .zip

Change History (7)

by rectalogic@…, 14 years ago

Attachment: libmpeg2-patch.diff added

add back some code deleted by commit r31354

comment:1 by rectalogic@…, 14 years ago

Adding back some of the initialization code deleted in commit r31354 seems to fix the problem.

comment:2 by rectalogic@…, 14 years ago

Cc: diego@… added

comment:3 by diego@…, 14 years ago

Owner: changed from r_togni@… to lu_zero@…
Priority: normalimportant
Severity: normalcritical

comment:4 by lu_zero@…, 14 years ago

I could not reproduce it on linux

comment:5 by diego@…, 14 years ago

op_sys: Mac OS XLinux
rep_platform: PC (x86 with SSE)All
Status: newassigned

I can reproduce it on Mac OS X / PPC and Linux / x86_64. It also happens when I compile against external libmpeg2, so it is not a problem local to MPlayer.
I moved the crasher sample to
http://samples.mplayerhq.hu/MPEG2/libmpeg2-crash.vob

comment:6 by diego@…, 14 years ago

Resolution: fixed
Status: assignedclosed

I added the initialization code back, the crash is fixed, thanks for the report.

Note: See TracTickets for help on using tickets.