[Qt-interest] QtConcurrent::run results in random crashes

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Sat Jul 31 17:42:48 CEST 2010


>
> static bool qt_pixmap_thread_test()
> {
>    if (!qApp) {
>        qFatal("QPixmap: Must construct a QApplication before a QPaintDevice");
>        return false;
>    }
> #ifndef Q_WS_WIN
>    if (qApp->thread() != QThread::currentThread()) {
>        qWarning("QPixmap: It is not safe to use pixmaps outside the GUI thread");
>        return false;
>    }
> #endif
>    return true;
> }
>

Thanks for pointing this out.

I myself am facing an issue where I have to decode a set of images
(JPEG) coming over the n/w. Due to bug in the h/w (embedded system)
the decode operation is being done in s/w. This causes our animation
to suffer since there aren't enough CPU cycles to decode AND animate.

So I had thought of doing some sort of "batch" processing of the
images in a separate thread. Since these images have to be drawn I
wanted to create QPixmaps...but now it seems thats not possible! :(
I'll have to work with QImage instead.

Regards,
-mandeep




More information about the Qt-interest-old mailing list