#2 Failed to backup: pad block corrupted error

open
nobody
None
5
2010-04-15
2010-04-15
Tomi Liljemark
No

I can't get the new backup feature in jFreesafe to work. My jFreesafe version is 0.9.0 and the phone is a Nokia E71. I tried backing up to the Phone memory and to the Memory card, but to no avail.

I have around ten entries and I've created them a couple of days ago when I updated to the latest jFreesafe version. I had the previous 0.2.8 version installed, but after a phone firmware upgrade jFreesafe didn't show any entries. So, I installed the new version over the earlier one and recreated my jFreesafe entries.

Here are the detailed steps I took.

Select Tools -> Backup To File
Allow jFreesafe to read user data? Yes
Select Phone memory/
Allow jFreesafe to read user data? Yes
Allow jFreesafe to write user data? Yes
Select Yksityinen/ (translates to private in English, my UI language is Finnish)
Allow jFreesafe to read user data? Yes
Allow jFreesafe to write user data? Yes
Add New File: jfreesafebackup
Select file jfreesafebackup
Allow jFreesafe to read user data? Yes
Allow jFreesafe to write user data? Yes
Allow jFreesafe to read user data? Yes
Allow jFreesafe to write user data? Yes

The following error message is shown for couple of seconds and then the application returns to the main screen.
-----
Error

Failed to backup:
pad block corrupted
-----

Discussion


  • Anonymous
    2010-11-28

    Can be fixed with the following patch. The problem is that if the buffer is reused for a shorter entry, there is some junk left over at the end of the buffer.

    --- jfreesafe-0.9.0.orig//main/src/hu/atleta/freesafe/midp/Store.java 2009-02-23 08:06:48.000000000 -0800
    +++ jfreesafe-0.9.0/main/src/hu/atleta/freesafe/midp/Store.java 2010-11-27 21:17:25.000000000 -0800
    @@ -238,10 +238,7 @@
    byte buffer[] = null;

    while ( (recSize = din.readInt()) > -1 ) {
    - // Re-use buffer if possible
    - if ( buffer == null || buffer.length < recSize ) {
    - buffer = new byte[recSize];
    - }
    + buffer = new byte[recSize];

    din.read( buffer, 0, recSize );