[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] problems with using video



On Monday 29 December 2008 19:26:50 Jake b wrote:
> On Mon, Dec 29, 2008 at 7:07 AM, Joseph Rawson <umeboshi3@xxxxxxxxx> wrote:
> > python: ../../src/xcb_lock.c:77: _XGetXCBBuffer: Assertion `((int)
> > ((xcb_req) - (dpy->request)) >= 0)' failed.
>
> Is there any more to the message? I would guess its a failed lock, (
> but, it doesn't look like pygame specifically. )
>
No, this is the entire message.  If you know of any variables that can be set 
to create more verbose error messages, I would be happy to set them and make 
a better report. (I just made a script that wound up showing a longer 
backtrace).

> > This only seems to happen when I'm testing on my local desktop, using
> > windowed, instead of fullscreen mode.  On my desktop, I get more xcb_lock
> > errors, than I do freezes.
> >
> > The application is to be run on a dedicated machine, and the signal is to
> > go through the tv-out of the video card and be split among several tv's. 
> > I am using debian/lenny for the OS of the machine, and X11 for the
> > display (to be able to use the tv-out).  I'm saying this, because I
> > believe that the bug may be in X, or the way that X is being used by
> > either sdl or pygame, although I'm not really sure.  Since I'm new to
> > programming with pygame, it's very possible that the bug is in my code,
> > and I have overlooked something important.
> >
> > I test the system using virtualbox, and on the VM, the xcb_lock error
> > never occurs, rather, the scene will freeze, and the cpu will be pegged
> > at 100%.
>
> Probably doesn't matter, but, you could try pygame.time.get_ticks()
> for your getting ticks function.
I haven't been using ticks at all, rather the sleep and delay functions.  Each 
scene, which is a section in the config file has an option 
called "timer_style", which can be set to "sleep" or "delay".  Here's the 
snippet of code that sets this up.
----------------------------------------
def __init__(self):
	...
 	timer_style = config.get(self.scene, 'timer_style')
        if timer_style == 'sleep':
            self.delay_function = pygame.time.wait
        else:
            self.delay_function = pygame.time.delay
        self.text_scroll = None
----------------------------------------
Then in the perform scene function, I call self.delay_function .  The default 
in the config file is to use sleep to save on cpu usage, but I leave it as a 
configuration option in case a scene looks too jumpy, then the more accurate 
delay function can be used to smooth things out.


>
> (someone smarter will be along)
You have certainly been smart enough to give me a quick reply to let me know 
that my post has been read. :)

I just made a smaller test script that will also expose the problem.  It may 
have to run for a few minutes until the problem occurs.  Here's the 
backtrace.
----------------------------------------
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb74a3767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb74a38b1]
#2 /usr/lib/libX11.so.6 [0xb7656cf1]
#3 /usr/lib/libX11.so.6(XSync+0xbe) [0xb764b1ae]
#4 /usr/lib/libSDL-1.2.so.0 [0xb7aa99d5]
#5 /usr/lib/libSDL-1.2.so.0 [0xb7aaf02f]
#6 /usr/lib/libSDL-1.2.so.0(SDL_UpdateRects+0x26f) [0xb7a9e05f]
#7 /usr/lib/python2.5/site-packages/pygame/display.so [0xb7b3dc58]
#8 python(PyEval_EvalFrameEx+0x55c1) [0x80ced71]
#9 python(PyEval_EvalCodeEx+0x685) [0x80d0675]
#10 python(PyEval_EvalCode+0x57) [0x80d0887]
#11 python(PyRun_FileExFlags+0xef) [0x80edd2f]
#12 python(PyRun_SimpleFileExFlags+0x19a) [0x80edffa]
#13 python(Py_Main+0xc07) [0x8059327]
#14 python(main+0x22) [0x80586f2]
#15 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7d2d455]
#16 python [0x8058631]
Locking assertion failure.  Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb74a3767]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb74a381e]
#2 /usr/lib/libX11.so.6 [0xb7656de9]
#3 /usr/lib/libX11.so.6(_XReply+0x13e) [0xb7657b2e]
#4 /usr/lib/libX11.so.6(XSync+0x67) [0xb764b157]
#5 /usr/lib/libSDL-1.2.so.0 [0xb7aa99d5]
#6 /usr/lib/libSDL-1.2.so.0 [0xb7ab6714]
#7 /usr/lib/libSDL-1.2.so.0(SDL_DisplayYUVOverlay+0x1c4) [0xb7a9fd74]
#8 /usr/lib/libsmpeg-0.4.so.0(_ZN9MPEGvideo12DisplayFrameEP10vid_stream+0x25a) 
[0xb71a6fba]
#9 /usr/lib/libsmpeg-0.4.so.0
(_ZN9MPEGvideo14ExecuteDisplayEP10vid_stream+0x36) [0xb71a73f6]
#10 /usr/lib/libsmpeg-0.4.so.0 [0xb71af4c4]
#11 /usr/lib/libsmpeg-0.4.so.0(_Z11mpegVidRsrcdP10vid_streami+0x198) 
[0xb71b3a38]
#12 /usr/lib/libsmpeg-0.4.so.0(_Z14Play_MPEGvideoPv+0x74) [0xb71a5744]
#13 /usr/lib/libSDL-1.2.so.0 [0xb7a7b6bb]
#14 /usr/lib/libSDL-1.2.so.0 [0xb7acf6ad]
#15 /lib/i686/cmov/libpthread.so.0 [0xb7ea74c0]
#16 /lib/i686/cmov/libc.so.6(clone+0x5e) [0xb7df761e]
----------------------------------------
I'm attaching a copy of the script.  If the line "#screen.blit(background, (0, 
0))" is uncommented, it will usually freeze faster, but it will freeze 
without this statement eventually anyway.

Have a good New Year!! :)

                                                                    
>
> --
> Jake



-- 
Thanks:
Joseph Rawson

Attachment: test-video.py
Description: application/python

Attachment: signature.asc
Description: This is a digitally signed message part.