We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Cocos2dxBitmap.java的createTextBitmap可能引起宕机
Cocos2dxBitmap.java的createTextBitmap可能引起宕机
Bug #3459 [Closed]
Redmine issue system is closed, we are using github issue system instead.
This issue was moved to https://github.com/cocos2d/cocos2d-x/issues/8287
Status: | Closed | |
---|---|---|
Start date: | 2013-12-20 | |
Priority: | Low | |
Due date: | ||
Assignee: | - | |
% Done: | 0% |
|
Category: | - | |
Target version: | - |
final TextProperty textProperty = Cocos2dxBitmap.computeTextProperty(pString, pWidth, pHeight, paint);
final int bitmapTotalHeight = (pHeight == 0 ? textProperty.mTotalHeight: pHeight);
当pHeight为0时,textProperty.mTotalHeight可能也为0,这个时候Bitmap.createBitmap创建就是出错。使得Java_org_cocos2dx_lib_Cocos2dxBitmap_nativeInitBitmapDC回调时,转换共享内存中的数据为图片时宕机。