Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jun 1998 23:27:57 -0400
From:      Randall Hopper <rhh@ct.picker.com>
To:        brian@worldcontrol.com
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: Fxtv 0.47 core dump - patch
Message-ID:  <19980615232757.A20479@ct.picker.com>
In-Reply-To: <19980614135044.A3024@top.worldcontrol.com>; from brian@worldcontrol.com on Sun, Jun 14, 1998 at 01:50:44PM -0700
References:  <19980606125810.A7887@top.worldcontrol.com> <19980606184150.A5041@ct.picker.com> <19980614135044.A3024@top.worldcontrol.com>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
brian@worldcontrol.com:
 |grabbed.
 |gmake'd.
 |run'ed.
 |bls2# ./fxtv
...

Wow, this opened up a whole can of worms.  Thanks for the stack trace!
A patch is attached.  Here are the worms:

1) Based on XFree86(1), the VidMode extension is by default enabled
   for local clients and disabled for remote clients  (can be overriden
   with -disableVidMode and -allowNonLocalXvidtune).

2) XFree86 (all vers. AFAIK) has a bug where it advertises the VidMode
   extension being available -- even when its disabled to the client.  This 
   is the cause of the first X error on your stack.

3) When an X Error occurs, Fxtv 0.47 will end up making X calls in
   the X error handler (via exit->atexit calls), which is problem.
   This is very likely the reason for the double-fault (IOError on the
   stack) and core dump.

4) At the time the VidMode error occurs, Fxtv may have a DGA mouse grab open 
   on the pointer (e.g. video mode switch for full-screen zoom), and
   XFree86 has another bug where it doesn't release the grab when the
   client owning the grab dies.  This hangs the mouse pointer and makes it
   basically useless.


So given this mess, here's what the attached patch does:

1) Just flat disables VidMode when the server is remote.  This covers
   the default case where the server wasn't invoked with
   -allowNonLocalXvidtune and should fix your wagon.

2) Prevents fxtv from making X calls when its coming down due to an
   XError.  Should prevent any double-faults and associated core dumps 
   in the future.


Note that you can still hang yourself if you run your X server
-disableVidMode and then try to do a full-screen zoom.  Fxtv has no clue
that VidMode "really" isn't available (XFree86 lies to it, and I'm not
going to go trapping XError handlers to find out), so it tries to switch
modes.  This fails with an XError and fxtv bails out.  The kicker is fxtv
has a DGA pointer grab active at that point, the server doesn't release it
(the other XFree86 bug :-) so your mouse is useless and you have to kill
the X server and restart it to get it back.

I doubt anyone would normally see this though because most folks don't run
-disableVidMode.

When XFree86 provides a way to detect whether VidMode is really available,
we can turn remote full-screen zooms back on.  Hopefully they'll also fix
the DGA-pointer-grab-not-released bug as well.  I filed both of these with
the XFree86 team a few mintes ago.

Thanks again for the report, and let me know how it goes!

Randall


brian@worldcontrol.com:
 |On %M 0, Randall Hopper <rhh@ct.picker.com> wrote:
 |> If you have time, I'd be interested in a stack trace.  To generate one,
 |> grab:
 |>         http://multiverse.com/~rhh/fxtv/fxtv-0.47.tgz
 |
 |grabbed.
 |
 |> Decompress, and run:
 |> 
 |>         gmake DEBUG=YES
 |
 |gmake'd.
 |
 |> Then run the generated "fxtv" binary.
 |
 |run'ed.
 |
 |
 |bls2# ./fxtv
 |Direct Video not supported by visual...using XImages
 |X Error of failed request:  XF86VidModeExtensionDisabled
 |  Major opcode of failed request:  142 (XFree86-VidModeExtension)
 |  Minor opcode of failed request:  12 (XF86VidModeSetViewPort)
 |  Serial number of failed request:  1568
 |  Current serial number in output stream:  1569
 |XIO:  fatal IO error 0 (Undefined error: 0) on X server "192.168.0.2:0.0"
 |      after 1570 requests (1569 known processed) with 6 events remaining.
 |Failed to find current video mode in server mode list
 |Failed to find current video mode in server mode list
 |zsh: segmentation fault (core dumped)  ./fxtv
 |
 |>  When it dumps, run
 |>         gdb fxtv fxtv.core
 |>         (gdb) where
 |
 |It core dump'ed without me having to save any PPM pictures and exit.  I
 |had just pressed the size change button a few times and poked around in
 |the menus.
 |
 |(gdb) where
 |#0  0x1ca33 in TVSCREENGetCurVidModeGeometry (s=0x683b0, width=0xefbfd33e, 
 |    height=0xefbfd33c) at tvscreen.c:216
 |#1  0x3da0 in TVANNOTGetModeGeom (width=0xefbfd33e, height=0xefbfd33c)
 |    at annot.c:286
 |#2  0x3e3f in TVANNOTStationPropSetDrawableSize (a=0x68570, p=0x6859c, 
 |    display=0x75800, width=324, height=242) at annot.c:308
 |#3  0x460c in TVANNOTSetDrawableSize (a=0x68570, width=324, height=242)
 |    at annot.c:510
 |#4  0x1f8bf in TVSCREENSetVideoWinGeom (videowin_geom={x = 107, y = 113, 
 |      w = 324, h = 242}) at tvscreen.c:1899
 |#5  0x1ffc0 in TVSCREENSetZoomState (zoom_on=0, full_screen=0)
 |    at tvscreen.c:2193
 |#6  0x1cc3c in TVSCREENAtExit () at tvscreen.c:366
 |#7  0x2023ac2e in exit ()
 |#8  0x20144835 in _XDefaultIOError ()
 |#9  0x20144fd5 in _XIOError ()
 |#10 0x20143874 in _XReply ()
 |#11 0x2ad14 in XF86VidModeGetModeLine ()
 |#12 0x1c842 in TVSCREENGetCurVidMode (s=0x683b0) at tvscreen.c:151
 |#13 0x1fd02 in TVSCREENSetZoomState (zoom_on=0, full_screen=0)
 |    at tvscreen.c:2119
 |#14 0x1cc3c in TVSCREENAtExit () at tvscreen.c:366
 |#15 0x2023ac2e in exit ()
 |#16 0x20144ecb in _XDefaultError ()
 |#17 0x20144fa1 in _XError ()
 |#18 0x2014395e in L310 ()
 |#19 0x2014024f in XSync ()
 |#20 0x201b5 in TVSCREENSetZoomState (zoom_on=0, full_screen=0)
 |    at tvscreen.c:2240
 |#21 0x1aa4c in ZoomCB (w=0x8d600, cl=0x0, cb=0x0) at tvmenu.c:296
 |#22 0x200e7141 in XtCallCallbacks ()
 |#23 0x200bd78e in Notify ()
 |#24 0x201103bf in HandleActions ()
 |#25 0x20110bea in HandleComplexState ()
 |#26 0x20110cb2 in _XtTranslateEvent ()
 |#27 0x200f150e in XtDispatchEventToWidget ()
 |#28 0x200f1dbf in L403 ()
 |#29 0x200f1fa8 in L458 ()
 |#30 0x1508a in main (argc=1, argv=0xefbfd984) at tv.c:726
 |(gdb) 
 |
 |> The output would be useful.  Also, if you don't mind, just mail me your
 |> "fxtv" and the "fxtv.core" core file.  My inbox can take it :-)
 |
 |Attached.
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