项目场景:
creator 2.2.2 场景加载报错:
安卓原生打包后 测试切换关卡场景时候 有的关卡卡死有的没问题 其他端无法重现
问题描述:
这里是引用2021-01-11 15:10:25.496 2335-2335/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: Build fingerprint: ‘OPPO/PACM00/PACM00:9/PPR1.180610.011/1592987698:user/release-keys’
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: Revision: ‘0’
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: ABI: ‘arm64’
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: pid: 792, tid: 1058, name: GLThread 1620 >>> com.xxx.xxx <<<
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x82685e5a3c
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x0 0000000000000004 x1 0000000000000004 x2 ffffffffffffffdc x3 0000007e685e5b50
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x4 0000007e685e5b6c x5 0000000000000004 x6 0000000000000000 x7 0000007ece8f5650
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x8 0000000000000004 x9 0000000000000004 x10 0000000000000002 x11 0000000000000004
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x12 0000000000000018 x13 0000000000000005 x14 00000000ffffffff x15 0000007e685e5a40
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x16 0000000000000004 x17 0000000000000004 x18 0000000000000031 x19 0000000000000030
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x20 0000000000000015 x21 0000000000000258 x22 000000000000004b x23 0000007e682da598
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x24 0000007e682da598 x25 0000007ecdfd2b30 x26 0000000000000006 x27 0000000000000002
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: x28 0000000000000006 x29 0000007ece8f54e0
2021-01-11 15:10:25.497 2335-2335/? A/DEBUG: sp 0000007ece8f5440 lr 0000007ecd4f42ec pc 0000007ecd4f43dc
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: backtrace:
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #00 pc 0000000000aa03dc /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::_parseZOrderFrame(rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&, unsigned int, unsigned int)+916)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #01 pc 0000000000a9ed9c /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::_parseTimeline(rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&, char const*, dragonBones::TimelineType, bool, bool, unsigned int, std::__ndk1::function<unsigned int (rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&, unsigned int, unsigned int)> const
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #02 pc 0000000000a9dd9c /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::_parseAnimation(rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&)+1416)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #03 pc 0000000000a97690 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::_parseArmature(rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&, float)+4760)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #04 pc 0000000000aa4258 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::_parseDragonBonesData(rapidjson::GenericValue<rapidjson::UTF8, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator> const&, float)+1276)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #05 pc 0000000000aa5194 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::JSONDataParser::parseDragonBonesData(char const*, float)+144)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #06 pc 0000000000a87224 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::BaseFactory::parseDragonBonesData(char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, float)+116)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #07 pc 0000000000aa9454 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (dragonBones::CCFactory::parseDragonBonesDataByPath(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator> const&, float)+472)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #08 pc 0000000000a308e8 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so (js_cocos2dx_dragonbones_CCFactory_parseDragonBonesDataByPathRegistry(v8::FunctionCallbackInfov8::Value const&)+468)
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #09 pc 0000000001015e24 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #10 pc 00000000010154d8 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so
2021-01-11 15:10:25.503 2335-2335/? A/DEBUG: #11 pc 0000000001014cec /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so
2021-01-11 15:10:25.504 2335-2335/? A/DEBUG: #12 pc 00000000003ffa28 /data/app/com.xxx.xxx-R9o2P0VVm2okBsfU5jr8Qg==/lib/arm64/libcocos2djs.so
2021-01-11 15:10:25.514 792-792/? I/chatty: uid=10182(com.xxx.xxx) identical 5 lines
原因分析:
查找发现出问题场景都同用了一个龙骨资源。C++的容错性比较低,龙骨发布使用二进制格式可以解决