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
Contributor
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

exiting app gives error

Hi all, when I exit my application when debugging using the thumbnail x icon (which is being built using ndk 10 but not using cascades - I'm using QtCore and QtGui) I get a sigsegv error but the error occurs after my last line of code in int main has been executed. So I cannot find a cause or a solution for this error - spent a full day on it yesterday. Could the reason for this sigsegv error be due to the fact im using qt in ndk 10 and if so what can i do to avoid this error? I'm really stuck on this - could it be because I'm not releasing memory somewhere?
Contributor
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: exiting app gives error

I have just found QBBWindow: failed to set window z-order=2, errno=22, mWindow=0x08186280 at the end of the console output (after last line of code has been executed in int main) which I haven't seen before.

 

What does this mean?

 

I am using ndk 10, QtGui and QtCore and I also mix a native screen with a QMainWindow for the purposes of the application.

 

 

Can anyone provide me with some insight please?

 

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: exiting app gives error

I had a similar problem and found the opposite I was being too overzealous with freeing memory.

 

Sorry that's not much help these problems are hard to track down, I did it by writing a black box app to test each class individually on shut down. In the end for me it was a combination of assigning the objects parent and freeing its memory on shutdown.


If you've been helped click on Like Button, if you've been saved buy the app. :smileyhappy:

Developer of stokLocker, Sympatico and Super Sentences.
Contributor
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: exiting app gives error

Thank for your reply, I have changed to a really simple int main with no custom classes (just QMainWindow) and I still get sigsegv on exit.

 

int main(int argc, char *argv[])
{

QCoreApplication::addLibraryPath("app/native/lib");
qputenv("QT_QPA_FONTDIR", "/usr/fonts/font_repository/monotype");
QApplication app(argc, argv);
QMainWindow window;// = new QMainWindow;
window.show();

return app.exec();

}

 

in the gdb trace there is lots of mention of &"Cannot access memory at address 0x0\n"

 

and also in a console view there is 

 

Unable to load library icui18n "Cannot load library icui18n: (Library cannot be found)" 

 

as well as 

 

Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0
Cannot access memory at address 0x0

 

I'm linking to qt files that come with ndk 10.