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
greenmr
Posts: 882
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Postmortem debugging not working

My previously stable app has started to crash ramdomly with SIGSEGV faults, which are usually due to trying to write to the target of a bad pointer. The crashes are happening on my Z10 development device, and I have the .core file dumped in the sandbox and I'm trying to do a postmortem debug, but I just can't get a stack trace from Momentics. As per this page I copied the .core file to my project workspace and created a new debug launch configuration that points to it. Although it isn't mentioned on that page, this also requires you to set the C/C++ application, which I pointed to the compiled arm version. When I hit Debug it shows up in the debug perspective, and I can expand it one level, but that's as far as I get. No stack trace is shown and I can't figure out how to do anything with it. Has anyone got this working?

 

9-11-2013 4-24-20 PM.png

 

This is as far as I get:

 

9-11-2013 4-27-50 PM.png



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
Developer
slashkyle
Posts: 820
Registered: ‎10-16-2012
My Device: Red Z10
My Carrier: Telus

Re: Postmortem debugging not working

Sorry, I'm not sure what the cause of the issue may be however I noticed the images you posted are set to private and that no one is able to view them

Please use plain text.
Developer
greenmr
Posts: 882
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Postmortem debugging not working

[ Edited ]

That's very strange. I did not set them as private, and when I try to edit the post I can 't see any indication that they are private, so I don't know how to change it.

 

UPDATE: May have just been a temporary site glitch, or perhaps you have your browser set to block images. I just tried signing out and viewing the thread and I can see the images fine.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
New Contributor
fesu597
Posts: 11
Registered: ‎09-12-2013
My Device: Developer
My Carrier: Blackberry

Re: Postmortem debugging not working

i am also getting same problem

Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Postmortem debugging not working

[ Edited ]

:Offtopic:

For future reference uploaded images take a while to be approved so it's always best to descibe the problem as well if you want a fast answer.


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.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Postmortem debugging not working

It works for me. Are you on 10.2?

 

If so try this way;

 

1) Right click on your project, select Debug as->Debug Configurations...

2) Select BlackBerry Postmortem Debugging from the left hand list

3) Click on the new icon at the top-left of the list

4) You should find there is only a Core file text field in the dialog window that appears

5) Browse to your core file and select

6) Click on the Apply button followed by the Debug button

7) A 'Confirm Perspective Switch' dialog should come up, click on yes and you should be good to go

 

I of course never use it as my code never crashes. [Coughs] :smileywink:

 

Good luck tracking the problem down.

 


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.
Please use plain text.
Developer
greenmr
Posts: 882
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Postmortem debugging not working

No not yet, I'm still on 10.1, I'm leery of upgrading my toolchain in between releases. After my next release goes out I will probably upgrade then. I was likely spooked by my 10.0 to 10.1 experience, which was atrocious. I had huge numbers of libraries that were included automatically by the 10.0 new app template (and which I didn't notice and didn't need) that were no longer available in the 10.1 SDK. Many hours of hand editing of obscure files followed before my app would compile again.

 

As for your instructions, that is exactly what I did in 10.1, but of course it also asked for the app as the first image shows, and I never get the "confirm perspective switch" message. It just goes straight to what you see in the first image.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Postmortem debugging not working

Understandable, however you can run them in parallel, why not install 10.2 just to do the core stack trace check?

I can't help further as I no longer have 10.1 installed.

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.
Please use plain text.
Developer
greenmr
Posts: 882
Registered: ‎03-20-2013
My Device: Red LE Developer Z10
My Carrier: Fido

Re: Postmortem debugging not working

Yes, I'm having to bite the bullet and install 10.2 on another machine. I'm beginning to suspect this is a Cascades problem though, not my code. I've been through it with a fine-toothed comb and I'm not allocating or releasing memory anywhere near the places where it crashes. I refactored to remove the one place where i was creating and destroying objects and I thought that fixed it, but this morning it crashed again so it's back to the drawing board.



Developer of Built for BlackBerry certified multiFEED RSS/Atom feed reader and aggregator.
Please use plain text.
Developer
BBSJdev
Posts: 6,094
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Postmortem debugging not working

Always tempting to blame the OS but 999 times out of a 1000 it's your own code.

 

There are other ways to seg fault, are you using threading for instance?

 


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.
Please use plain text.