Opened 20 years ago

Closed 20 years ago

Last modified 20 years ago

#12 closed defect (wontfix)

GUI mplayer crashes when popping up the menu

Reported by: szo@… Owned by: alex@…
Priority: normal Component: ao
Version: HEAD Severity: major
Keywords: Cc: reimar
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

When playing a video (whose type doesn't matter in my experience) from the
command line (ex: gmplayer video.mpg), and right-clicking on the video window to
pop up the menu, mplayer instantly and completely crashes, even the signal
handler is skipped, no DPMS resetting, console messed up, etc. (note: when
starting the mplayer without a file, and later opening it from the very same
menu, everything is fine!)

details on my setup:
debian sarge/unstable
uname -a
Linux 2.4.25 #1 Thu Mar 4 13:11:12 CET 2004 i686 GNU/Linux
glibc Version: 2.3.2.ds1-13
gcc -v
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.4 (Debian)
ld -v
GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux
as --version
GNU assembler 2.14.90.0.7 20031029 Debian GNU/Linux
gtk+1.2 Version: 1.2.10-16
glib1.2 Version: 1.2.10-9
libpng12 Version: 1.2.5.0-6
nvidia video driver 1.0.5336-6

here's the backtrace:

#0 *GI_pthread_mutex_lock (mutex=0x0) at mutex.c:102
#1 0x404c132e in g_mem_chunk_new (name=0x404d02c0 "Ðdw@<X\a\b", atom_size=84,

area_size=1078788780, type=2) at gmem.c:512

#2 0x4043e4a8 in gtk_type_set_chunk_alloc (type=41237, n_chunks=16)

at gtktypeutils.c:159

#3 0x403ee4b8 in gtk_menu_item_get_type () at gtkmenuitem.c:104
#4 0x403ee648 in gtk_menu_item_new () at gtkmenuitem.c:184
#5 0x403ee672 in gtk_menu_item_new_with_label (

label=0x8395ba3 "About MPlayer ") at gtkmenuitem.c:193

#6 0x080cfc3e in AddMenuItem (Menu=0x404d02c0, label=0x404d02c0 "Ðdw@<X\a\b",

Number=1078788800) at mplayer/gtk/menu.c:46

#7 0x080cfdda in create_PopUpMenu () at mplayer/gtk/menu.c:295
#8 0x080cbea0 in gtkShow (type=1078788800, param=0x0) at mplayer/widgets.c:219
#9 0x080e1325 in wsEvents (display=0x8575fe8, Event=0xbfffd4d0, arg=0x0)

at wm/ws.c:695

#10 0x080c6836 in guiGetEvent (type=1078788800, arg=0xbfffd4d0 "\004")

at interface.c:517

#11 0x0809df03 in vo_x11_check_events (mydisplay=0x8575fe8)

at x11_common.c:1013

#12 0x080a32e9 in check_events () at vo_xv.c:524
#13 0x0807c958 in main (argc=2, argv=0xbffff9a4) at mplayer.c:2271

(gdb) disass $pc-32 $pc+32
Dump of assembler code from 0x40220b02 to 0x40220b42:
0x40220b02 <*GI_pthread_mutex_trylock+178>: add $0x31,%al
0x40220b04 <*GI_pthread_mutex_trylock+180>: shr $0x6e,%cl
0x40220b07 <*GI_pthread_mutex_trylock+183>: (bad)
0x40220b08 <*GI_pthread_mutex_trylock+184>: (bad)
0x40220b09 <*GI_pthread_mutex_trylock+185>: decl 0xb6(%ebp)
0x40220b0f <pthread_mutex_trylock+191>: add %dl,0xffffff89(%ebp)
0x40220b12 <*GI_pthread_mutex_lock+2>: in $0x83,%eax
0x40220b14 <*GI_pthread_mutex_lock+4>: in (%dx),%al
0x40220b15 <*GI_pthread_mutex_lock+5>: sbb %cl,0x7d8bfc7d(%ecx)
0x40220b1b <*GI_pthread_mutex_lock+11>: or %cl,0x7589f45d(%ecx)
0x40220b21 <*GI_pthread_mutex_lock+17>: clc
0x40220b22 <*GI_pthread_mutex_lock+18>: mov 0xc(%edi),%eax
0x40220b25 <*GI_pthread_mutex_lock+21>: call 0x4021e2c0
<i686.get_pc_thunk.bx>
0x40220b2a <*
GI_pthread_mutex_lock+26>: add $0x734a,%ebx
0x40220b30 <*
GI_pthread_mutex_lock+32>: cmp $0x1,%eax
0x40220b33 <*
GI_pthread_mutex_lock+35>: je 0x40220ba7
<*
GI_pthread_mutex_lock+151>
0x40220b35 <*
GI_pthread_mutex_lock+37>: jle 0x40220b90
<*
GI_pthread_mutex_lock+128>
0x40220b37 <*
GI_pthread_mutex_lock+39>: cmp $0x2,%eax
0x40220b3a <*
GI_pthread_mutex_lock+42>: je 0x40220b64
<*
GI_pthread_mutex_lock+84>
0x40220b3c <*
GI_pthread_mutex_lock+44>: cmp $0x3,%eax
0x40220b3f <*
GI_pthread_mutex_lock+47>: je 0x40220b53
<*
GI_pthread_mutex_lock+67>
0x40220b41 <*
GI_pthread_mutex_lock+49>: mov $0x16,%eax
End of assembler dump.

Attachments (2)

log (13.7 KB ) - added by szo@… 20 years ago.
gmplayer -v output for comment2
mplayer-virtualalloc.patch (2.4 KB ) - added by reimar 20 years ago.
modifies VirtualAlloc

Download all attachments as: .zip

Change History (14)

comment:1 by reimar, 20 years ago

(In reply to comment #0)

First of all, thanks for your efforts.

When playing a video (whose type doesn't matter in my experience) from the
command line (ex: gmplayer video.mpg), and right-clicking on the video window to
pop up the menu, mplayer instantly and completely crashes, even the signal
handler is skipped, no DPMS resetting, console messed up, etc. (note: when
starting the mplayer without a file, and later opening it from the very same
menu, everything is fine!)

Can't reproduce. Are you sure this is a bug in MPlayer, not e.g. in GTK? The
segfault happens quite deep in the GTK code. Which reminds me that you didn't
even explicitly say if it is as SIGSEGV or something else... you shouldn't have
truncated the gdb output!

Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc i486-linux

Would be more interesting how you configured MPlayer (e.g. what modules were
compiled in)

here's the backtrace:

What about the mplayer -v output?

#5 0x403ee672 in gtk_menu_item_new_with_label (

label=0x8395ba3 "About MPlayer ") at gtkmenuitem.c:193

#6 0x080cfc3e in AddMenuItem (Menu=0x404d02c0, label=0x404d02c0 "Ðdw@<X\a\b",

Number=1078788800) at mplayer/gtk/menu.c:46

Too me it looks like this backtrace is quite useless, as the stack it was taken
from was destroyed... from how the code looks like, there is no way these two
label parameters can have different values...

comment:2 by szo@…, 20 years ago

bug_file_loc: http://www.raspberryheaven.net/~deathscythe/jonglerstylo.wmv

Ok, lets start again :)

It's a sigsegv. I'm not positive that it's mplayer bug, but I think it's
possible, some subtle memory corruption that triggers only in this case. I have
found an other occurance, described below.

The configuration is this, apart from debug=3 and gui:

byte order: Little Endian
Optimizing for: pentium4 mmx mmx2 sse sse2 mtrr

Languages:

Messages/GUI: en
Manual pages: en (no localization selected, use --language=all)

Enabled optional drivers:

Input: ftp network edl tv matroska(internal) mpdvdkit2 vcd dvb
Codecs: qtx libavcodec real dshow/dmo win32 faad2(internal) libmpeg2 liba52

mp3lib libvorbis libmad

Audio output: alsa esd arts oss nas mpegpes(dvb)
Video output: xvidix cvidix vesa jpeg png mpegpes(dvb) fbdev opengl dga xv

x11 xover tga

Disabled optional drivers:

Input: tv-v4l2 tv-v4l tv-bsdbt848 live.com cdda dvdread smb
Codecs: opendivx xvid libdv xanim libtheora liblzo gif
Audio output: sgi sun jack dxr2 win32 sdl macosx
Video output: winvidix bl zr zr2 dxr3 dxr2 directx sdl gif89a svga caca aa

ggi xmga mga xvmc directfb tdfx_vid tdfxfb 3dfx quartz

when playing this video:
http://www.raspberryheaven.net/~deathscythe/jonglerstylo.wmv

with gmplayer and when the codec "wmv8ds32.ax" is available, it plays fine
(apart ofcourse the crash if I rightclick, as described in the original report),
but, it the codec is not there:

gmplayer -v ~/jonglerstylo.wmv >log 2>&1
the file log attached.

In the debugger, I have a similar stacktrace as before:

#0 *GI_pthread_mutex_lock (mutex=0x0) at mutex.c:102
#1 0x4044232e in g_mem_chunk_new (name=0x404512c0 "аф[@є\031\a\b",

atom_size=92, area_size=1078268588, type=2) at gmem.c:512

#2 0x4040c94d in gdk_event_new () at gdkevents.c:664
#3 0x4040dd18 in gdk_events_queue () at gdkevents.c:2057
#4 0x4040df74 in gdk_event_dispatch (source_data=0x0,

current_time=0xbfffd440, user_data=0x0) at gdkevents.c:2146

#5 0x4044103d in g_main_dispatch (dispatch_time=0xbfffd440) at gmain.c:656
#6 0x404414f4 in g_main_iterate (block=0, dispatch=1) at gmain.c:877
#7 0x404416bd in g_main_iteration (block=0) at gmain.c:907
#8 0x4034d597 in gtk_main_iteration_do (blocking=1078268608) at gtkmain.c:616
#9 0x080c1647 in gtkEventHandling () at mplayer/widgets.c:111
#10 0x08078ab3 in main (argc=2, argv=0xbffff8b4) at mplayer.c:2184

please advise, what should I do next?

by szo@…, 20 years ago

Attachment: log added

gmplayer -v output for comment2

comment:3 by szo@…, 20 years ago

comment:4 by szo@…, 20 years ago

attachments.description: gmplayer -v output for comment3gmplayer -v output for comment2

comment:5 by reimar, 20 years ago

I have no real idea what could be causing this, but you could try the following:
-vc wmvdmo
-vc ffwmv2
a different vo (e.g. gl2 or x11)

adding
type &= ~vo_wm_NETWM;
to line 1392 (end of vo_x11_get_fs_type function) in libvo/x11_common.c.

btw.: I still can't reproduce (using that file), but I don't have the wmvdmo
codec installed at the moment...

comment:6 by szo@…, 20 years ago

Forcing the codec makes the startup crash go away (to either wmvdmo or ffwmv2),
the video output doesn't change anything. The added line doesn't have any effect.

by reimar, 20 years ago

Attachment: mplayer-virtualalloc.patch added

modifies VirtualAlloc

comment:7 by reimar, 20 years ago

Please try if this patch fixes it. It is from
http://mplayerhq.hu/pipermail/mplayer-dev-eng/2004-July/027062.html

comment:8 by reimar, 20 years ago

Cc: Reimar.Doeffinger@… added

comment:9 by szo@…, 20 years ago

It didn't have any noticable effect on my problem. :(

comment:10 by alexander_morgenstern@…, 20 years ago

(In reply to comment #7)

It didn't have any noticable effect on my problem. :(

Maybe I have something:

I have the same problems with gmplayer as you. I am using KDE, so i use the
arts-plugin of mplayer for sound. Today i found out accidently, that
all those problems vanish if i use the oss-plugin instead. No more
GUI-crashes when right-clicking, nothing -- everything is just working
fine. Could you try if this also works for you? Looks like there is a
bug in the arts-plugin.

comment:11 by szo@…, 20 years ago

Component: coreao

Yes, this was it. I modify the component of this bug to 'ao', and stick to oss
for the time being, thanks for all the help! (Actually, I tried this solution
earlier, but didn't work because of an other bug(feature?), see bug #98)

comment:12 by reimar, 20 years ago

Resolution: wontfix
Status: newclosed

I finally found an explanation here (isn't it great that everybody informs
upstream about problems??)
http://frontrangebsd.org/pipermail/kde-freebsd/2004-April/007932.html
They seem to think the only solution is using gtk2. Well, I don't know how that
justifies that using glib-1.2 and glib2 together results in a crash, but well...
This might happen sometime but not soon. Consider arts + gui broken for now.

Note: See TracTickets for help on using tickets.