Squirrel/Squirrel.Windows

System.OutOfMemoryException when creating delta for (large) files

Open

#651 opened on Apr 5, 2016

View on GitHub
 (8 comments) (5 reactions) (0 assignees)C++ (7,025 stars) (1,061 forks)batch import
bug:old-versionhelp wanted

Description

The following happens with version 1.2.5 (via https://github.com/electron/windows-installer version 2.0.5) during diffing:

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
   at Squirrel.DeltaPackageBuilder.createDeltaForSingleFile(FileInfo targetFile, DirectoryInfo workingDirectory, Dictionary`2 baseFileListing)
   at Squirrel.DeltaPackageBuilder.CreateDeltaPackage(ReleasePackage basePackage, ReleasePackage newPackage, String outputFile)
   at Squirrel.Update.Program.Releasify(String package, String targetDir, String packagesDir, String bootstrapperExe, String backgroundGif, String signingOpts, String baseUrl, String setupIcon, Boolean generateMsi)
   at Squirrel.Update.Program.executeCommandLine(String[] args)
   at Squirrel.Update.Program.main(String[] args)
   at Squirrel.Update.Program.Main(String[] args)

Note that there is still enough physical memory when this happens (about 4gb). The files are about 160mb. Works without problems for files that are around 50mb.

Contributor guide