We developed a game using cocos2dx framework. Our app crashed in following line (not all the time, around 1 in 20 times). Can you please help us to identify the issue.
CCUserDefault::sharedUserDefault()->setIntegerForKey("NetWorth", netWorth);
CCUserDefault::sharedUserDefault()->flush();
crash log: Crashed: CFPreferences Background Sync Queue EXC_BAD_ACCESS UNKNOWN at 0x006a5936 raw 0 CoreFoundation __CFTypeCollectionRetain + 7 1 CoreFoundation _CFArrayReplaceValues + 260 2 CoreFoundation _CFArrayReplaceValues + 260 .... OilTycoon GamePlayScene.cpp line 11525 GamePlayScene::getNetWorth()