Crashes only on Kindle Fire (1st gen) which is Android 2.3.3

99 views
Skip to first unread message

mccar...@gmail.com

unread,
Mar 2, 2014, 6:22:59 PM3/2/14
to apportabl...@googlegroups.com
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 everything I can think of, I'm completely out of ideas here.

Here is the backtrace:

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...


Philippe Hausler

unread,
Mar 2, 2014, 6:33:39 PM3/2/14
to apportabl...@googlegroups.com, mccar...@gmail.com
The crashing from a shader makes sense if for some reason it is not recognizing that the surface chooser is needing OpenGLES2. Can you reproduce this in a simple example app? If so that would go a long way to finding an appropriate solution for this issue.
--
You received this message because you are subscribed to the Google Groups "Apportable discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

mccar...@gmail.com

unread,
Mar 2, 2014, 6:52:49 PM3/2/14
to apportabl...@googlegroups.com, mccar...@gmail.com
Good idea.  So to test that out I just created a new cocos2d 2.1 project, using the standard cocos2d app template in X-code.  The only change I made is to add a sprite, like this:
CCSprite *sp = [CCSprite spriteWithFile:@"Icon-72.png"];
        sp.position = ccp(size.width / 2.0, size.height / 2.0);
        [self addChild:sp];
But it didn't even make it that far.  It crashed in the same place that my other app crashes, the first time any texture is created and it sets up the shaders.  Crashed on the same line of code in fact. 

Is there anything else I can provide that would help figure this out?  Thanks in advance!
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-discuss+unsub...@googlegroups.com.

mccar...@gmail.com

unread,
Mar 2, 2014, 11:05:50 PM3/2/14
to apportabl...@googlegroups.com, mccar...@gmail.com
Interesting.  So I downgraded my apportable install to version 1.0.29 and it works now. That's a bit worrisome though, because I'd like to be using the latest and greatest, but do still need to support the 1st kindle fire...

Philippe Hausler

unread,
Mar 3, 2014, 12:35:25 AM3/3/14
to apportabl...@googlegroups.com, mccar...@gmail.com, mccar...@gmail.com
If you could attach your test project; we could take a look and figure out why it is failing. Likely the kindle incorrectly implements an api that we are using for our surface creation.
To unsubscribe from this group and stop receiving emails from it, send an email to apportable-disc...@googlegroups.com.

itiw

unread,
Jun 19, 2014, 8:49:46 AM6/19/14
to apportabl...@googlegroups.com
Hi, We are also facing the same problem with latest version of apportable.While we were using apportable 1.0.29, the problem with Kindle Fire (1st gen) android version 2.3.4 was not there.

Recently we upgrade our Apportable Indie version to 1.1.11, though we dont have any device (Kindle Fire 1st gen: android 2.3.4), but from analytics we can find that 100% people can not play our game in this device. Other devices running version 2.3.x works fine.

We don't have any way to downgrade our apportable version
We are using cocos2D version 3.1

Though it seems it's a problem of Kindle Fire(1st gen), will it be handled in apportable upcoming version?
Also is there any other solution by which we can fix this problem immediately?

Thanks
Shaon

Eric Slater

unread,
Jun 26, 2014, 8:24:31 PM6/26/14
to apportabl...@googlegroups.com
Hi itiw,

Please post on our forums under the Published Apps category with sample code that demonstrates the issue at hand. The response times are generally fast and we frequently look to the forums to find issues that need to be resolved in future releases.  Thanks for using Apportable!

All the best,
Eric
Reply all
Reply to author
Forward
0 new messages