Windows 8 Unexpected Behavior - Suspending Apps

by Dmitry Kirsanov 27. September 2012 14:32

Well, the “unexpected” should be put into quotes, because if you went through the Windows 8 training, then you have some ideas about how it works, but even if you did the training, some things are not clear until you crash at them at full speed.

As I mentioned before, Windows 8 now suspends applications which loose their focus. In Metro applications framework you, as developer, can deal with suspension notice and make sure you save the current state of the application, and  you could use application manifest to create exception from the rule. Say, if your application is a media player or a browser.

However, it turns out that Metro applications are not the only ones to be suspended. The first application that I noticed to suffer from new system behavior was WinRAR – perhaps the most popular archive manager of our time. While decompressing files, and I often deal with multi-gigabyte archives that take some time to extract, WinRAR has an option to do it in the background, so it wouldn’t steal resources from other applications, by running at the lowest priority. And when you send it to the background, in Windows 8, you get two things: first, WinRAR application gets suspended randomly and you need to use Task Manager to change the priority of the application or even see that it’s still running. Second – you can’t return the application from the “Background” like you did in Windows 7. When it gets some CPU cycles and HDD activity, as the result of your manipulations with changing of process priority, it works and decompresses the files as it should, but then it will take hour or so instead of 10 minutes in normal mode.

I think that this behavior is connected with the priority of your application, so perhaps you could play with your apps and see if changing the priority to lowest while hiding the application’s window lead to the same effect.

So, if you are developer, even if you are not going to write Metro style applications, you have to check your existing apps thoroughly before October 26th – the day of the official release of Windows 8, as it turns out the backwards compatibility is not as solid as it was declared.

blog comments powered by Disqus

Month List