I am using v3.2 alpha release.
I am getting this error for Android :
A/libc(818): Fatal signal 11 (SIGSEGV) at 0x0000000c (code=1), thread 833 (Thread-56)
initialise 12-15 sprites from SpriteFrameCache !!!
Thats what i did i got the errorā¦
[ i subclassd my GameSprite from Sprite Class. Used that GameSprite and nothing else ]
[ i have 2 scheduler methods ]
[ i have 3 Touch methods (TouchBegan,TouchMoved,TouchEnded) ]
[ i have used Vector<> extensively with std::vector ]
Thats all there is in my game. And its working fine for iOS.
are you using new anyplace in your code? If so where? Can we see some code?
Also, please PM me directly, please donāt directly ping the developers. They have work to do! Let me coordinate these things with you and I can seek help as we need it.
No more movement in this postā¦ and in my android PORTā¦ i think i will need to launch my game as iOS only ā¦ sad but true ā¦
From now on i hate NDK ā¦ thats a worst thing Google Ever developedā¦NDK is drunk everytimeā¦
Thanks to Apple for giving full support for c++ 11 in xcode + making c++ code work with iOS flawflessly !
There are thousands of games made with cocos2d-x are are extremely successful.
There could have been some issue,
I am sure it will be solved, only patience is required.
Devs and other experts are there to help everyone, it may take a bit long to figure out
but surely something is fishy.
and may i remind you cocos2d-x is cross platform not platform independent
anyways.
im having the same problem.my images i get from a spritesheet. itās all working fine in iOS. but when i port it to eclipse for android build damn, it crashes and says "FATAL SIGNAL 11 " libc , , whatās happening? hopefully someday cocos2dx comes up with its own tools for android build and dont have to rely on Eclipse
Please show how you create a sprite and how does your resource folder look like in Xcode project? Is it blue?
Another option may be undefined behaviour somewhere in your code that doesnāt show itself on ios, but causes a crash on android. Try checking indexes, instantiation order etc
I managed to make it work! I dont blame ECLIPSE on this one, itās just that iOS tolerates my method of displaying sprite like:
(My āKeypadTileā is derived from Sprite )
KeypadTile* keypadbutton = (KeypadTile*)KeypadTile::create(ākeypadpic.pngā);// I am using Sprite classā ācreateā method, not my user-defined method.
addChiled(keypadbutton);
iOS still displays my picture. But when you port that to Android, it doesnt accept such way of coding. so I fixed it. HOW?
I made my own class of displaying a sprite image inside my KeypadClass class.
KeypadTile.cpp
KeypadTile* KeypadTile::createKeypadTileWithFileName(const char *fileName){
//create an object
KeypadTile sprite = new KeypadTile();
//if object createdā¦
// SpriteFrameCache cachetwo = SpriteFrameCache::getInstance();
// cachetwo->addSpriteFramesWithFile(āsunkenbuttons.plistā); // if PNG file and plist file have the same filename
if (sprite->initWithSpriteFrameName(fileName) ) {
//memory management o perations :)
sprite->autorelease();
//show object in the screen
return sprite;
}
//if up condition has mistakes, safely return NULL
CC_SAFE_DELETE(sprite);
return NULL;
Sprite ācreateā uses ānew Sprite()ā. You can recast it as (KeypadTile*) but it is not a KeypadTile object, it is a Sprite() object. So you must rewrite the ācreateā methodā¦