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: 49
Registered: ‎06-06-2012
My Device: Bold 9700
My Carrier: Pelephone
Accepted Solution

Application did not handle 'exit' message and was slayed

Following the beta upgrade, consistently when exiting my app, I get the error message "Application did not handle 'exit' message and was slayed".

 

This was also reported here on the WebWorks forum (with a nice screenshot).

 

Jamie

Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Application did not handle 'exit' message and was slayed

Yeah I see this regularly when closing many kinds of apps.

+1 for the lighthearted humor on it though! ;-)

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Application did not handle 'exit' message and was slayed

I have not seen this.

Can you try making a new project in Beta2 and copying your code and see if you still get the issue?

Do you get the issue with any of the sample code?

 

Stuart

Developer
Posts: 49
Registered: ‎06-06-2012
My Device: Bold 9700
My Carrier: Pelephone

Re: Application did not handle 'exit' message and was slayed

This is with a new project. I had created a new project as the release notes suggested.

 

I will try to scale down the project to the minimum that reproduces this, but that will take some time.

 

Thanks,

 

Jamie

Developer
Posts: 30
Registered: ‎03-03-2012
My Device: Playbook
My Carrier: Blackberry

Re: Application did not handle 'exit' message and was slayed

I've recently recompiled Great Little War Game and Yachty Deluxe and get this message on both apps.

 

This has happened since I upgraded to SDK 10.0.6 and new firmware.

 

Steve.

-------------------------------------------------------------
Steven Haggerty,
Rubicon Development ( http://www.rubicondev.com/ )
Developer
Posts: 222
Registered: ‎11-05-2011
My Device: Z10
My Carrier: Beeline

Re: Application did not handle 'exit' message and was slayed

IMG_00000016.png

Developer
Posts: 49
Registered: ‎06-06-2012
My Device: Bold 9700
My Carrier: Pelephone

Re: Application did not handle 'exit' message and was slayed

Update:

 

First of all, thanks to all who have reported the same. It's always nice to know one is not alone with these things...

 

Secondly, I have found that it's quite easy to generate the popup with a small app.

 

See the attached code.

 

If you run the code as is, all should be fine. When you exit the app, in the debugger console you should see:

 

NavigatorPrivate::handleBpsEvent - exit
MainApp::~MainApp
### PPS Thread: FINISHED

 

However, if you put a breakpoint on the following line (in the destructor of MainApp):

 

cout << "MainApp::~MainApp" << endl;

 

Then the troubling popup about the app not handling 'exit' will show.

 

My hunch is this. When the BPS "exit" event is fired, something internal sets up a timer to see that the event is "handled". The definition of "handled" seems to be that something returns in less than X seconds. Obviously code waiting on a breakpoint won't return quickly, hence the popup.

 

Obviously in my original code it wasn't a breakpoint holding things up. Here is what I see in the debugger console with my full app:

 

NavigatorPrivate::handleBpsEvent - exit
applicationAboutToQuit 1
applicationAboutToQuit 2
PlayerManager::terminate 1
PlayerManager::terminate 2
PlayerManager::terminate 3
PlayerManager::terminate 4
applicationAboutToQuit 3
ERROR: Context: Object name=" "Sheet" " [objectId= 46 ] not unrealized

ERROR: Context: Object name=" "Page" " [objectId= 4 ] not unrealized

ERROR: Context: Object name=" "DockLayout" " [objectId= 7 ] not unrealized

ERROR: Context: Object name=" "Sheet" " [objectId= 3 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 5 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 6 ] not unrealized

ERROR: Context: Object name=" "ImageView" " [objectId= 8 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 11 ] not unrealized

ERROR: Context: Object name=" "ImageView" " [objectId= 14 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 9 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 15 ] not unrealized

ERROR: Context: Object name=" "StackLayoutProperties" " [objectId= 23 ] not unrealized

ERROR: Context: Object name=" "StackLayout" " [objectId= 27 ] not unrealized

ERROR: Context: Object name=" "EngineDocument" " [objectId= 18 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 20 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 21 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 41 ] not unrealized

ERROR: Context: Object name=" "EngineDocument" " [objectId= 29 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 31 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 32 ] not unrealized

ERROR: Context: Object name=" "EngineDocument" " [objectId= 34 ] not unrealized

ERROR: Context: Object name=" "Label" " [objectId= 17 ] not unrealized

ERROR: Context: Object name=" "TextArea" " [objectId= 28 ] not unrealized

ERROR: Context: Object name=" "Button" " [objectId= 25 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 26 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 48 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 49 ] not unrealized

ERROR: Context: Object name=" "ImageView" " [objectId= 51 ] not unrealized

ERROR: Context: Object name=" "ImageView" " [objectId= 56 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 53 ] not unrealized

ERROR: Context: Object name=" "Page" " [objectId= 47 ] not unrealized

ERROR: Context: Object name=" "DockLayout" " [objectId= 50 ] not unrealized

ERROR: Context: Object name=" "DockLayoutProperties" " [objectId= 54 ] not unrealized

ERROR: Context: Object name=" "DockLayoutProperties" " [objectId= 52 ] not unrealized

ERROR: Context: Object name=" "DockLayoutProperties" " [objectId= 10 ] not unrealized

ERROR: Context: Object name=" "DockLayoutProperties" " [objectId= 12 ] not unrealized

ERROR: Context: Object name=" "StackLayout" " [objectId= 13 ] not unrealized

ERROR: Context: Object name=" "StackLayoutProperties" " [objectId= 16 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 37 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 44 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 45 ] not unrealized

ERROR: Context: Object name=" "StackLayout" " [objectId= 55 ] not unrealized

ERROR: Context: Object name=" "StackLayoutProperties" " [objectId= 57 ] not unrealized

ERROR: Context: Object name=" "StackLayoutProperties" " [objectId= 64 ] not unrealized

ERROR: Context: Object name=" "StackLayoutProperties" " [objectId= 68 ] not unrealized

ERROR: Context: Object name=" "DockLayout" " [objectId= 69 ] not unrealized

ERROR: Context: Object name=" "ScrollViewProperties" " [objectId= 71 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 78 ] not unrealized

ERROR: Context: Object name=" "DockLayoutProperties" " [objectId= 74 ] not unrealized

ERROR: Context: Object name=" "StackLayout" " [objectId= 75 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 61 ] not unrealized

ERROR: Context: Object name=" "EngineDocument" " [objectId= 59 ] not unrealized

ERROR: Context: Object name=" "TextStyleData" " [objectId= 62 ] not unrealized

ERROR: Context: Object name=" "Label" " [objectId= 58 ] not unrealized

ERROR: Context: Object name=" "Button" " [objectId= 66 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 67 ] not unrealized

ERROR: Context: Object name=" "ScrollView" " [objectId= 70 ] not unrealized

ERROR: Context: Object name=" "WebView" " [objectId= 72 ] not unrealized

ERROR: Context: Object name=" "Container" " [objectId= 73 ] not unrealized

ERROR: Context: Object name=" "ProgressIndicator" " [objectId= 76 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 269 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 271 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 275 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 274 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 272 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 276 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 270 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 273 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 268 ] not unrealized

ERROR: Context: Object name=" "ImageData" " [objectId= 277 ] not unrealized

ERROR:: ClientContext: Destroying server context with 70 remaining objects!
ERROR:: ClientContext: Releasing remaining objects...
QNXWebViewProvider::destroy()
### PPS Thread: FINISHED
### Server Thread: FINISHED
QNXApplicationEngineImpl::run(EXIT)
ApplicationPrivate::resourceManager: ERROR called from non-UI thread QThread(0x14e0f8)
ApplicationPrivate::resourceManager: Method called from non-UI thread

 

A lot is happening following the BPS exit event, including numerous error messages being printed by the system.

One of these eventually raised a SIGABRT signal, which caused the debugger to break and the dreaded popup was quick to follow.

 

This is the stack for the SIGABRT:

 

Thread [1] (Suspended : Signal : SIGABRT:Aborted)
SignalKill() at 0x124c40c
raise() at 0x123d064
0x123b7c8
0x123b7c8

 

The error messages and the stack trace don't mean much to me, but maybe someone at RIM will have an idea what's going on.

 

Needless to say, the popup shows even went not running in the debugger.

 

That's it for now. I will continue to try to reproduce this in a way that will demonstrate the issue without a breakpoint. However, I didn't want to wait before sharing this. 

 

Given that the popup seems to simply indicate that the shutdown procedure is taking too long, it is very possible that all of us who have encountered this issue are each dealing with separate causes...

 

Thanks,

 

Jamie

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Application did not handle 'exit' message and was slayed

Ok, I see this in cowbell if I set a breakpoint in something that gets destroyed after main.   I want to check a few things yet but want you to know I've seen this.

 

So far I've only seen this when debugging and only if I set a breakpoint that happens after main().

 

Stuart

New Contributor
Posts: 3
Registered: ‎05-24-2011
My Device: Torch 9800
My Carrier: Fido

Re: Application did not handle 'exit' message and was slayed

For my case, it's the pthreads that I created still running after main thread quits. Also, only Dev Alpha complains about it, PlayBook doesn't.

Retired
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha
My Carrier: N/A

Re: Application did not handle 'exit' message and was slayed

This message will not be displayed for external applications - it is meant for internal applications only and can be ignored for the moment;

 

Martin