Version: 4.1.1 (using KDE 4.7.4) OS: Linux My index.xml file got corrupted (perhaps when kphotoalbum closed due to power failure, but not sure). When I tried to start KPhotoAlbum with the corrupt file I get an error message saying Error on line 1 column 1 in file /home/josef/Pictures/index.xml: error occurred while parsing element The only choice of action is the "OK" button. I had to manually find the hidden backup file ".#index.xml" and rename it. What I expected was that KPhotoAlbum would handle the situation by offering me an option to use the backup file. Reproducible: Always Steps to Reproduce: Start KPhotoAlbum with the corrupt XML file Actual Results: KPhotoAlbum throws out an error message and quits. Expected Results: KPhotoAlbum shows an error message and offers to restore the database from a backup.
The corrupt file was too large to upload, so here is a link (~10 MB): http://josf.se/kphotoalbum-corrupt-file/index.xml
Git commit 375ffdde59ee4a6e73fd25e2d5519c8a8eac9001 by Miika Turkia. Committed on 03/03/2012 at 19:41. Pushed by mturkia into branch 'master'. Offering to recover from backup if index corrupted If index.xml is corrupted we check if a backup exists. Then we ask the user if he would like to use the backup. M +17 -8 Utilities/Util.cpp M +1 -1 Utilities/Util.h M +7 -2 XMLDB/FileReader.cpp http://commits.kde.org/kphotoalbum/375ffdde59ee4a6e73fd25e2d5519c8a8eac9001