Please use the Restart API to its full potential

Tue, March 27, 2007, 02:10 PM under Windows | Vista
I've been meaning to rant about this and Sahil gave me the incentive with his wish list for IE8 and Vista.

The 2nd wish item on his list for Internet Explorer is:
"When IE crashes, there should be an option for it to restore state, i.e. re-open the tabs I had opened when it crashed."
IE7 has crashed on me in the past and I do recall the behaviour that Sahil is referring to which, for those of you not running Vista, is that IE7 restarts so you don't have to restart it yourself :-). Cool, but IE7 restarts with the default home page(s), instead of opening my last browsed tabs and that is not cool. The reason this really gets to me is that I know it is so darn easy to implement the feature!

In fact, the Restart API is an area where unfortunately I am seeing a pattern of our product teams taking advantage of only half the feature (the restart bit, without the restoring state bit). The Visual Studio Codename Orcas March CTP is an application that made me smile in a very positive way when it crashed on Vista (where it is not supported) and I observed that it restarted after sending the error report. But again to my dismay, it simply restarted and left it at that. Hopefully by the time it ships, the team will implement the rest of the feature so when it restarts it also attempts to open the last solution I was working on.

Now, there is a (weak) argument either of the teams above can make that goes as follows: "If when we restart, after a crash, we try to restore the last opened tab/project, then we run the risk of ending up in a cyclical restart". This is a weak argument for two reasons:
1. The API can protect you against cyclical restarts (look at the 2nd parameter of the function from the link above and also the 60 second rule I describe in the video linked above)
2. I would expect dialog that has words to this effect: "We are sorry you experienced an issue with this application, an error report has been sent. Would you like to open the last solution/web page you were looking at? NOTE: This may cause the application to crash again!". And after displaying that message, if the user chooses to continue and they crash again, the next time don't put up the dialog and don't try to restore state.

This isn't rocket science. We have a fantastic feature in Vista; the teams have started to take advantage of it but just falling short in the end. IE7 has shipped of course, but I remain hopeful for "Orcas" to be smarter about this by RTM...