How do I get hold of of the completion events caused by XShmPutImage(. .., True) in Fedora 13?

hindmost at hindmost at
Wed Jul 21 04:21:57 PDT 2010

I've been working on an existing GPL'd video program.  I'm just adding some functionality to the HMI.  The video stuff is way over my head.  All was going fine.  Then I upgraded from Fedora 11 to Fedora 13 skipping F12.  I installed it on a nice new disk and after all the fiddle diddling of getting a new distribution running happily I got back to the video program.  It no longer worked.
It gets as far as displaying one blotchy green frame and ... nothing.  The only thing that works is alt-f4 and the shutdown button in the video window's upper right hand corner.
It's a gnome program.  The HMI is built with glade-2 and it uses XShm.  The computer is an x86, nVidia video, nouveau driver, Fedora 13.
I didn't want to but this has made me dig into the video some.  A bit of the video code uses a variant of the code that comes with mpeg2dec's libvo.  There are four buffers used to draw the video.  They are used in turn and marked busy when used.  The video gets drawn with XShmPutImage (..., True) so the option to send a completion event is turned on.  The value returned by XShmPutImage() is ill and/or undocumented but seems to vaguely suggest that a return value of zero is bad.  In this program it returns 1 so I guess that is not bad.
Elsewhere the program calls XNextEvent() and checks to see if it is a completion event and if it is figures out which of the four buffer it applies to and marks the buffer not-busy.  

There seems to be the problem's main symptom.

I put at print statement before and after the XNextEvent() call.  The print before the call outputs its message.  The print after the XNextEvent() call never happens.
XNextEvent() checks the event queue for an event and if there isn't one blocks until there is.  It would seem that there never is, that is the completion events sent by XShmPutImage (..., True) never happen or are never received.
The originator of the program dealt with XEvents some other places in the program so I sprinkled some more print statements in those areas.  None of them ever produce output.
Since I had installed F13 on a new disk I still had the old one available so I rebooted to F11 and put print statements in the same places in the F11 version.  The program runs fine, displays video, and the print statements all output messages as I would expect.

So, somewhere between Fedora 11 and Fedora 13 and hoo nose what version of hoo nose what library(s) the creation or handling of the completion events caused by XShmPutImage(..., True) stopped.  I've read the docs,  Googled myself silly and yes even tried reading the source for X-server, libX, libXext, livXv, libXvMC, and gdk+/gdk.  My head is spinning and I don't seem to be any closer to understanding why the events stopped or what I need to do about it.
Can someone please give me a clue how to get hold of the completion events sent in response  XShmPutImage(..., True) in Fedora 13?

LCD 42" TV for $26.42? Macbook Pro for $91.73?
Are these prices real? You WON'T Believe What We Found!

More information about the xorg mailing list