Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 194
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Huge cascades.core file on app exit

After searching for solution of long (8 sec or so) closing time of my app I've discovered that QNX creates a HUGE file cascades.core of 100 MB. Does any one has idea what can cause the creation of this file. From Linux I remember just a core dump which usually happens when there is a memory access violation. Thank you in advance

 

Cheers

Developer
Posts: 194
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Huge cascades.core file on app exit

I've found the source of problem. This code generates the app dump core (80 MB) when closed

 

QImage lImage ("asset://images/testImage.jpg");
QImage lNewImage = lImage.rgbSwapped ();
bb::ImageData lImageData = bb::ImageData::fromPixels (lNewImage.bits(), bb::PixelFormat::RGBX, lNewImage.width(), lNewImage.height(), lNewImage.bytesPerLine());
mImage = bb::cascades::Image (lImageData);

 I also checked few apps that work with images on BlackBerry World and they apparently behave same way. Is this a bug or am I using the bb::cascades::Image in a strange way?

Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: Huge cascades.core file on app exit

QNX creates this app dump when the application crashes. you could actually view the contents of this core dump within the QDE. I don't have the steps in my head but you can find it using the QDE Momentics Help within the QDE.

Developer
Posts: 194
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Huge cascades.core file on app exit

lew, thanks for reply. I understand that core dump is created when something goes wrong, but I cannot figure it out what exactly can go wrong with bb::cascades::Image. If I comment that line out (creation of bb::cascades::Image) everything works perfectly. Actually the app is stable and works well until I close it. And even then the exit code is 0 - should mean everything went OK.

Developer
Developer
Posts: 174
Registered: ‎03-05-2009
My Device: Dev Alpha
My Carrier: -

Re: Huge cascades.core file on app exit

app could crash on exit if you are not properly cleaning some 'costly' pointers...

 

what exactly are you tryoing to do with this image? it does look awkward ;-)

Developer
Posts: 194
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Huge cascades.core file on app exit

Smiley Very Happy look awkward? What excatly, the way I use the Image or that it crashes? 

 

 The app is not crashing, that's the problem Smiley Happy but generates huge .core file. I'm using the QImage and Cascades Image objects together in order to implement the app, that extensively uses image manipulation methods (draw app, can be an example). Cascades doesn't support QPainter at all and this is one of the methods I found to convert from QImage to Image. But no matter which method I use to convert from QImage to Image on exit I have the .core file. And as I already written in first post few other apps in BlackBerry World for BB10 that work with images seem to have similar problem (long closing time). Gosh...

Developer
Posts: 409
Registered: ‎06-03-2010
My Device: Z10 Red
My Carrier: Free

Re: Huge cascades.core file on app exit