[Qt-embedded-interest] After main thread execution, QPixmap creation in another thread crashes the application
trinathpujari
trinathpujari at tataelxsi.co.in
Fri Oct 30 10:25:11 CET 2009
trinathpujari wrote:
> Tom Cooksey wrote:
>> On Friday 30 October 2009 05:41:20 ext trinathpujari wrote:
>>
>>> Hi All,.
>>>
>>> I am facing a serious problem in my aplication regarding the
>>> creation QPixmap.
>>> When i am creating QPixmap in main or before main thread
>>> execution, it is working fine.
>>> But if i create the QPixmap after a.exec or if i create the
>>> QPixmap in any of the user threads my application is crashing.
>>> So please if anybody have any idea why it is crashing please
>>> let
>>> me know... and it's very urgent...
>>> Thanks in Advance...
>>>
>>
>> QPixmaps are not thread safe. You may only use them in the main
>> thread (the one which called QApplication::exec). If you want to
>> render in separate threads you must use QImage instead.
>>
>>
>>
> Hi Tom,
>
> Thanks for your earliest reply...
> May i know what are the potential threats, if you use
> QPixmap in some other thread other than the main thread.
> Actually the main problem what i posted that was solved, it
> was problem with the stack size allocated for the board rather than
> any Qt issue.
> Actually now i am getting a warning regarding the usage of
> QPixmap in othe rthreadsand it is not crashing now. But i just want to
> make sure what are the threats we will face in the future
> if we use QPixmap.
>
> Regards
> Trinath
>
>
>
>
>
More information about the Qt-embedded-interest
mailing list