Thread issue in my graphics API (pygame)

David Muffley sunami.2600 at gmail.com
Thu Jul 27 12:01:25 EDT 2006


Link to the mentioned file: http://dc.ubuntu-us.org/projects/gasp/

My system: ubuntu-dapper (2.6.1).  Line 325 is where the _event_handler is
and I believe causes the issue.  I can recreate the bug quite easily by
calling the 'begin_end()' method and letting it run until it breaks (2-7
seconds mostly).  I cannot even confirm that this will run on Windows or Mac
OS X.

I am having a problem with using a thread in my program (attached).  I have
an event handler which I have run in a separate thread, which redraws the
screen (linux) and quits if the 'x' is pressed.  However, I seem to be
running into a threading problem with this set-up.  When I attempt to close
the graphics window, I will occasionally (about 20-30% of the time) recieve
an error message:

    "Xlib: unexpected async reply (sequence 0x##)!" (where ## are two
numbers)

I googled it and found that it's a threading issue, but not much more, such
as WHAT is actually wrong or ways to avoid the error.  I'm looking for
anyone out there that can help me solve this issue, your help would be much
appreciated.

 ----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060727/62b3def1/attachment.html>


More information about the Python-list mailing list