2.4.3 龙骨动画原生平台闪退

龙骨版本是5.5
触发条件是第一次龙骨动画没问题 当对同一个龙骨组件加载另外一个龙骨动画直接闪退,web平台有警告 可以运行,原生直接闪退。
崩溃日志在这
--------- beginning of crash
2020-12-04 23:07:33.888 16932-16957/? A/libc: /Users/leon/Desktop/fishNative/Creator/cocos2d-x/cocos/editor-support/dragonbones/factory/BaseFactory.cpp:456: virtual dragonBones::Armature *dragonBones::BaseFactory::buildArmature(const std::string &, const std::string &, const std::string &, const std::string &) const: assertion “false” failed
2020-12-04 23:07:33.889 16932-16957/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 16957 (GLThread 7466), pid 16932 (ndier.fishstore)
2020-12-04 23:07:33.890 25666-25786/? D/MSF.C.NetConnTag: open /36.155.240.22:443 failed connError_unreachable costTime: 9 configTimeout: 8000 noneProxy cross:0
2020-12-04 23:07:33.945 17036-17036/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
2020-12-04 23:07:33.946 1011-1011/? I//system/bin/tombstoned: received crash request for pid 16957
2020-12-04 23:07:33.947 17036-17036/? I/crash_dump64: performing dump of process 16932 (target tid = 16957)
2020-12-04 23:07:33.962 17036-17036/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2020-12-04 23:07:33.962 17036-17036/? A/DEBUG: Build fingerprint: ‘google/walleye/walleye:10/QQ1A.191205.008/5974827:user/release-keys’
2020-12-04 23:07:33.962 17036-17036/? A/DEBUG: Revision: ‘MP1’
2020-12-04 23:07:33.962 17036-17036/? A/DEBUG: ABI: ‘arm64’
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: Timestamp: 2020-12-04 23:07:33+0800
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: pid: 16932, tid: 16957, name: GLThread 7466 >>> com.indier.fishstore <<<
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: uid: 10222
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: Abort message: ‘/Users/leon/Desktop/fishNative/Creator/cocos2d-x/cocos/editor-support/dragonbones/factory/BaseFactory.cpp:456: virtual dragonBones::Armature *dragonBones::BaseFactory::buildArmature(const std::string &, const std::string &, const std::string &, const std::string &) const: assertion “false” failed’
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x0 0000000000000000 x1 000000000000423d x2 0000000000000006 x3 000000785aff6410
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000010
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x8 00000000000000f0 x9 00000078e8ddb4e0 x10 0000000000000000 x11 0000000000000001
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x12 0000000000000008 x13 0000000000000018 x14 0000139496a3251f x15 0034d97df9acfc04
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x16 00000078e8ea78c0 x17 00000078e8e85060 x18 00000077fb55c000 x19 00000000000000ac
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x20 0000000000004224 x21 00000000000000b2 x22 000000000000423d x23 00000000ffffffff
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x24 00000077fdf7ec94 x25 00000077ff280f88 x26 000000760a131d59 x27 000000785aff9020
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: x28 00000076000095a0 x29 000000785aff64c0
2020-12-04 23:07:33.963 17036-17036/? A/DEBUG: sp 000000785aff63f0 lr 00000078e8e39170 pc 00000078e8e391a0
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: backtrace:
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: #00 pc 00000000000821a0 /apex/com.android.runtime/lib64/bionic/libc.so (abort+176) (BuildId: b58d049709674405423a8d8de1a37f56)
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: #01 pc 000000000008257c /apex/com.android.runtime/lib64/bionic/libc.so (__assert2+36) (BuildId: b58d049709674405423a8d8de1a37f56)
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: #02 pc 0000000001275bd4 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (dragonBones::BaseFactory::buildArmature(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&, 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&) const+156) (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: #03 pc 00000000012bfba8 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (dragonBones::CCFactory::buildArmatureDisplay(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&, 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&) const+72) (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.976 17036-17036/? A/DEBUG: #04 pc 00000000011ab7fc /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.977 17036-17036/? A/DEBUG: #05 pc 00000000011aadbc /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (js_cocos2dx_dragonbones_CCFactory_buildArmatureDisplayRegistry(v8::FunctionCallbackInfov8::Value const&)+296) (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.977 17036-17036/? A/DEBUG: #06 pc 0000000001a3a944 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo)+532) (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.977 17036-17036/? A/DEBUG: #07 pc 0000000001a39fa0 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.977 17036-17036/? A/DEBUG: #08 pc 0000000001a39774 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:33.977 17036-17036/? A/DEBUG: #09 pc 0000000001955268 /data/app/com.indier.fishstore-x8rzsAPTo2HB0VFIo5930g==/lib/arm64/libcocos2djs.so (BuildId: cc0d6d6e96fef07f6478462214e57b64e2f9e91e)
2020-12-04 23:07:34.164 898-962/? I/CHRE: @ 1121297.326: [ImuCal] [NanoSensorCal:GYRO_RPS] Offset | Temperature [C]: 0.005704, -0.000454, 0.021792 | 15.74

这个bug 影响挺恶劣的 导致不能替换动画,目前勉强用先removeComponent 再添加来绕过这个坑。 必现

加载另外一个龙骨的时候先:
this.dragonBone.dragonAsset = null;

this.dragonBone.dragonAtlasAsset = null;

this.dragonBone.armatureName =null;
再替换资源。

依然闪退 大佬请跟一下这个问题 挺严重的!异步加载 替换龙骨动画就会有这个问题

方便的话提供个demo,无法确定你的问题

1赞

我也遇到了解决了吗

貌似我也是这个问题 后来咋解决的?

Process: Simulator [80713]
Path: /Applications/CocosCreator/*/CocosCreator.app/Contents/Resources/cocos2d-x/simulator/mac/Simulator.app/Contents/MacOS/Simulator
Identifier: com.cocos.apps.simulator
Version: 20200927
Code Type: X86-64 (Native)
Parent Process: CocosCreator [79970]
Responsible: CocosCreator [66107]
User ID: 501

Date/Time: 2021-08-09 16:15:04.914 +0800
OS Version: Mac OS X 10.15.6 (19G2021)
Report Version: 12
Bridge OS Version: 4.6 (17P6610)
Anonymous UUID: 96ADB130-9527-BA8C-74A3-692614CAC393

Sleep/Wake UUID: C2AEB264-D867-4E0D-87AE-F03A853DD34A

Time Awake Since Boot: 990000 seconds
Time Since Wake: 25000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
Assertion failed: (false), function buildArmature, file /Users/nantas/jenkins/workspace/Creator_2D/cocos2d-x-lite/mac/cocos2d-x-lite/cocos/editor-support/dragonbones/factory/BaseFactory.cpp, line 456.

找到原因了,我这边的原因是你场景中有个对象加载了一个龙骨,这个龙骨是你在bundle里的,而这个bundle你是异步加载导致的,你可以先将这个对象的龙骨文件绑定删掉就不闪退了

你好,。那如果删除,龙骨资源的话,只能动态加载上去吗?

大佬,我用3.4.0遇到同样的问题,按你说的做了,网页端的警告消失了,原生android也不报这个错了,但是android上出现了新的错误:/bindings/jswrapper/Value.cpp:462: const std::string &se::Value::toString() const: assertion “_type == Type::String” failed,能帮忙看看么?

对的,既然是异步加载的,理所当然要动态加载绑定

我用的2.4哦 3.4没用过

this.dragonBone.dragonAsset = null;
this.dragonBone.dragonAtlasAsset = null;
this.dragonBone.armatureName =null;

3.4.2 Android 上也有这个问题,已经执行过上面这行了,只要替换龙骨就闪退,Logcat报的错误是:

/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so (se::Value::toString() const+76)
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so (_Z17sevalue_to_nativeINSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEENS0_9enable_ifIXaantsr3std7is_enumIT_EE5valuentsr3std10is_pointerIS8_EE5valueEbE4typeERKN2se5ValueEPS8_PNSB_6ObjectE+28)
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so (_Z17sevalue_to_nativeINSt6__ndk112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEELb1EEbRKN2se5ValueEP10HolderTypeIT_XT0_EEPNS7_6ObjectE+36)
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so (js_dragonbones_DragonBonesData_getArmatureRegistry(v8::FunctionCallbackInfo<v8::Value> const&)+304)
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so (v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo)+548)
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so
/data/app/com.test.td-hJ9qQWYo8XZ4VPd9_Env3g==/lib/arm64/libcocos.so