Comments (5)
The fix should work for entries > 2G in size, it's a workaround for a fairly obscure OS X bug:
http://comments.gmane.org/gmane.comp.version-control.git/220647
If you still get errors with your 367M movie file, do send me the exact files, some minimal code to demonstrate it and I'll try to reproduce it. Were you running on OS X or iOS?
from zipzap.
I tried this new change, but I still get that error. I've made an isolated test case that demonstrates the problem. This breaks on both an iPhone 4 and an iPad 2 running iOS 6.
Here is a link: http://s3.amazonaws.com/dev_capture_uploads/isak/ZipZapCrash.zip
(archive with a 368 MB XCode project).
What I find incredibly strange here is that the order in which you add things to the archive determines whether it breaks or not. Try adding the webcam first instead of last, for example - it works then. (AppDelegate.m:34)
This is the output I'm getting of a run:
2013-07-30 11:45:52.900 ZipZapCrash[158:3c07] Adding ui_events.jsv to archive...
2013-07-30 11:45:52.973 ZipZapCrash[158:3c07] Added ui_events.jsv to archive
2013-07-30 11:45:52.975 ZipZapCrash[158:3c07] Adding urls_visited.csv to archive...
2013-07-30 11:45:52.986 ZipZapCrash[158:3c07] Added urls_visited.csv to archive
2013-07-30 11:45:52.988 ZipZapCrash[158:3c07] Adding webcam.mov to archive...
2013-07-30 11:46:28.697 ZipZapCrash[158:3c07] Could not add webcam.mov to archive. Error: Error Domain=com.pixelglow.zipzap Code=8 "The operation couldn’t be completed. (com.pixelglow.zipzap error 8.)" UserInfo=0x1ed82a20 {NSUnderlyingError=0x1edaf5e0 "The operation couldn’t be completed. (Cocoa error 256.)"}
from zipzap.
I've tested the fix on your test case and it works -- all green.
Your test iOS app had been running out of memory because autorelease pools were not being drained quickly enough. I've made several changes to reduce the impact of these stagnant pools.
Do note, you shouldn't really be calling -[ZZArchive updateEntries:error:]
in a loop with each new entry, you should put everything you want in a single NSMutableArray
and then update with that. I don't know if that was intentional in your test case or just a quick and dirty way to trigger the bug.
from zipzap.
Interesting. Awesome, thank you for the fix!
And yeah, in the real code I do it in a single pass like that, don't worry.
from zipzap.
No worries. Also consider using the stream block methods instead of the data block methods if you're getting similar issues with even larger files.
from zipzap.
Related Issues (20)
- <ZipZap/ZZDataChannel.h> not found in UnitTest HOT 1
- Archives are corrupt on iOS 10.2 HOT 1
- No High Level APIs for Most Probable Use Cases HOT 3
- ZZArchiveEntry archiveEntryWithDirectoryName: Does Not Create Valid Entry
- ZZDeflateOutputStream write:maxLength erroneously returning zero HOT 1
- NSOutputStream write lose data when init with a non-text file
- [Bug] how to create a zip for symbol directory
- Module name is not consistent between Cocoapods and Carthage
- Lowering the deployment target
- Support iOS 9 HOT 2
- newDataWithError is nil
- Zipperdown security issue (Path traversal symbols not being ignored) HOT 2
- Unable to Build Xcode 10 Beta
- @"ZZOpenOptionsCreateIfMissingKey" - code: 0, archive succeeds HOT 1
- Archiving release version of ZipZap
- I hope to increase the encryption zip function. HOT 1
- New clang compiler complains tautology in this code HOT 1
- How to set the firstExtraField?
- Swift Package
- Not able to open Password protected file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zipzap.