Crash or continue
When Lion encounters an app that raises an exception and fails to properly handle it (essentially throwing an object in the air and filing to catch it), it now offers the user the choice of either allowing the app to crash or a new option of continuing to allow the app to run.
While this results in the app running in an inconsistent state, it does allow the user at least an attempt at saving data in any open files before quitting the app are restarting it fresh.
The error dialog below indicates how an app that suffers a internal error presents the option to the user, providing a look at what caused the problem.
Push notifications
Another feature discovered in the bowels of Lion is the foundation of push notifications, something Apple originally created for iOS. While apparently not yet fully functional, a developer reports that "the whole range of callbacks for iOS push notifications have been added to NSApplicationDelegate."
- (void)application:(NSApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken NS_AVAILABLE_MAC(10_7);
- (void)application:(NSApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error NS_AVAILABLE_MAC(10_7);
- (void)application:(NSApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo NS_AVAILABLE_MAC(10_7);
Apple's push notification system allows developers to create services that update the user with notices of new information. The feature is most useful in mobile devices, where constantly polling the network for new emails, news, or other content is a waste of battery life. However, it appears that a consistent push notifications mechanism across both Mac OS X and iOS could be useful in delivering software that works the same on both systems.
Push notifications work by holding an IP connection open, waiting for a message. Essentially, it's like waiting for the phone to ring rather than running to the mailbox every few minutes to see if you've received a reply. Apple's Push Notification Server currently relays messages to iOS users, which can be badge number increments, short messages, or sounds.
Apple has shared a great deal of technology between iOS and Mac OS X, and continues to do so everywhere it makes sense. The result has been not only shared effort on Apple's side, but also a familiar and usually consistent environment for developers who want to target both.
33 Comments
I think the crash thing is for developers testing the beta. Popping up a window like that is unprofessional.
I think the crash thing is for developers testing the beta. Popping up a window like that is unprofessional.
Not really. We've been getting windows like this for years. App crashes, window pops up and conveys, "Your app crashed. Wanna report it? You can ignore the crash or reopen it and try again."
What's the harm in taking it one step further? It's actually somewhat a step towards stability for the entire OS, if the user has slightly more control over when the app crashes. Like the article suggests at least just for saving current data, I think lots of people would be happy with that, myself included.
It can also be good for developers in a lot of ways. One might be easier debugging, being able to continue the app running to gather information about the app's state and why it's crashing. I really hope they keep it.
The continuation of a crashed app may be made practical by the new versioning file system. In the past it would be too risky to allow a user to continue, since it could save their document in an inconsistent state, destroying all their work. But now if that happens they can just roll back.
Bringing PNS to the Mac is a great idea. If they use it for MobileMe new mail notifications, instead of IMAP IDLE, Mac could have the fastest new mail notifications of any computer.
Is this article written by one of the new writers they were advertising for a few days ago? The little explanatory notes about Exceptions and Push Notifications are not something I've noticed before.
Also, are those traffic lights smaller than Snow Leopard's?
We used to (sort-of) have this back in the old days with Macsbug. On occasion I could hit the developer key when the system froze, get Macsbug to pop up and hit 'r' to resume. Didn't always work, but for early days it would sometimes let me save my work...
Notice the window shows "hide details". In other words, the initial window that pops up contains minimal information (i.e. crash or continue) and thus would function like other windows of this type.
I think the crash thing is for developers testing the beta. Popping up a window like that is unprofessional.