Libpng error: CgBI: unhandled critical chunk

I got an error like: “libpng error: CgBI: unhandled critical chunk”
with v3.0 alpha0.
I’ve searched about this error but there is no articles in this board and just a few in google.
This is a new error to me. The v3.0 alpha0-pre worked all well.
I’ve tested with iPhone 5 device and iPad mini device.
Could somebody tell me how could I solve this problem?

Thanks.

I’ve solved the problem by ‘create-multi-platform-projects.py’.
I made a new project template and registered all my sources to it.
But I still get an error messages as below:

libpng warning: iCCP: known incorrect sRGB profile

PNG images are not being shown correctly.
It seems that there are some problems about processing alpha of PNG.
I attach two shots and two original png source.

tested cocos2d-x version: v3.0 alpha0
devices: iPhone 5, iPad mini

If you get this error when trying your app on the device, you have PNG compression on in Xcode, in Xcode 4 goto “Build Settings” search for PNG in the search box and turn off PNG compression…

lefei hu wrote:

If you get this error when trying your app on the device, you have PNG compression on in Xcode, in Xcode 4 goto “Build Settings” search for PNG in the search box and turn off PNG compression…

It was already turned off like “compress png files: no”
But the errors were occurred

Have you solved the problem?
If yes… tell me the solution plz…
I totally trapped in this trouble as well
Thank you…

I’m having the same issue, the compress png setting is turned off but I the error still occurs. I just updated to Xcode 7.3 and iOS 9.3. My code works in simulator but not my iPhone. I’m trying to load a TMXTiledMap and make every tile into a sprite to be able to click on them.

This has a solution: https://github.com/cocos2d/cocos2d-x/issues/15199

1 Like

Thanks slackmoehrie :slight_smile:

Answer:
Under Build Settings

Set the following to NO
Compress PNG Images
Remove Text Metadata From PNG Files``

1 Like

Good looks.

I posted a warning about this setting vanishing if you don’t have a PNG in the root of Resources under XCode 7.3.1: