Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recent mpv crashes (segmentation fault) when using --vo=xv and --wid #2386

Closed
kuh3h3 opened this issue Oct 7, 2015 · 5 comments
Closed

recent mpv crashes (segmentation fault) when using --vo=xv and --wid #2386

kuh3h3 opened this issue Oct 7, 2015 · 5 comments

Comments

@kuh3h3
Copy link

kuh3h3 commented Oct 7, 2015

i reported this bug already to smplayer bug list.
http://sourceforge.net/p/smplayer/bugs/704/

maybe xv and wid option is culprit.

some months ago there is same error about mpv vo=xv and wid option.
http://forum.smplayer.info/viewtopic.php?f=2&t=7894

so reported to mpv bug list.
#1629

fixed in mpv commit
a2e0cd7

only two line added(vo_xv: don't attempt to clear window before mapped)

  •    if (!x11->vo_gc)
    
  •        return;
    

after some time,

2015.7.27 some guy removed all vo_x11 releated code.
"vo_x11: remove this video output"
d11184a

2015 9.30 but because of unexpected resistence
Revert "vo_x11: remove this video output".
ebb43f5

i suspect something wrong in this recent changes(video/out/vo_xv.c)

static void xv_draw_colorkey(struct vo *vo, const struct mp_rect *rc)
{
struct xvctx *ctx = vo->priv;
struct vo_x11_state *x11 = vo->x11;
if (ctx->xv_ck_info.method == CK_METHOD_MANUALFILL ||
ctx->xv_ck_info.method == CK_METHOD_BACKGROUND)
{
if (!ctx->vo_gc)
return;
//less tearing than XClearWindow()
XSetForeground(x11->display, ctx->vo_gc, ctx->xv_colorkey);
XFillRectangle(x11->display, x11->window, ctx->vo_gc, rc->x0, rc->y0,
rc->x1 - rc->x0, rc->y1 - rc->y0);
}
}

working version code(video/out/vo_xv.c)

static void xv_draw_colorkey(struct vo *vo, const struct mp_rect *rc)
{
struct xvctx *ctx = vo->priv;
struct vo_x11_state *x11 = vo->x11;
if (ctx->xv_ck_info.method == CK_METHOD_MANUALFILL ||
ctx->xv_ck_info.method == CK_METHOD_BACKGROUND)
{
if (!x11->vo_gc)
return;
//less tearing than XClearWindow()
XSetForeground(x11->display, x11->vo_gc, ctx->xv_colorkey);
XFillRectangle(x11->display, x11->window, x11->vo_gc, rc->x0, rc->y0,
rc->x1 - rc->x0, rc->y1 - rc->y0);
}
}

@ghost
Copy link

ghost commented Oct 7, 2015

Can't reproduce.

@kuh3h3
Copy link
Author

kuh3h3 commented Oct 7, 2015

[reandr@kuh3h3 ~]$ gdb /usr/local/bin/mpv
GNU gdb (GDB) Fedora 7.9.1-19.fc22
Reading symbols from /usr/local/bin/mpv...done.
(gdb) r --vo=xv --wid=35651963 /home/reandr/ie7k.webm
Starting program: /usr/local/bin/mpv --vo=xv --wid=35651963 /home/reandr/ie7k.webm
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.21-8.fc22.i686
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Missing separate debuginfo for /lib/libwbclient.so.0
Try: yum --enablerepo='debug' install /usr/lib/debug/.build-id/56/0711a62f3ee9e0c3c669651aa98bc81be07f6e.debug
Auto-loading profile 'ao.pulse'
Playing: /home/reandr/ie7k.webm
(+) Video --vid=1 () (vp9)
(+) Audio --aid=1 --alang=eng (
) (vorbis)
[vo/xv/x11] X11 error: BadDrawable (invalid Pixmap or Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv/x11] X11 error: BadWindow (invalid Window parameter)
[vo/xv] Could not grab port 505.
[New Thread 0xb23fbb40 (LWP 26955)]
[New Thread 0xb2bfcb40 (LWP 26954)]
[New Thread 0xb37feb40 (LWP 26953)]
[New Thread 0xb3fffb40 (LWP 26951)]
[New Thread 0xb49ffb40 (LWP 26950)]
[New Thread 0xb53a5b40 (LWP 26949)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb2bfcb40 (LWP 26954)]
0x44b7f4ee in XFillRectangle () from /lib/libX11.so.6
Missing separate debuginfos, use: dnf debuginfo-install SDL-1.2.15-17.fc22.i686 alsa-lib-1.0.29-1.fc22.i686 bzip2-libs-1.0.6-14.fc22.i686 compat-lua-libs-5.1.5-2.fc22.i686 cyrus-sasl-lib-2.1.26-23.fc22.i686 dbus-libs-1.8.20-1.fc22.i686 elfutils-libelf-0.163-3.fc22.i686 elfutils-libs-0.163-3.fc22.i686 expat-2.1.0-10.fc22.i686 fftw-libs-double-3.3.4-5.fc22.i686 flac-libs-1.3.1-5.fc22.i686 fontconfig-2.11.94-4.fc22.i686 freeglut-2.8.1-5.fc22.i686 glib2-2.44.1-2.fc22.i686 gmp-6.0.0-9.fc22.i686 gnutls-3.3.18-1.fc22.i686 graphite2-1.2.4-3.fc22.i686 gsm-1.0.13-12.fc22.i686 harfbuzz-0.9.40-1.fc22.i686 jack-audio-connection-kit-1.9.10-2.fc22.i686 json-c-0.12-5.fc22.i686 keyutils-libs-1.5.9-4.fc22.i686 krb5-libs-1.13.2-7.fc22.i686 lame-libs-3.99.5-5.fc22.i686 lcms2-2.7-1.fc22.i686 libICE-1.0.9-2.fc22.i686 libSM-1.2.2-2.fc22.i686 libX11-1.6.3-1.fc22.i686 libXScrnSaver-1.2.2-8.fc22.i686 libXau-1.0.8-4.fc22.i686 libXext-1.3.3-2.fc22.i686 libXfixes-5.0.1-4.fc22.i686 libXi-1.7.4-2.fc22.i686 libXinerama-1.1.3-4.fc22.i686 libXrandr-1.4.2-2.fc22.i686 libXrender-0.9.9-1.fc22.i686 libXtst-1.2.2-4.fc22.i686 libXv-1.0.10-2.fc22.i686 libXxf86vm-1.1.4-1.fc22.i686 libasyncns-0.8-8.fc22.i686 libattr-2.4.47-10.fc22.i686 libbluray-0.7.0-1.fc22.i686 libcaca-0.99-0.23.beta18.fc22.i686 libcap-2.24-7.fc22.i686 libcdio-0.93-2.fc22.i686 libcdio-paranoia-10.2+0.93+1-1.fc22.i686 libcom_err-1.42.12-4.fc22.i686 libcrystalhd-3.10.0-8.fc22.i686 libdrm-2.4.61-3.fc22.i686 libdvdnav-5.0.3-1.fc22.i686 libdvdread-5.0.2-1.fc22.i686 libenca0-1.15-37.1.i686 libffi-3.1-7.fc22.i686 libgcc-5.1.1-4.fc22.i686 libgcrypt-1.6.3-4.fc22.i686 libgpg-error-1.17-2.fc22.i686 libguess-1.2-1.fc22.i686 libjpeg-turbo-1.4.0-1.fc22.i686 libldb-1.1.21-1.fc22.i686 libogg-1.3.2-2.fc22.i686 libsamplerate-0.1.8-7.fc22.i686 libselinux-2.3-10.fc22.i686 libsmbclient-4.2.3-0.fc22.i686 libsndfile-1.0.25-14.fc22.i686 libstdc++-5.1.1-4.fc22.i686 libtalloc-2.1.3-1.fc22.i686 libtasn1-4.5-1.fc22.i686 libtdb-1.3.7-1.fc22.i686 libtevent-0.9.25-1.fc22.i686 libuuid-2.26.2-3.fc22.i686 libv4l-1.6.2-1.fc22.i686 libva-1.5.1-1.fc22.i686 libvdpau-1.1.1-1.fc22.i686 libvorbis-1.3.4-3.fc22.i686 libwayland-client-1.7.0-1.fc22.i686 libwayland-cursor-1.7.0-1.fc22.i686 libwayland-server-1.7.0-1.fc22.i686 libwbclient-4.2.3-0.fc22.i686 libxcb-1.11-8.fc22.i686 libxkbcommon-0.5.0-1.fc22.i686 libxml2-2.9.2-4.fc22.i686 mesa-libEGL-10.6.3-3.20150729.fc22.i686 mesa-libGLU-9.0.0-7.fc22.i686 mesa-libgbm-10.6.3-3.20150729.fc22.i686 mesa-libwayland-egl-10.6.3-3.20150729.fc22.i686 ncurses-libs-5.9-18.20150214.fc22.i686 nettle-2.7.1-5.fc22.i686 nspr-4.10.8-1.fc22.i686 nss-3.20.0-1.0.fc22.i686 nss-softokn-freebl-3.20.0-1.0.fc22.i686 nss-util-3.20.0-1.0.fc22.i686 openldap-2.4.40-12.fc22.i686 openssl-libs-1.0.1k-12.fc22.i686 opus-1.1.1-0.2.beta.fc22.i686 p11-kit-0.23.1-2.fc22.i686 pcre-8.37-4.fc22.i686 pulseaudio-libs-6.0-8.fc22.i686 rubberband-1.8.1-5.fc22.i686 samba-client-libs-4.2.3-0.fc22.i686 slang-2.3.0-2.fc22.i686 systemd-compat-libs-219-24.fc22.i686 systemd-libs-219-24.fc22.i686 tcp_wrappers-libs-7.6-80.fc22.i686 trousers-0.3.13-3.fc22.i686 x264-libs-0.142-12.20141221git6a301b6.fc22.i686 xz-libs-5.2.0-2.fc22.i686 zlib-1.2.8-7.fc22.i686
(gdb) bt
#0 0x44b7f4ee in XFillRectangle () from /lib/libX11.so.6
#1 0x081a1fa0 in fill_rect (vo=vo@entry=0x98f8ac8, gc=gc@entry=0x0, x0=x0@entry=0, y0=0, x1=,
y1=) at ../video/out/vo_xv.c:415
#2 0x081a2cc3 in vo_x11_clear_background (rc=0x98f8df0, vo=0x98f8ac8) at ../video/out/vo_xv.c:429
#3 resize (vo=vo@entry=0x98f8ac8) at ../video/out/vo_xv.c:446
#4 0x081a2eaf in control (vo=0x98f8ac8, request=2, data=0x0) at ../video/out/vo_xv.c:878
#5 0x08197163 in vo_thread (ptr=0x98f8ac8) at ../video/out/vo.c:832
#6 0x44906370 in start_thread () from /lib/libpthread.so.0
#7 0x447da2be in clone () from /lib/libc.so.6
(gdb) bt full
#0 0x44b7f4ee in XFillRectangle () from /lib/libX11.so.6
No symbol table info available.
#1 0x081a1fa0 in fill_rect (vo=vo@entry=0x98f8ac8, gc=gc@entry=0x0, x0=x0@entry=0, y0=0, x1=,
y1=) at ../video/out/vo_xv.c:415
x11 = 0xb2e011b0
#2 0x081a2cc3 in vo_x11_clear_background (rc=0x98f8df0, vo=0x98f8ac8) at ../video/out/vo_xv.c:429
ctx =
gc = 0x0
w = 1082736640
x11 =
#3 resize (vo=vo@entry=0x98f8ac8) at ../video/out/vo_xv.c:446
ctx = 0x98f8d68
unused = {w = 0, h = 0, mt = 0, mb = 0, ml = 0, mr = 0, display_par = 0}
#4 0x081a2eaf in control (vo=0x98f8ac8, request=2, data=0x0) at ../video/out/vo_xv.c:878
ctx =
events = 14
r = 1
#5 0x08197163 in vo_thread (ptr=0x98f8ac8) at ../video/out/vo.c:832
wait_until =
send_reset =
now =
vo = 0x98f8ac8
in = 0x98f8b50
r = 0
#6 0x44906370 in start_thread () from /lib/libpthread.so.0
No symbol table info available.
#7 0x447da2be in clone () from /lib/libc.so.6
No symbol table info available.
(gdb) i r
eax 0x0 0
ecx 0xeff5 61429
edx 0x1000 4096
ebx 0x44ca2000 1154097152
esp 0xb2bfc000 0xb2bfc000
ebp 0xb2e018d0 0xb2e018d0
esi 0x0 0
edi 0x2c00002 46137346
eip 0x44b7f4ee 0x44b7f4ee <XFillRectangle+46>
eflags 0x210246 [ PF ZF IF RF ID ]
cs 0x73 115
ss 0x7b 123
ds 0x7b 123
es 0x7b 123
fs 0x0 0
gs 0x33 51
(gdb) q

@kuh3h3
Copy link
Author

kuh3h3 commented Oct 7, 2015

[reandr@kuh3h3 ~]$ mpv --version
mpv git-0a41c6f (C) 2000-2015 mpv/MPlayer/mplayer2 projects
built on Wed Oct 7 18:35:10 KST 2015
ffmpeg library versions:
libavutil 55.2.100
libavcodec 57.4.100
libavformat 57.3.100
libswscale 4.0.100
libavfilter 6.10.100
libswresample 2.0.100
ffmpeg version: N-75804-ga852db7

@ghost ghost closed this as completed in aa796c2 Oct 7, 2015
@ghost
Copy link

ghost commented Oct 7, 2015

Stop using this VO.

@kuh3h3
Copy link
Author

kuh3h3 commented Oct 7, 2015

thanks for quick fix.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant