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

Java Development

Reply
Developer
Posts: 92
Registered: ‎06-02-2009
My Device: Rogers Curve 8900
My Carrier: Rogers

Application Monitor - Why is my app being killed?

Hi,

 

When running my app on OS 7.1.0.523, after about 20 minutes the Resource Monitor kills it. Looking in the logs, the only explanation it gives is: "Terminating process not handling events: <app name>(<thread number>)".

 

What does this mean? What events do we need to handle and also I'm curious, what is considered "excessive" timer and cpu usage when backgrounded?


Thanks in advance!

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Application Monitor - Why is my app being killed?

Are you performing some type of blocking operation in the event thread?

 

Examples would be HTTP communications, database access, etc.

 

Developer
Posts: 92
Registered: ‎06-02-2009
My Device: Rogers Curve 8900
My Carrier: Rogers

Re: Application Monitor - Why is my app being killed?

We do HTTP communications every five minutes on a timer thread, not the event thread.

Developer
Posts: 92
Registered: ‎06-02-2009
My Device: Rogers Curve 8900
My Carrier: Rogers

Re: Application Monitor - Why is my app being killed?

However we use the response to update the UI, maybe that's what's causing it? I just don't understand the error message in that case...

Developer
Posts: 17,011
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Application Monitor - Why is my app being killed?

the log message indicates that the event thread was blocked.
see
http://supportforums.blackberry.com/t5/Java-Development/What-is-the-Event-Thread/ta-p/446865

usually the device eventlog (alt+lglg) saves a process dump which could indicate where something went wrong.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 92
Registered: ‎06-02-2009
My Device: Rogers Curve 8900
My Carrier: Rogers

Re: Application Monitor - Why is my app being killed?

[ Edited ]

I guess the new Resource Monitor doesn't save process dumps when it terminates a process... I don't see any in the logs. I will keep trying to pinpoint any place where the event thread could possibly be blocked...

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Application Monitor - Why is my app being killed?

"We do HTTP communications every five minutes on a timer thread, not the event thread."

 

Don't use the Timer Thread.  Use the Timer to start your process, have some sort of flag so the Timer knows when your process is finished (so it doesn't start another one), but move that processing off the Timer Thread onto its won Thread.  Problem will be solved I suspect....