Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET When protecting with AES, Xceed ZIP throws FileSystemInternalException: An update in place did not write the expected number of bytes.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20496 |

    Is this a known issue? Is there any fix? I only see this when using AES128 encryption. 

    Xceed.FileSystem.FileSystemInternalException:
    An update in place did not write the expected number of bytes.

    Type:
    Xceed.Zip.ZipArchive

    FullName: \

       at
    Xceed.Utils.Storage.StorageItem.WriteHeader(Stream dest, Int64 size)

       at
    Xceed.Utils.Storage.Storage.UpdateItems(FileSystemEventsSession session, Stream
    destStream)

       at
    Xceed.Zip.ZipStorage.UpdateItems(FileSystemEventsSession session, Stream
    destStream)

       at
    Xceed.Utils.Storage.Storage.Update(FileSystemEventsSession session)

       at
    Xceed.Zip.ZipStorage.Update(FileSystemEventsSession session)

       at
    Xceed.Utils.Storage.StorageHandler.Rebuild(FileSystemEventsSession session)

       at
    Xceed.Utils.Storage.StorageHandler.ReleaseReference(FileSystemEventsSession
    session)

       at
    Xceed.Utils.Storage.StorageHandler.EndUpdate(FileSystemEventsSession session)

       at
    Xceed.Zip.ZipArchive.EndUpdate(FileSystemEvents events, Object userData)

       at Xceed.Zip.ZipArchive.EndUpdate()

       at
    Fiddler.frmViewer.actSaveSessionArchive(String sFilename, String sPassword,
    Session[] arrSessions) in C:\src\Fiddler2\Viewer.cs:line 5059

    xceed.zip.dll v4.3.11214.17010

    Imported from legacy forums. Posted by Eric (had 1794 views)

    User (Old forums)
    Member
    Post count: 23064

    Further troubleshooting shows that this bug may be easily reproduced. Just try to write any empty file to an AES-encrypted archive and you’ll hit this.

    ZippedFile o = new ZippedFile(odfZip, sResponseFilename);
    using (Stream oS = o.CreateWrite(FileShare.None))
    {

    // Uncomment the following two lines to write a single byte and avoid the exception

    // byte[] arrOne = new byte[1];
    // oS.Write(arrOne, 0, 1);

    // Note, simply calling .Write with no payload does NOT prevent the exception.

    // byte[] arrNone = new byte[0];

    // oS.Write(arrNone, 0, 0);
      

    }

     Notably, it appears that if you add a comment to the individual item, the exception goes away.

    Imported from legacy forums. Posted by Eric (had 491 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Eric,

    I apologize for the delay.

    We were able to reproduce the issue and a fix request has been assigned to the developer.

    He says that he should be able to provide a beta build with this fix quickly. You can keep an eye on the following forum post to stay informed of the latest notes and any beta builds available for Xceed Zip for .NET:

    http://xceed.com/CS/forums/thread/26565.aspx

     

    Imported from legacy forums. Posted by Diane [Xceed] (had 395 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Eric,

    I have received an update from the developer. A new beta build that includes this fix is now available in the thread I mentioned in my previous post.

    Imported from legacy forums. Posted by Diane [Xceed] (had 314 views)

    User (Old forums)
    Member
    Post count: 23064

    Thanks, Diane! I’ll be sure to grab that in a few days after we renew our subscription.

    Imported from legacy forums. Posted by Eric (had 666 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    The fix for this issue is now included in the latest official version, which can be downloaded in our Updates Center

    Fixed a bug where empty AES-encrypted files added to a new archive caused a FileSystemInternalException to be thrown.

     

    Imported from legacy forums. Posted by Diane [Xceed] (had 1390 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.