If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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
Regular Contributor
dlacerte
Posts: 68
Registered: ‎03-12-2013
My Device: BB Z10
My Carrier: Rogers

How to debug a crashing application?

I am building a native BB10 application and sometimes it crashes. The logging doesn't seem to provide any helpful information since there is little consistency to what code is running when the app crashes. What can I do to track this down?

 

I read on a forum here that there might be a core dump file but where would I find that on the device and how would I use it? Is there a callback I can register that would get called on an interrupt when a crash is occurring so I can stop in the debugger and look at the state? Any suggestions are appreciated!

 

Dominique

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How to debug a crashing application?

Run you app using Momentics NDK 'built in' debugger and once your app crashes the app will be stopped and you'll see stack trace of function calls -> you'll see where it crashed.

Please use plain text.
Regular Contributor
dlacerte
Posts: 68
Registered: ‎03-12-2013
My Device: BB Z10
My Carrier: Rogers

Re: How to debug a crashing application?

[ Edited ]

Thanks for the info but...

 

1) usually (if not always?) when I get a crash in the debugger the stack trace where the crash occurred is gone and instead I am sitting at a stack trace for the signal (i.e. SIGSEGV Segmentation fault) and there is no useful data I can get here

 

2) often the crash occurs when I'm not debugging (i.e. on a QA device or on a Beta testers device) so it would be great to be able to look at a core dump for these cases since we often don't have steps for reproducing the issue, and even if Idid I'd be stuck at (1) above :smileysad:

Please use plain text.
Regular Contributor
dlacerte
Posts: 68
Registered: ‎03-12-2013
My Device: BB Z10
My Carrier: Rogers

Re: How to debug a crashing application?

I found a "core" file for a crashing QNX debugged app in "/accounts/1000/appdata/com.CounterPath.Bria.testDev_erPath_Bria8a8dc02_/logs/Bria.core" which I assume is a core dump file. What can we do with this file to get information out of it?

Please use plain text.
BlackBerry Development Advisor
jomurray
Posts: 121
Registered: ‎09-06-2010
My Device: Z30
My Carrier: Vodafone UK

Re: How to debug a crashing application?

There's a good presentation here on "Performance and Debugging for Native Developers" which describes how to examine core files amongst other things:

 

http://hosting.desire2learncapture.com/RIM/Content/attachments/Archive/25/JAM10presentation.pdf

---------------------------------------
Please refrain from posting new questions in solved threads.
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Found a bug? Report it here
Follow me on Twitter @jcmrim
Please use plain text.