Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- NSHomeDirectory
- Debug
- 태그를 입력해 주세요.
- LLVM
- /var/mobile/Applications
- xib
- Derived Data
- SBTarget
- Xcode
- scale
- CCLOG
- UIView
- 멀티태스킹
- release
- landscape
- Undefined symbols for architecture armv7s
- ccbi
- storyboard
- box2d
- cocos2d-x
- .svn
- Default-568h.png
Archives
- Today
- Total
standwally
CCControlButton 관련 버그(Signal 11) 본문
CCControlButton 사용시,
일부 안드로이드 단말에서 Signal 11 에러가 발생하면서 앱이 튕기는 현상이 있다.
- 개발 환경
- cocos2d-x 2.1.4
- android sdk 4.0.4
- Samsung 갤럭시 S2
아래 코드와 같이, CCControlButton을 create할 때, CCLabel 인스턴스를 만들어서 같이 매개변수로 전달해주지 않으면
다음 에러를 찍으면서 앱이 죽는다.
// on "init" you need to initialize your instance bool HelloWorld::init() { ////////////////////////////// // 1. super init first if ( !CCLayer::init() ) { return false; } CCScale9Sprite *pScale9Sprite = CCScale9Sprite::create("CloseNormal.png", cocos2d::CCRect(0.0f, 0.0f, 256.0f, 256.0f)); #define CCLableTTF #ifdef CCLableTTF CCLabelTTF *pLabel = CCLabelTTF::create("Test", "Helvetica", 11); CCControlButton *pControlButton = CCControlButton::create(pLabel, pScale9Sprite); #else CCControlButton *pControlButton = CCControlButton::create(pScale9Sprite); #endif pControlButton->setPosition(ccp(100.0f, 100.0f)); this->addChild(pControlButton); return true; }