Can not unzip file with cocos::ZipFile(filePath)

yeah we have checked file there only, it just not unzipping.

we were using 3.17.0 and upgraded to 3.17.1

I don’t see any GitHub issues already open about this. You should make one.

If you revert to 3.17.0 does it start working again?

we have not tried with 3.17.0 after this issue, and have you tried this code, please check once and see you can help us :slight_smile:

So it was working in 3.17.0 is what I am asking?

yeah it was :slight_smile:

my advice is to go back to 3.17.0 for now. If this is a bug it wont be fixed right away, AFAIK.

thank you, I will try if you find out solution let us know

@parth3535 I’m almost certain it’s this issue and the fix is to update the cocos2d-x 3rd party libraries. Use v3-deps-156 since it seems to have worked for others.


@R101. Nice eyes, I didn’t see that. Thank you.

1 Like

thanks we will try it and let you know whatever happens

It’s an issue I came across when I updated my project to use v3.17.1 too, so it’s still fresh in my mind. :slight_smile: A few others seem to have come across it when they were trying to use OBB files on Android, but it’s a more general issue related to the 3rd party zip library.

@R101. I think we need to let users know this is a must step:

1 Like

Couldn’t agree more. I think there are several posts about this already from users asking for help. They won’t see it as an issue on Github either since it doesn’t show closed issues by default.

1 Like

i was gonna ask for this

we have run the command from coco2dx root

and it downloaded what should we do now? will it work

I don’t know if any versions prior had this fix. But download this and extract it overtop

okay… just one thing, i have to extract this and past in cocos2dx root right? or am i getting something wrong?

No, you can just copy it over your cocos2d-x root.

extract the archive

copy the contents of the cocos2d-x-3rd-party-libs-bin-3-deps-156 folder into your already existing external folder.

ohh okay, thanks


I’ve updated the external folder with cocos2d-x-3rd-party-libs-bin-3-deps-156 and now unzip is working fine. But a random crash is happening on unzipping the obb file on launch in release apk build. crash Log below

2019-07-18 13:07:26.825 16099-16351/? A/libc: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 16351 (GLThread 7272), pid 16099 (zplay.hexadrawn)
2019-07-18 13:07:26.934 30461-32092/? I/ActivityManager: START u0 { pkg=com.zplay.hexadrawn cmp=com.zplay.hexadrawn/ (has extras)} from uid 10387
2019-07-18 13:07:26.957 16359-16359/? A/DEBUG: pid: 16099, tid: 16351, name: GLThread 7272 >>> com.zplay.hexadrawn <<<
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #00 pc 0000000000596d88 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::unzReadCurrentFile(void*, void*, unsigned int)+476)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #01 pc 0000000000546464 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::ZipFile::getFileData(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, cocos2d::ResizableBuffer*)+236)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #02 pc 000000000040de8c /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::FileUtilsAndroid::getContents(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, cocos2d::ResizableBuffer*) const+588)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #03 pc 00000000004eae08 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::FileUtils::getDataFromFile(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&) const+88)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #04 pc 0000000000462278 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::experimental::AudioDecoderMp3::decodeToPcm()+60)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #05 pc 000000000045f8d4 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/ (cocos2d::experimental::AudioDecoder::start()+44)
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #06 pc 000000000043ac78 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #07 pc 000000000045e67c /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/
2019-07-18 13:07:26.973 16359-16359/? A/DEBUG: #08 pc 000000000045f308 /data/app/com.zplay.hexadrawn-C_kQsalybb-wzaiQHAJTSg==/lib/arm64/

Anyone help us, thanks