[Qt-interest] Segfault with static QProcess

Volker Poplawski volker at openbios.org
Tue Sep 14 17:01:24 CEST 2010


On Tuesday 14 September 2010 16:43:18 Thiago Macieira wrote:
> On Tuesday 14. September 2010 11.19.01 Volker Poplawski wrote:
> > AFAIK the order of destruction of static objectes is undefined in c++. I
> > think  that's the reason why i'm seeing this crash.
> > 
> > 
> > Is this a qt bug (i'm using qt4.5.3) ?
> 
> No. The problem is what you identified: the order of deletion of static
> objects is undefined.
> 
> The only thing that you can do is make it so the order doesn't matter: do
> not use a static QProcess.

Hi Thiago, that's what i suspected.

So QProcess has a crucial dependency to the static QProcessManager. What in 
effect means QProcess must never be used in static context - Right?

If so: could you please mention that in the docs? Would have saved me some 
time for sure.


Regards
......Volker













More information about the Qt-interest-old mailing list