Bugs are an integral part of most software systems and Windows Phone is no exception. A developer has stumbled upon a storage bug on Microsoft’s phone platform that ends up saving images in isolated storage. The bug is unrelated to the “other storage” problem that was plaguing Windows Phone earlier this year.
Developer Kevin Gosse stumbled upon this problem when he was tinkering around with his Imageboard browser application. The developer had been trying to figure out where hundreds of megabytes of data were being stored each time he fired up his app.
Turns out that the storage problem was caused by methods MediaLibrary.SavePicture and MediaLibrary.SavePictureToCameraRoll. They’re both used when you save an image to your Windows Phone’s pictures hub. Every single time they’re used, it turns out that a copy of the image is saved in isolated storage.
To confirm his theory, Gosse wrote a small application with two buttons – one button to download an image and the other to display contents of the isolated storage. His theory proved right when he saw that the image he downloaded and stored locally can be detected in isolated storage.
Gosse noticed certain points while testing this bug. He could not reproduce the bug on Windows Phone 7, so it looks like only Windows Phone 8 has been affected. The bug was reproduced on various devices like Lumia 822, Lumia 920 and even an emulator, pointing towards the fact that this could be a software-related issue. The bug seemed to appear only with .jpg images and not .png ones. When Gosse anticipated and created a file on the isolated storage with the same name beforehand, it was overwritten. When he locked it by keeping the stream open, the MediaLibrary.SavePicture method threw up an exception.
“In a nutshell,” writes Gosse, “if you’re saving pictures to the picture hub, make sure you’re deleting the temporary files in the isolated storage afterwards.” Of course, all eyes are now on Microsoft to try and patch this issue. This could manifest into bigger problems with phones that have low storage spaces.