Re: [AD] more xwin problems...

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 03 Nov 2001, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> I just got the latest cvs to fix a problem that was causing
> any allegro app to go super slow... now It is going just as fast
> as it used to but I'm noticing a weird problem that I've only
> seen once before... I think It may have something to do
> with the threading and screen locking. What happens is
> the allegro app stops dead after a bit and in the consols an
> error message from X appears:
> XIO:  fatal IO error 0 (Success) on X server ":0.0"
>       after 116069 requests (116068 known processed) with 0 events remaining.

If you look at _xwin_close_display, it now looks like:

void _xwin_close_display(void)
{
   XLOCK();

   _xwin_private_destroy_window();

   if (_xwin.display != 0) {
      /* Must unlock display before closing.  */
      XUNLOCK();
      XCloseDisplay(_xwin.display);
      _xwin.display = 0;
   }
   else
      XUNLOCK();
}

My guess is that we are locking the display (with XLOCK), then doing
something in `_xwin_private_destroy_window' which is not meant to be
done while the display is locked.  I'm not sure if the locking is
actually necessary.  Try taking it out.

> The app Im using that regularly displays this error is a Virtual Machine
> that I wrote and wrote Allegro bindings for it... 

I left this for later because I couldn't reproduce it consistently.
If your program does it consistently, please send it to me, or do some
debugging with it yourself.

> P.S. the previous 'bug' that I reported is gone.. probably because of the 
> removal of 'yield_timeslice()'.. but the funky X error didn't happen.

If I am right this is not a new bug, but an old one that wasn't
exposed.



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/