I’m developing a game using cocos2d v2.0 beta2. Since i worked with iOS5.0 all was fine. Esterday I updated my macOS to last version, xCode from 4.2 to 4.3.1 and iPad’s OS from 5.0 to 5.1. Now I’m building my project, installing it to device (here I can see a splash screen), but then, I got this:
2012-03-12 10:26:32.495 squirrels[330:707] cocos2d: OS version: 5.1 (0x05010000)
2012-03-12 10:26:32.498 squirrels[330:707] cocos2d: GL_VENDOR: Imagination Technologies
2012-03-12 10:26:32.501 squirrels[330:707] cocos2d: GL_RENDERER: PowerVR SGX 543
2012-03-12 10:26:32.503 squirrels[330:707] cocos2d: GL_VERSION: OpenGL ES 2.0 IMGSGX543-63.24
2012-03-12 10:26:32.505 squirrels[330:707] cocos2d: GL_MAX_TEXTURE_SIZE: 4096
2012-03-12 10:26:32.507 squirrels[330:707] cocos2d: GL_MAX_TEXTURE_UNITS: 8
2012-03-12 10:26:32.508 squirrels[330:707] cocos2d: GL_MAX_SAMPLES: 4
2012-03-12 10:26:32.510 squirrels[330:707] cocos2d: GL supports PVRTC: YES
2012-03-12 10:26:32.511 squirrels[330:707] cocos2d: GL supports BGRA8888 textures: YES
2012-03-12 10:26:32.513 squirrels[330:707] cocos2d: GL supports NPOT textures: YES
2012-03-12 10:26:32.515 squirrels[330:707] cocos2d: GL supports discard_framebuffer: YES
2012-03-12 10:26:32.516 squirrels[330:707] cocos2d: compiled with Profiling Support: NO
2012-03-12 10:26:32.519 squirrels[330:707] cocos2d: cocos2d v2.0.0-beta2
2012-03-12 10:26:32.522 squirrels[330:707] cocos2d: Using Director Type:CCDirectorDisplayLink
2012-03-12 10:26:32.547 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: fps_images-ipad.png
2012-03-12 10:26:32.666 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureColor-ipad.vsh
2012-03-12 10:26:32.669 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionTextureColor.vsh
2012-03-12 10:26:32.673 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureColor-ipad.fsh
2012-03-12 10:26:32.674 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionTextureColor.fsh
2012-03-12 10:26:32.676 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
2012-03-12 10:26:32.678 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureColor-ipad.vsh
2012-03-12 10:26:32.680 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionTextureColor.vsh
2012-03-12 10:26:32.682 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureColorAlphaTest-ipad.fsh
2012-03-12 10:26:32.684 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionTextureColorAlphaTest.fsh
2012-03-12 10:26:32.686 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
2012-03-12 10:26:32.688 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionColor-ipad.vsh
2012-03-12 10:26:32.690 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionColor.vsh
2012-03-12 10:26:32.692 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionColor-ipad.fsh
2012-03-12 10:26:32.693 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionColor.fsh
2012-03-12 10:26:32.695 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
2012-03-12 10:26:32.698 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTexture-ipad.vsh
2012-03-12 10:26:32.699 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionTexture.vsh
2012-03-12 10:26:32.701 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTexture-ipad.fsh
2012-03-12 10:26:32.703 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionTexture.fsh
2012-03-12 10:26:32.704 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
2012-03-12 10:26:32.707 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTexture_uColor-ipad.vsh
2012-03-12 10:26:32.708 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionTexture_uColor.vsh
2012-03-12 10:26:32.710 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTexture_uColor-ipad.fsh
2012-03-12 10:26:32.712 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionTexture_uColor.fsh
2012-03-12 10:26:32.714 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
2012-03-12 10:26:32.716 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureA8Color-ipad.vsh
2012-03-12 10:26:32.718 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: PositionTextureA8Color.vsh
2012-03-12 10:26:32.721 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: PositionTextureA8Color-ipad.fsh
2012-03-12 10:26:32.722 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: PositionTextureA8Color.fsh
2012-03-12 10:26:32.724 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
OpenGL error 0x0501 in -[CCShaderCache loadDefaultShaders] 174
OpenGL error 0x0501 in -[CCTextureAtlas initVAO] 167
OpenGL error 0x0501 in -[CCTextureAtlas initVAO] 167
OpenGL error 0x0501 in -[CCDirector setView:] 308
2012-03-12 10:26:32:729 squirrels[330:707] Retina Display Not supported
2012-03-12 10:26:32.740 squirrels[330:707] cocos2d: animation started with frame interval: 60.00
2012-03-12 10:26:32.754 squirrels[330:707] cocos2d: surface size: 1024x768
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 472
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 472
2012-03-12 10:26:32.777 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: Position_uColor-ipad.vsh
2012-03-12 10:26:32.780 squirrels[330:707] cocos2d: ERROR: Failed to compile vertex shader: Position_uColor.vsh
2012-03-12 10:26:32.786 squirrels[330:707] cocos2d: CCFileUtils: Warning file not found: Position_uColor-ipad.fsh
2012-03-12 10:26:32.788 squirrels[330:707] cocos2d: ERROR: Failed to compile fragment shader: Position_uColor.fsh
2012-03-12 10:26:32.790 squirrels[330:707] cocos2d: ERROR: Failed to link program: 1
I can see a black screen (nothing was draw), and following errors block repeats multiple times in a second:
OpenGL error 0x0501 in DrawSolidPolygon 96
OpenGL error 0x0502 in DrawSolidPolygon 96
OpenGL error 0x0502 in DrawSegment 172
OpenGL error 0x0502 in DrawSegment 172
OpenGL error 0x0502 in -[CCSprite draw] 550
OpenGL error 0x0502 in -[CCSprite draw] 550
OpenGL error 0x0502 in -[CCSprite draw] 550
OpenGL error 0x0502 in -[CCSprite draw] 550
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 472
OpenGL error 0x0502 in -[CCTextureAtlas drawNumberOfQuads:fromIndex:] 472
I’ts all thr same on the device, and simulator 5.1. But is i’ll build this code from my old xCode 4.2, and 5.0 simulator, it rust fine. where is my problem?
Problem was is shader files. In some reason, xCode lost them. I deleted and added them againe to “copy bundle resources”, deleted my application from iPad, deleted all drivedData, clean and builed project, and it worked.