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
oddboy
Posts: 136
Registered: ‎05-24-2011
My Device: Z30 running 10.2 and Playbook 4GLTE running OS2.1
My Carrier: rogers

debugging a long running process?

Hey gang,

I've noticed that occasionally, my app will start using a lot of cpu - 30-50%. This lasts for about 10 mins or so, then the app is either terminated, crashes, or recovers on its own.

I've noticed this using device monitor.

This happens kind of randomly and intermittently. My app could run for days without issues, then this may happen.

Since I can't keep my phone connected to the ide for days at a time, are there any good ways to debug a problem like this?

I'm starting to instrument everything with a QTimer and dumping that to a log to see if I can isolate what's happening, just wondering if there are any better ways to do this?

Thx,

J
bron: a cron-like scheduler for BlackBerry 10
http://apps.oddelement.com
Please use plain text.
Developer
10soft
Posts: 33
Registered: ‎12-05-2013
My Device: Z10
My Carrier: 123456789

Re: debugging a long running process?

If you wanna log some main points in your app, log it into Hub. :smileyhappy:
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: debugging a long running process?

You need to profile your app...

 

http://developer.blackberry.com/native/documentation/cascades/getting_started/tools/profiling.html

 

Run a profiled build of your app, run through all its functionality and then analyse the profile information.

 

If it only happens every now and then then always run the profile enabled build and next time it happens analyse the results.

 

Do you have any idea when it happens, i.e. in a network load, intensive graphics session, do you use threading or shared resources? These things can usually be logically assessed and the areas narrowed down with just understanding of your own code and looking at the areas mentioned.

 


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.