I upgraded to the Indie license, and am building a cocos2d app (v2) and it works great on all devices, even other Android 2.3 devices, but on the Kindle Fire 1st gen (2.3.3) it crashes and appears to have something to do with OpenGL shaders. Can anyone help point me in the right direction? I've tried
I can think of, I'm completely out of ideas here.
Program received signal SIGSEGV, Segmentation fault.
0x838ec0d0 in __wrap_glGetShaderSource () from /Users/mccarthy99/.apportable/SDK/Build/android-armeabi-debug/gpp/apk/lib/armeabi/libverde.so
(gdb) bt
#0 0x838ec0d0 in __wrap_glGetShaderSource () from /Users/mccarthy99/.apportable/SDK/Build/android-armeabi-debug/gpp/apk/lib/armeabi/libverde.so
#1 0x83a99fd0 in -[CCGLProgram initWithVertexShaderByteArray:fragmentShaderByteArray:] (self=0x4bd14c40, _cmd=0x83bdda6c <L_OBJC_METH_VAR_NAME_12>,
vShaderByteArray=0x83b8e685 '\t' <repeats 14 times>, "\nattribute vec4 a_position;\t\t\t\t\t\t\t\t\nattribute vec4 a_color;\t\t\t\t\t\t\t\t\t\n#ifdef GL_ES", '\t' <repeats 11 times>, "\nvarying lowp vec4 v_fragmentColor;\t\t\t\t\t\t\n#else", '\t' <repeats 13 times>, "\nvarying vec4 v_fragmentColor;\t\t\t\t"...,
fShaderByteArray=0x83b8e593 '\t' <repeats 13 times>, "\n#ifdef GL_ES\t\t\t\t\t\t\t\t\t\t\nprecision lowp float;\t\t\t\t\t\t\t\t\n#endif", '\t' <repeats 12 times>, "\n", '\t' <repeats 13 times>, "\nvarying vec4 v_fragmentColor;\t\t\t\t\t\t\n", '\t' <repeats 13 times>, "\nvoid main()", '\t' <repeats 11 times>, "\n{", '\t' <repeats 13 times>, "\n\tgl_FragColo"...)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCGLProgram.m:84
#2 0x83aebd84 in -[CCShaderCache loadDefaultShaders] (self=0x4aaee700, _cmd=0x83be3d2f <L_OBJC_METH_VAR_NAME_11>)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCShaderCache.m:121
#3 0x83aeba54 in -[CCShaderCache init] (self=0x4aaee700, _cmd=0x8153b557 <L_OBJC_METH_VAR_NAME_18>) at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCShaderCache.m:78
#4 0x83aeb744 in +[CCShaderCache sharedShaderCache] (self=0x83bad598 <OBJC_CLASS_$_CCShaderCache>, _cmd=0x83bdca49 <L_OBJC_METH_VAR_NAME_22>)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCShaderCache.m:41
#5 0x83b0afcc in -[CCTexture2D initWithData:pixelFormat:pixelsWide:pixelsHigh:contentSize:] (self=0x4aac59d0, _cmd=0x83bddf19 <L_OBJC_METH_VAR_NAME_38>, data=0x4c1f9000,
pixelFormat=kCCTexture2DPixelFormat_RGBA4444, width=256, height=32, size=...) at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCTexture2D.m:177
#6 0x83b0c44c in -[CCTexture2D(Image) initWithCGImage:resolutionType:] (self=0x4aac59d0, _cmd=0x83be764a <L_OBJC_METH_VAR_NAME_95>, cgImage=0x4aa87b20, resolution=kCCResolutioniPhone)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCTexture2D.m:440
#7 0x83b12078 in -[CCTextureCache addImage:] (self=0x4aaee540, _cmd=0x83bd5a4b <L_OBJC_METH_VAR_NAME_49>, path=0x83ba6400 <.L_unnamed_cfstring_136>)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCTextureCache.m:302
#8 0x83b0e554 in -[CCTextureAtlas initWithFile:capacity:] (self=0x4aabdf10, _cmd=0x83bdc9d0 <L_OBJC_METH_VAR_NAME_7>, file=0x83ba6400 <.L_unnamed_cfstring_136>, n=4)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCTextureAtlas.m:74
#9 0x83a89b1c in -[CCAtlasNode initWithTileFile:tileWidth:tileHeight:itemsToRender:] (self=0x47abb2e0, _cmd=0x83bdc98a <L_OBJC_METH_VAR_NAME_1>, tile=0x83ba6400 <.L_unnamed_cfstring_136>, w=12, h=32,
c=4) at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCAtlasNode.m:77
#10 0x83aa1ac4 in -[CCLabelAtlas initWithString:charMapFile:itemWidth:itemHeight:startCharMap:] (self=0x47abb2e0, _cmd=0x83bdd41f <L_OBJC_METH_VAR_NAME_137>,
theString=0x83ba63f0 <.L_unnamed_cfstring_134>, charmapfile=0x83ba6400 <.L_unnamed_cfstring_136>, w=12, h=32, c=46)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCLabelAtlas.m:76
#11 0x83a8eb18 in -[CCDirector createStatsLabel] (self=0x47aa6360, _cmd=0x83bdd1e9 <L_OBJC_METH_VAR_NAME_50>)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCDirector.m:630
#12 0x83a8d0e0 in -[CCDirector setView:] (self=0x47aa6360, _cmd=0x83bb77cf <L_OBJC_METH_VAR_NAME_186>, view=0x47ad0390)
at /Users/mccarthy99/2013PROJECTS/GPP/preschoolsafari/preschoolsafari/libs/cocos2d/CCDirector.m:318
#13 0x83b23098 in -[CCDirectorIOS setView:] (self=0x47aa6360, _cmd=0x83bb77cf <L_OBJC_METH_VAR_NAME_186>, view=0x47ad0390)
Basically it's crashing right around here in CCShaderCache.m:
p = [[CCGLProgram alloc] initWithVertexShaderByteArray:ccPositionColor_vert
fragmentShaderByteArray:ccPositionColor_frag];
[p addAttribute:kCCAttributeNamePosition index:kCCVertexAttrib_Position];
[p addAttribute:kCCAttributeNameColor index:kCCVertexAttrib_Color];
As soon as the first graphics are attempted to be added to the add, whether it's the cocos2d FPS stats ([CCDirector createStatsLabel]), or my own CCSprites being added.
And log cat shows a whole crap ton of these:
E/libEGL ( 7890): called unimplemented OpenGL ES API
E/libEGL ( 7890): called unimplemented OpenGL ES API
E/libEGL ( 7890): called unimplemented OpenGL ES API
etc...