07-26-2012 03:59 PM
1. Can we deduce from this that the message is not an indication of an error in our app? That would be nice... :-)
2. It can take a long time for the app to become usable again after the message has been dismissed, so the inconvenience is a bit more than just the popup itself... :-(
Thanks for the update,
07-27-2012 02:40 PM
Throughout the Beta phases of Cascades, I cannot confirm 1.
As for 2, I understand and agree that it is a nuisance - best bet for the moment would be to create a bug report as it is impacting your development efforts-
08-15-2012 01:11 PM
First of all, attached is a small app, which demonstrates the issue.
Secondly, as noted above, the popup about the app not handling 'exit' is just a side-effect of an exception being thrown while the app is closing. As such, the causes of such an exception can be many. What I describe here is simply the issue, which plagued me. Others encountering the same popup will likely find other causes.
In my case, the following error messages provide a clue:
ERROR: Context: Object name=" "ImageData" " [objectId= 10 ] not unrealized
ERROR:: ClientContext: Destroying server context with 1 remaining objects!
ERROR:: ClientContext: Releasing remaining objects...
### PPS Thread: FINISHED
### Server Thread: FINISHED
ApplicationPrivate::resourceManager: ERROR called from non-UI thread QThread(0x12fe30)
ApplicationPrivate::resourceManager: Method called from non-UI thread
It seems that some types have to be destructed before main has exited. When might this not happen?
Well, sometimes I like to use singletons. In my implementation, the singleton object is instantiated like this:
static Singleton singleton;
Such instances are destructed by the C++ cleanup code, which is executed AFTER main has exited. Apparently this is too late for some Cascade types (e.g., "Image" in my sample).
The solution I used to overcome this was to destruct all such sensitive objects while the UI thread is still active. I did this by connecting to the application's "aboutToQuit" signal. This solved the issue for me.
In the attached sample, the solution is commented-out. You can un-comment it to see how it works.
08-15-2012 01:55 PM
I had noticed that the issue happened during the destruction of statics.
It also seemed that sometimes the issue happened before main() returned, while cleaning up objects on the stack.
In your case, what kind of object needed to be cleaned up earlier?
08-15-2012 02:13 PM
Since getting the latest DevAlpha update (released today) I have not seen this error anymore. Its only been about 20 minutes... but I think this issue may have been fixed. ;-)
08-15-2012 02:48 PM
I'm on 10.0.6. What version was released today?
Please note that while the popup may no longer be showing in the latest release, in my case I had a real issue that needed proper handling.
08-15-2012 03:24 PM
08-22-2012 10:07 AM
I'm back. Apparently I spoke too soon.
While the "EUREKA" post above indeed resolved most of this problem for me, I have encountered another scenario, which also yields the "slayed" popup.
I have attached a small demo.
In this example a WebView embedded in a Sheet seems to be causing the problem. If I don't create the sheet, no error shows at the end. If I do, I get the error. I have tried both explicitly deleting the sheet and not deleting it. Not deleting yields error messages in the Debug Console. Either way though, I get the "slayed" popup at the end.
Note that I don't have to actually show the WebView to reproduce this.
Any ideas are most welcome.