Opened 19 years ago

Last modified 14 years ago

#338 closed defect (wontfix)

[PATCH] MPlayer crashes when resuming playback after pause (using -stop-xscreensaver)

Reported by: odd@… Owned by: reimar
Priority: normal Component: core
Version: 1.0pre7 Severity: normal
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

I use -stop-xscreensaver.

If the detected xscreensaver PID is gone, MPlayer can crash:

X11 error: BadWindow (invalid Window parameter)

MPlayer interrupted by signal 6 in module: stop_xscreensaver
(...)
Xlib: unexpected async reply (sequence 0x641)!

My ~/.mplayer/config:

stop-xscreensaver = "yes"

I use wrapper script for mplayer that does:

#!/bin/sh
xset -dpms
xset s off
mplayer "$@"
xset s on
xset +dpms

Change History (7)

comment:1 by odd@…, 19 years ago

Summary: MPlayer crashes when xscreensaver process is gone (using -stop-xscreensaver)MPlayer crashes when resuming playback after pause

A rewording and correction.

This is how it (does not) works:

Scenario:
You have xscreensaver daemon running
You start mplayer, it successfully identities the process:

xscreensaver_disable: xscreensaver wid=8388688.

Everything works fine if you keep playing
But if you PAUSE, Wait for the screensaver to start and then interrupt the
screensaver and try to Restart Playback in mplayer, mplayer Crashes:
X11 error: BadWindow (invalid Window parameter)
MPlayer interrupted by signal 6 in module: stop_xscreensaver
Xlib: unexpected async reply (sequence 0x18d62)!

comment:2 by odd@…, 19 years ago

Summary: MPlayer crashes when resuming playback after pauseMPlayer crashes when resuming playback after pause (using -stop-xscreensaver)

A rewording and correction.

This is how it (does not) works:

Scenario:
You have xscreensaver daemon running
You start mplayer, it successfully identities the process:

xscreensaver_disable: xscreensaver wid=8388688.

Everything works fine if you keep playing
But if you PAUSE, Wait for the screensaver to start and then interrupt the
screensaver and try to Restart Playback in mplayer, mplayer Crashes:
X11 error: BadWindow (invalid Window parameter)
MPlayer interrupted by signal 6 in module: stop_xscreensaver
Xlib: unexpected async reply (sequence 0x18d62)!

comment:3 by paultt@…, 19 years ago

maybe we could recheck the wid only when resuming from pause....
the following patch make it not to crash, but overload the system :(((
copied here for ease
diff -urN main/libvo/x11_common.c main_noxsaver_error/libvo/x11_common.c
--- main/libvo/x11_common.c 2005-11-10 16:02:04.953406088 +0100
+++ main_noxsaver_error/libvo/x11_common.c 2005-11-18 19:06:21.679145968 +0100
@@ -1572,6 +1572,8 @@

unsigned int time = GetTimerMS();
XEvent ev;


+ if (mDisplay)
+ xs_windowid = find_xscreensaver_window(mDisplay);

if (mDisplay && xs_windowid &&

((time - time_last) > 30000
(time - time_last) < 0))

{

comment:4 by paultt@…, 19 years ago

(In reply to comment #3)
or better this patch:
--- main/mplayer.c 2005-11-21 09:01:39.750375568 +0100
+++ main_xsaver_error/mplayer.c 2005-11-23 12:43:18.549758744 +0100
@@ -3016,6 +3016,9 @@

mp_cmd_free(cmd);
}

osd_function=OSD_PLAY;

+#ifdef HAVE_X11
+ vo_init();
+#endif

if (audio_out && sh_audio)

audio_out->resume(); resume audio

if (video_out && sh_video && vo_config_count)

comment:5 by diego@…, 19 years ago

Owner: changed from alex@… to beastd

comment:6 by compn, 14 years ago

Owner: changed from beastd to reimar

comment:7 by compn, 14 years ago

Resolution: wontfix
Status: newclosed, patriotact@gmail.com
Summary: MPlayer crashes when resuming playback after pause (using -stop-xscreensaver)[PATCH] MPlayer crashes when resuming playback after pause (using -stop-xscreensaver)

use -heartbeat-cmd instead.

Note: See TracTickets for help on using tickets.