Re: [AD] Real weird unix bug, help wanted

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


On Thu, 2006-03-02 at 12:00 +0100, Hans de Goede wrote:
> > 
> > Unfortunately, it makes no difference here :/
> > 
> 
> Thats indeed unfortunatly, it seems to fix it 100% for me.

Most annoyingly, this seems to have to do with system load. Right now, I
cannot reproduce it at all.

> > Yes, it's a good test case, it reproduces it for me like each other
> > time, or maybe even 2/3 of time and only works correctly sometimes.
> > 
> > Anyway, now that you mention this, we should try to fix it. The first
> > thing I can think of is to try it outside of Gnome.
> > 
> > Any maybe should investigate more my attached test code? I was to
> > eventually get back to it myself, but not sure when.
> 
> You're code is vastly different from what allegro does, whats the idea 
> behind you're code?

The idea was, first use the vidmode extension to switch the video mode
(not done in my code), then use the code to properly make it fullscreen,
instead of MoveWindow, which seems to get ignored sometimes. But well,
it was just an idea I wanted to try - to use this _NET_FULLSCREEN stuff
to tell X11 it's a fullscreen window. I don't really understand if this
is supposed to work better than MoveWindow or not.

> > 
> > Or it could be an actual bug in the Allegro code - but I don't know
> > where to start looking.
> > 
> 
> It might be a race condition, I don't think Xlib is threadsafe if we 
> screw up the locking we could be confusing Xlib, resulting in all kinda 
> funnies as said it is almost as if the XmoveWindow call never gets made.

Yes. But X11 detects it and aborts with an "X11 async reply" if two
threads call any X11 function. So the problem must be something else.
The input thread is completely locked during the execution of
set_gfx_mode, so no X11 messages are processed - maybe that is an issue
here?

Anyway, I'll try to reproduce it here again now..

well, i started now lots of programs, then tried your program under 100%
CPU load, and I could reproduce it again. But the bad news, I then
killed all the processes again.. and now it stays reproducible, even
with nothing else running at all. So, something is very very weird here.
Almost seems like X11 can be switched into an "ignore sometimes
MoveWindow" state by some other program.

I'll restart now X11 and see if it then disappears again..

-- 
Elias Pschernig





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