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: 64
Registered: ‎09-10-2012
My Device: Developer
My Carrier: AMX

App crashes randomly, can't debug

Hi guys

 

I'm making an app. It's interface is pure QML code. I'll connect it with C++, but not yet, so I think QML is irrelevant at this point.

 

I started coding in C++ an "AccountReq" Class that contains a QNetworkManager and some slots for when the reply finishes.

I create an instance of AccountReq from the App.cpp constructor and when I run the app, sometimes it crashes at startup. I commented all code from AccountReq, so the app does nothing and it still crashes!

 

It gives me this error which is not really helpful:

Process 366702769 (cascades) terminated SIGSEGV code=1 fltno=11 ip=7bfd439c(/apps/com.example.ConsumoDeDatos.testDev_sumoDeDatos6d0a5505/native/ConsumoDeDatos.so@_Z6qDebugv+0x1b3) mapaddr=0000239c. ref=74697287

 

I read it may be because of a NULL Poiner, so I tried to debug but it gets stuck at 79% (Configuring GDC)

I created another workspace and an empty project, built for Simulator-Debug, created a debug configuration, tested on simulator but I can't debug that one either, also stuck at 79%.

 

I'm using Windows 7 (on Bootcamp on a MacBook Pro) and the Gold SDK. Uninstalled the old one and installed the Gold one.

 

I'd paste code but the app just opens, everything is commented and it still crashes.

 

Help would be really, really appreciated.

 

 

Developer
Posts: 526
Registered: ‎05-17-2009
My Device: 9900
My Carrier: ATT

Re: App crashes randomly, can't debug

Go to the system info perspecitve and to the target file system navigator. There you can see the logs folder for your app which stores the errors and the .core files that your app generates when it crashes.
Like all of my posts
Developer
Posts: 64
Registered: ‎09-10-2012
My Device: Developer
My Carrier: AMX

Re: App crashes randomly, can't debug

Thanks for the answer

 

I checked the /logs folder and there were some files named cascades.1.core, cascades.2.core, etc

Those files had sizes of about 25,000MB ! so I guess the error was a stack overflow or something.

I don't know how those files were generated.

Those files were in binary. The other log file had debug logs  but no error was printed there.

 

I tried creating an empty project and carefully copy-pasting all the code from the crashing app, and the new one doesn't crash! I need to continue developing and keep testing, will post updates later.

 

Any ideas?

Developer
Posts: 291
Registered: ‎10-15-2012
My Device: bb10 developer
My Carrier: Orange

Re: App crashes randomly, can't debug

Those core files are generated by the device. You can use the debugger to analyse them:

 

http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.ide.userguide/topic/debug_post...