[Interest] Error : QImage: out of memory,

Igor Mironchik igor.mironchik at gmail.com
Mon Aug 1 21:19:02 CEST 2016


Hi,

What type of connection do you use for slot onImageReceived()?

If connection is queued then my guess can be correct.


On 01.08.2016 22:14, Igor Mironchik wrote:
>
> Hi,
>
>
> On 01.08.2016 20:19, Nilesh Kokane wrote:
>>
>>
>> On Aug 1, 2016 8:20 PM, "Igor Mironchik" <igor.mironchik at gmail.com 
>> <mailto:igor.mironchik at gmail.com>> wrote:
>> >
>> > Hi,
>> >
>> > You get this error in slot onImageReceived()?
>>
>> No
>>
>> > or you are talking about this lines:
>> >
>> >
>> > QImage img(cdata, 288, 352, QImage::Format_RGB888);
>> >     img = img.scaled(QSize(288*1.5,352*1.5));
>> >     delete[] cdata;
>>
>> Yep.
>>
>> This happens when I repeatedly call the function for 10 minutes approx.
>>
>
> Ok. I guess that in this code all is ok. Use valgrind or something 
> else to check where are you leak memory. Maybe you invoke AddToQueue 
> very frequently, so your platform is not in time to process all 
> images, so queue grows and at some time you are out of memory.
>
> What is you platform? How much memory you platform has?
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160801/fb2d24ad/attachment.html>


More information about the Interest mailing list