Skip to content
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

Crash when trying to unzip file #42

Open
erwinl opened this issue Mar 16, 2016 · 2 comments
Open

Crash when trying to unzip file #42

erwinl opened this issue Mar 16, 2016 · 2 comments

Comments

@erwinl
Copy link

erwinl commented Mar 16, 2016

Hello, first of all thanks for the library.

When trying to unzip a zip file, it always crash for me on this step:

OZZipFile *unzipFile= [[OZZipFile alloc] initWithFileName:@"test.zip" mode:OZZipFileModeUnzip];

I double checked and the zip file is exist and can be unzipped correctly by OSX archiver. Zip file is created by OSX archiver.

It always crash on:
unzip.c > unzOpenInternal() line 577 unzGoToFirstFile((unzFile)s);

#0  0x00000001842bb7b8 in flockfile ()
#1  0x00000001842c7488 in fseek ()
#2  0x0000000100371ca0 in unzlocal_GetCurrentFileInfoInternal ()
#3  0x0000000100372d08 in unzGoToFirstFile ()
#4  0x000000010013a4bc in unzOpenInternal at /Users/Est/tiramisu/Pods/objective-zip/MiniZip/unzip.c:577
#5  0x000000010013a500 in unzOpen64 at /Users/Est/tiramisu/Pods/objective-zip/MiniZip/unzip.c:613
#6  0x0000000100130ff4 in -[OZZipFile initWithFileName:mode:legacy32BitMode:] at /Users/Est/tiramisu/Pods/objective-zip/Objective-Zip/OZZipFile.m:98
#7  0x0000000100130e20 in -[OZZipFile initWithFileName:mode:] at /Users/Est/tiramisu/Pods/objective-zip/Objective-Zip/OZZipFile.m:83
#8  0x0000000100131320 in -[OZZipFile initWithFileName:mode:error:] at /Users/Est/tiramisu/Pods/objective-zip/Objective-Zip/OZZipFile.m:134

Any idea why it crash when initializing the OZZipFile ? Thanks in advance.

@evands
Copy link

evands commented Aug 25, 2016

Several possibilities, but one thought: You're not specifying a full path; try [[NSBundle mainBundle] pathForResource:@"test" ofType:@"zip"] if this file is in your bundle, or the full path if you've downloaded it.

@erwinl
Copy link
Author

erwinl commented Aug 26, 2016

Hello @evands, I made sure that the zip file is there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants