-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix FontAtlas crash on some Android devices #18145
Conversation
@@ -111,6 +111,8 @@ class CC_DLL FontAtlas : public Ref | |||
protected: | |||
void reset(); | |||
|
|||
void reinit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to set this file to 100755?
i think it was mistake |
@@ -132,6 +146,8 @@ void FontAtlas::reset() | |||
_currentPageOrigX = 0; | |||
_currentPageOrigY = 0; | |||
_letterDefinitions.clear(); | |||
|
|||
reinit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why need to reinit when it is destroyed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be its wrong and this code is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is not needed, then there is not difference from previous codes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, it is my fault, it is added in reset
. The github diff doesn't look good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is just adapted code form @SBJoker
i have tested this code in my game and it fixes crash
@@ -132,6 +146,8 @@ void FontAtlas::reset() | |||
_currentPageOrigX = 0; | |||
_currentPageOrigY = 0; | |||
_letterDefinitions.clear(); | |||
|
|||
reinit(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be its wrong and this code is not needed
* commit 'e79f21cec02ebbffbf08150708ed26e524c1faf2': add new CMakeLists.txt to cpp-template-default (https://gist.github.com/MrCapone/ccdc1826cb7362086107e8096bfe6f90) (cocos2d#18167) Fixes compilation errors for android audio module while building with x86 arch. (cocos2d#18150) fixed GLViewImpl::getMonitorSize() for desktop platforms (cocos2d#18141) [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#18183) Fix android problem (cocos2d#18142) fix for ios audio engine (cocos2d#18146) fix android problem with 24 bit depth buffer on some devices (cocos2d#18148) Blend function for UIImageView (cocos2d#18149) Fix alpha blending during the animation of TransitionCrossFade. (cocos2d#18175) fixed cocos2d#17989: touch stops responding on android devices. (cocos2d#18165) [ci skip]update version and readme (cocos2d#18169) fix FontAtlas crash on some Android devices (cocos2d#18145) Add game-controller-test for win32 (cocos2d#18164) Fix android compile fail bug (cocos2d#18166) # Conflicts: # cocos/audio/android/cutils/bitops.h # cocos/audio/apple/AudioEngine-inl.mm
fix #17390