Crash in cocos2d lib

I came across this log in our beta environment:

It looks like it came from ‘cocos2d:: Label:: Label’. I have never seen this log and cannot reproduce it in any known scenario. Any ideas? Maybe a fluke? Thanks

If any additional info is needed let me know.

# Platform: ios
# Date: 2018-12-11T00:21:00Z
# OS Version: 12.1.0 (16B92)
# Device: iPhone 7
# RAM Free: 4.3%
# Disk Free: 28.9%

#0. Crashed: com.apple.main-thread
0  libsystem_malloc.dylib         0x1acc5f774 nanov2_allocate_from_block$VARIANT$mp + 540
1  libsystem_malloc.dylib         0x1acc5e9d0 nanov2_allocate$VARIANT$mp + 140
2  libsystem_malloc.dylib         0x1acc5e8f4 nanov2_malloc$VARIANT$mp + 60
3  libsystem_malloc.dylib         0x1acc6d9a0 malloc_zone_malloc + 156
4  libsystem_malloc.dylib         0x1acc6e3b0 malloc + 32
5  libc++abi.dylib                0x1ac24862c operator new(unsigned long) + 44
6  libc++abi.dylib                0x1ac248668 operator new(unsigned long, std::nothrow_t const&) + 12
7  Fleets of Heroes               0x104ba43dc cocos2d::EventListenerCustom::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::function<void (cocos2d::EventCustom*)> const&) + 3208428
8  Fleets of Heroes               0x104b304b4 cocos2d::Label::Label(cocos2d::TextHAlignment, cocos2d::TextVAlignment) + 2733508
9  Fleets of Heroes               0x104b2fc20 cocos2d::Label::createWithSystemFont(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, float, cocos2d::Size const&, cocos2d::TextHAlignment, cocos2d::TextVAlignment) + 2731312
10 Fleets of Heroes               0x10464e8e8 NodeHelper::createGameLabelWithOutline(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int, cocos2d::Vec2, cocos2d::Vec2, cocos2d::Color3B, cocos2d::Color4B, int, bool) (NodeHelper.cpp:31)
11 Fleets of Heroes               0x10464e820 NodeHelper::createGameLabel(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int, cocos2d::Vec2, cocos2d::Vec2, cocos2d::Color3B) (NodeHelper.cpp:26)
12 Fleets of Heroes               0x104768b44 EquipmentIconNode::setup() (EquipmentIconNode.cpp:27)
13 Fleets of Heroes               0x104768a68 EquipmentIconNode::create(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) (EquipmentIconNode.cpp:19)

I’m not sure how often someone uses system font on a mobile device actually. Is this a common practice for you?

1 Like

I remember on some labels we had issues with emojis and certain characters that were resolved by using system font.
We have thousands of labels, and I have never seen this log over 2 years of testing. Just seemed kind of strange.
It is not reproducible in any of our builds for the project.

sorry just to clarify…thousands of labels that are system font?

1 Like

Yes, most of our labels are created from our NodeHelper class that creates a Label object with system font during the init process. There are no issues other than this 1 log ever seen. Like I said, I have all the builds and cannot reproduce so maybe it was some sort of fluke that happened.

Can you share your class privately? Or ping me if this is a more frequent occurrence?

100%, if I see it come up in production environment more than once I will PM you.