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

Regular Contributor
Posts: 55
Registered: ‎04-04-2012
My Device: BB Device
My Carrier: VZW & ATT

Application hangs and cause device hang if try to open the application


We have an application that listener for incoming/outgoing SMS messages on the device. There are multiple threads and timers running continuously. The application sends data to server via HTTP every 10 minutes, we called it Ping.


We found that the application stuck due to some reason on the device (because we do not receive data on the server every 10 minutes). When the user tabs or clicks the application icon on the device to open, then the whole device gets hang/stuck & unable to use, so need a device reboot.  We do not  see any exception in log on the device. 

Usually it takes a day or more to hang. 


Any thoughts please.



Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Application hangs and cause device hang if try to open the application

I think you need to use the debugger or add qDebug() statements to allow you to isolate this issue to a more specific part of your application. You need to determine where in your code you are blocking. The fact you have mulitple threads and the issue takes some time to manifest itself makes me wonder about thread safety and whether perhaps you are getting into a deadlock situation somehow.


I assume that to receive SMS messages you are not performing blocking operations however. There is no need to.


Note that when headless apps are supported, your app will not need to run continuously to be able to receive SMS messages. I mention this so that you can plan ahead.

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!
Follow me on Twitter: @mdwrim