-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
call method:"decompressFileAtPath:toPath:error:" crash #10
Comments
Ok, this doesn't give us anything to go off. Can you provide the crash you are getting? What is |
The code like this is ok: [QFZIP decompressFileAtPath:strPath1 toPath:strPath2 error:nil]; and the code like this will crash: NSError *decompressError = nil;
[QFZIP decompressFileAtPath:strPath1 toPath:strPath2 error:&decompressError]; Just give a error variable as the parameter. strPath1 = @"/var/mobile/Containers/Data/Application/A94B4EAC-5875-47AB-AC21-8437E72C6B78/Documents/Data/DownloadData.tar.gz"
strPath2 = @"/var/mobile/Containers/Data/Application/A94B4EAC-5875-47AB-AC21-8437E72C6B78/Documents/Data" and crash info is: Incident Identifier: 760F6AD2-6BC7-4E4C-A802-8FC60312ADF5
CrashReporter Key: 6971d8ae264d1f2f519b9ac7bbd6b1dba7a9a8a2
Hardware Model: iPhone7,2
OS Version: iPhone OS 8.3 (12F70)
Kernel version: Darwin Kernel Version 14.0.0: Sun Mar 29 19:42:54 PDT 2015; root:xnu-2784.20.34~2/RELEASE_ARM64_T7000
Date: 2016-01-26 17:19:01 +0800
Exception Code: 0xd1510c8d
Reason: Step count has rolled back!!
Thermal data unavailable
Frontmost process PID: 3194
Frontmost process PID: 54
Stackshot trace buffer size too small, trying again with 524288 bytes.
Jetsam Level: 0
Free Pages: 18232
Active Pages: 134789
Inactive Pages: 13616
Purgeable Pages: 796
Wired Pages: 52444
Speculative Pages: 17507
Throttled Pages: 0
File-backed Pages: 83496
Compressions: 92138
Decompressions: 13727
Compressor Size: 16028
Busy Buffer Count: 1
Pages Wanted: 0
Pages Reclaimed: 0 |
Hmm interesting. Do you have a stack trace? Not sure why providing a error would cause a crash, I don't see anything off hand that would cause that. |
looks like not stack trace, I used NSURLSession to download the gzip file from server, and then decompress it, the stack trace just like this: ![screen shot 2016-01-27 at 11 43 36 am](https://cloud.githubusercontent.com/assets/13899656/12603209/89027468-c4eb-11e5-9903-b1276caf4f27.png)
![screen shot 2016-01-27 at 11 43 19 am](https://cloud.githubusercontent.com/assets/13899656/12603212/9164a6da-c4eb-11e5-917d-09c4a43c64d6.png)
|
Hi, I guess this https://github.com/daltoniam/tarkit/blob/master/DCTar.m#L315 I changed it to nill and it will stop crashing. if(size == 0) {
[@"" writeToFile:filePath atomically:YES encoding:NSUTF8StringEncoding error:nil];
} |
@jinzhubaofu let me try. |
@jinzhubaofu it's helpful to me! |
would be better to change that to
|
for anyone coming to this from swift. The error param is automatically 'scooped' into the system, so you can't just set it to nil. I ended up just creating an objective C helper
which you can then call from Swift
|
when call the method and give a error parameters will crash.
like this:
you can try it.
The text was updated successfully, but these errors were encountered: