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
Posts: 150
Registered: ‎10-19-2012
My Device: Playbook, BB10DevAlphaB/C, Z10
My Carrier: Sonera, Saunalahti

How to kill a "zombied" app ? (Porting SDL game)

I'm porting a SDL based game and have problem with the app getting stuck if I close it with a swipe up. The icon stays faded/grey and I'm unable to start the app anymore. The only option is to reboot the device. The obvious answer would be to ssh, ps & kill but as the OS is so restrictive I'm not able to do that. And trying to kill it with blackberry-deploy -terminateApp does not do anything. Anyone have any ideas ?
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to kill a "zombied" app ? (Porting SDL game)

This solution I created a while back may still work: http://blackberry-py.microcode.ca/zombie-slayer.html (Though I believe it's doing effectively what terminateApp does, so maybe not.)

Not that it must be a devMode app, since there's no way to kill a signed one programmatically.

Also, try the "long-press" option if the window is still open (though it sounds like it's not). Instead of just tapping the X in the corner of the active frame, press and hold for a second or two. It will force it closed instead of just asking it to close.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 150
Registered: ‎10-19-2012
My Device: Playbook, BB10DevAlphaB/C, Z10
My Carrier: Sonera, Saunalahti

Re: How to kill a "zombied" app ? (Porting SDL game)

Thanks for the help. I should have realized there is a /proc filesystem to peek into. Installing an app for a simple cli operation is a bit overkill imho, this shell stuff does it nicely for me:
for i in /proc/*/cmdline ; do echo $i; cat $i; done
Then just look up the one that successfully cats the cmdline for your app and kill -9 it.
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: How to kill a "zombied" app ? (Porting SDL game)

Since that's pretty much exactly what the Zombie Slayer app does, it seems your solution should work fine for you. ;-)

You may like to check out the pidin app as well, since it's sort of like what ps would do. QNX has a utility to give help on apps as well, called "use". Just type "use pidin" to learn more. And yes, the app sandboxing means you can't see most of the stuff that's going on in the system, but you can see your own devMode apps just fine.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!