Skip to content
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

调用 getValueMapFromFile 在华为 android os: 7.0 上闪退 #112

Open
Maxize opened this issue Aug 15, 2018 · 2 comments
Open

调用 getValueMapFromFile 在华为 android os: 7.0 上闪退 #112

Maxize opened this issue Aug 15, 2018 · 2 comments

Comments

@Maxize
Copy link
Contributor

Maxize commented Aug 15, 2018

version: 3.6.4
android os: 7.0
cellPhone: HuaWei Y7, P9, MediaPad T3 (only HuaWei)
crash log:

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> com.xxx.xxxx <<<

backtrace:
  #00  pc 000000000055a444  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZNKSt10_HashtableISsSt4pairIKSsN7cocos2d5ValueEESaIS4_ENSt8__detail10_Select1stESt8equal_toISsESt4hashISsENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb1ELb0ELb1EEEE19_M_find_before_nodeEjRS1_j+20)
  #01  pc 00000000006dcd80  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZNSt10_HashtableISsSt4pairIKSsN7cocos2d5ValueEESaIS4_ENSt8__detail10_Select1stESt8equal_toISsESt4hashISsENS6_18_Mod_range_hashingENS6_20_Default_ranged_hashENS6_20_Prime_rehash_policyENS6_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS1_+56)
  #02  pc 00000000007097c8  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d9DictMaker10endElementEPvPKc+1032)
  #03  pc 000000000070ae2c  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d9SAXParser10endElementEPvPKh+28)
  #04  pc 000000000070ae4c  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d12XmlSaxHander9VisitExitERKN8tinyxml210XMLElementE+24)
  #05  pc 000000000076b724  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZNK8tinyxml210XMLElement6AcceptEPNS_10XMLVisitorE+116)
  #06  pc 000000000076b60c  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZNK8tinyxml211XMLDocument6AcceptEPNS_10XMLVisitorE+84)
  #07  pc 000000000070b0dc  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d9SAXParser5parseEPKcj+92)
  #08  pc 000000000070b16c  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d9SAXParser5parseERKSs+88)
  #09  pc 00000000007083dc  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_ZN7cocos2d9FileUtils19getValueMapFromFileERKSs+1032)
  #10  pc 00000000003286b8  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (_Z42lua_cocos2dx_FileUtils_getValueMapFromFileP9lua_State+180)
  #11  pc 0000000000618bf4  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so
  #12  pc 0000000000607c64  /data/app/com.xxx.xxxx-1/lib/arm/libcocos2dlua.so (lua_pcall+32)

出现这个问题也好忧伤,不知道如何下嘴。
主要是这边没有复现且没有对应的设备。
但从日志上报上看,确实只有 华为 的机型才出现,网上也有人反馈说是华为系统底层的一些修改导致的问题,有没有老铁知道如何处理这一块。

之前猜想有可能是 hash_map 赋值出错。做了下面的操作。

// (*_curDict)[_curKey] = Value(false);

ValueMap::iterator it = _curDict->find(_curKey);
if (it != _curDict->end())
{
    it->second = Value(false);
}
else
{
    _curDict->insert(std::make_pair(_curKey, Value(false)));
}

好了,现在还是有问题,那么问题来了,是什么导致的?

@shengdoushi
Copy link
Contributor

Android 的配置是怎样的 (Application.mk)

APP_STL
NDK_TOOLCHAIN_VERSION

@Maxize
Copy link
Contributor Author

Maxize commented Jul 29, 2019

@shengdoushi APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION=4.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants