qt-interest@trolltech.com
[Top] [All Lists]

Re: Fwd: Bug with XInitThreads causing a deadlock on qt_init()

Subject: Re: Fwd: Bug with XInitThreads causing a deadlock on qt_init()
From: Dimitri
Date: Sun, 25 Jun 2006 12:16:52 +0200
Hi Martin,

Hi Dimitri.  I already searched the mailing-list extensively before
posting my original question.   I could not find an answer.  Actually,
from the stuff I've found it seems that XInitThreads is indeed
supposed to work (is there an automated test in the Qt distro?).  With
Qt4 I can't even get past the initialization stage.

Yes, I didn't mean to say you'll find an answer in the mailing list, but you'll see this issue had already been raised. Search the mailing list with a mere "XInitThreads":
        http://lists.trolltech.com/qt-interest/
Qt Quarterly covers "Writing Multithreaded GL Applications":
        http://doc.trolltech.com/qq/qq06-glimpsing.html
I think you'll find some answers there to your questions.

Since the problem happens in XGetExtensionVersion() I suspect this is a bug in the X server. Which version of X11 and OpenGL are you running? Which graphics card/driver?

I suppose this brings other questions:

* Is there such a lock already?
* If not, is there a way to implement one without having to hack into
the Qt source code itself, i.e. perhaps with something around the
event loop?
* Otherwise, is there a mechanism for sending events to be processed
at a higher priority?
[...]
So nobody is doing that?  I mean, anyone wanting to write a GUI app
with some fast decoupled graphics running in background would do the
same it seems.  <bait>  Or isn't anybody doing fast graphics rendering
in the background with Qt? </bait>

Are you certain fast graphics rendering needs to be done in a separate thread, or that the event mechanism is slowing down the application significantly? I'm not saying there are no issues here, but in the end you just need a ~ 25 Hz refresh of the screen and I've never experienced the event mechanism getting in the way. Also on machines with a single CPU or a single GPU I don't see how threads could improve the situation significantly.

--
Dimitri

--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with 
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/

<Prev in Thread] Current Thread [Next in Thread>