Hi,
So I finally got to testing my app on my hardware device, but it crashed, despite working on the emulator. So I went back to the helloworld sample which I built from scratch, and I got the same crash. However, running the same .apk file on a Samsung Galaxy S gti9000, running Android 2.2, works fine.
I’m using cocos2d-0.99.5-x-0.8.2. The device is an Archos 101 running Android 2.2.1 (archos firmware 2.3.26). As I said, I build the helloworld app from scratch, as described on your wiki page. I’m using NDK r5b.
The call stack is
04-22 14:24:40.164: INFO/DEBUG(1226): #00 pc 00011f54 /system/lib/libc.so
04-22 14:24:40.164: INFO/DEBUG(1226): #01 pc 000191fe /system/lib/libc.so
04-22 14:24:40.164: INFO/DEBUG(1226): #02 pc 000fb194 /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #03 pc 000fb07e /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #04 pc 000fb7a0 /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #05 pc 000fb70a /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #06 pc 000bddbc /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #07 pc 000bdcd6 /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #08 pc 000bda5c /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #09 pc 000ceff8 /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #10 pc 000cf2c6 /data/data/org.cocos2dx.application/lib/libcocos2d.so
04-22 14:24:40.172: INFO/DEBUG(1226): #11 pc 00003e54 /data/data/org.cocos2dx.application/lib/libhelloworld.so
04-22 14:24:40.180: INFO/DEBUG(1226): #12 pc 00016df4 /system/lib/libdvm.so
04-22 14:24:40.180: INFO/DEBUG(1226): #13 pc 00045244 /system/lib/libdvm.so
04-22 14:24:40.180: INFO/DEBUG(1226): #14 pc 0004a9aa /system/lib/libdvm.so
04-22 14:24:40.180: INFO/DEBUG(1226): #15 pc 00028f3c /system/lib/libdvm.so
Using arm-eabi-addr2line, the top part of the stack inside libcocos2d.so is
CCTexture2d.cpp line 441, which is the assert below:
tempData = (unsigned char*)(image->getData()); CCAssert(tempData != NULL, "NULL image data.");
Following the stack up, #06 is CCLabelTTF::setString’s call to texture->initWithString. Following up further, #10 is the call to CCLabelTTF::labelWithString from within CCDirector::setGLDefaultValues(). This is where it’s initialising the FPS counter.
I’m not totally sure where the problem is occuring, though I’d assume it’s probably something to do with initialising the font texture. Perhaps the font being used can’t be found, and there isn’t a fallback image to use?
Anyway, let me know if there’s any more information you could use to help identify the problem. I know these Archos tablets are pretty cheap, but it would be great to get it working on them…