HarmonyOS 鸿蒙Next 程序在虚拟机上不报错,在真机上总是cppcrash

发布于 1周前 作者 wuwangju 来自 鸿蒙OS

HarmonyOS 鸿蒙Next 程序在虚拟机上不报错,在真机上总是cppcrash

Reason:Signal:SIGSEGV(SEGV_MAPERR)@0x006e497265737518 

Fault thread info:

Tid:41872, Name:

#00 pc 0000000000fc1324 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::FocusNode::~FocusNode()+88)(c4ce101f277c4f81ae66144451421d94)

#01 pc 0000000000fc0ea4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::FocusNode::~FocusNode()+24)(c4ce101f277c4f81ae66144451421d94)

#02 pc 0000000000fc10b8 /system/lib64/platformsdk/libace_compatible.z.so(virtual thunk to OHOS::Ace::FocusNode::~FocusNode()+28)(c4ce101f277c4f81ae66144451421d94)

#03 pc 0000000001156fc0 /system/lib64/platformsdk/libace_compatible.z.so(c4ce101f277c4f81ae66144451421d94)

#04 pc 0000000000032b8c /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::InnerEvent::~InnerEvent()+204)(2255c54f4b2a5067783dd0d438fae4c7)

#05 pc 00000000000328e8 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::InnerEventPool::Drop(OHOS::AppExecFwk::InnerEvent*) (.cfi)+32)(2255c54f4b2a5067783dd0d438fae4c7)

#06 pc 000000000002d89c /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::(anonymous namespace)::EventRunnerImpl::ExecuteEventHandler(std::h::unique_ptr<OHOS::AppExecFwk::InnerEvent, void ()(OHOS::AppExecFwk::InnerEvent)>&)+848)(2255c54f4b2a5067783dd0d438fae4c7)

#07 pc 000000000002cf64 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::(anonymous namespace)::EventRunnerImpl::Run()+908)(2255c54f4b2a5067783dd0d438fae4c7)

#08 pc 0000000000030308 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::EventRunner::Run()+528)(2255c54f4b2a5067783dd0d438fae4c7)

#09 pc 00000000000aebb4 /system/lib64/platformsdk/libappkit_native.z.so(OHOS::AppExecFwk::MainThread::Start()+400)(609ed26bb19fdef3802b5e11bcdcbe00)

#10 pc 0000000000004e34 /system/lib64/appspawn/appspawn/libappspawn_ace.z.so(RunChildProcessor(AppSpawnContent*, AppSpawnClient*)+568)(fb19444fe406bd4b1f49564af1389d8f)

#11 pc 000000000000b9e4 /system/bin/appspawn(AppSpawnChild+576)(bab4a649871ef963538742f1ebbbbb80)

#12 pc 00000000000150e8 /system/bin/appspawn(ProcessSpawnReqMsg+2956)(bab4a649871ef963538742f1ebbbbb80)

#13 pc 0000000000013360 /system/bin/appspawn(OnReceiveRequest+132)(bab4a649871ef963538742f1ebbbbb80)

#14 pc 0000000000016cd0 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(HandleRecvMsg+344)(45236bc4e277c34897d485345eb2729e)

#15 pc 00000000000167a4 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(HandleStreamEvent+192)(45236bc4e277c34897d485345eb2729e)

#16 pc 0000000000013e84 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(ProcessEvent+88)(45236bc4e277c34897d485345eb2729e)

#17 pc 0000000000013a40 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(RunLoop_+308)(45236bc4e277c34897d485345eb2729e)

#18 pc 00000000000112d0 /system/bin/appspawn(AppSpawnRun+136)(bab4a649871ef963538742f1ebbbbb80)

#19 pc 000000000000ec3c /system/bin/appspawn(main+764)(bab4a649871ef963538742f1ebbbbb80)

#20 pc 00000000000a12c0 /system/lib/ld-musl-aarch64.so.1(libc_start_main_stage2+64)(8102fa8a64ba5e1e9f2257469d3fb251)

========SubmitterStacktrace========

#00 pc 0000000000013068 /system/lib64/platformsdk/libuv.so(uv_timer_start+128)(afecd0c8f506e5fc1661ef2cb46dea9d)

#01 pc 0000000000013700 /system/lib64/platformsdk/libuv.so(uv__run_timers+136)(afecd0c8f506e5fc1661ef2cb46dea9d)

#02 pc 0000000000016ee0 /system/lib64/platformsdk/libuv.so(uv_run+272)(afecd0c8f506e5fc1661ef2cb46dea9d)

#03 pc 000000000007cd90 /system/lib64/platformsdk/libruntime.z.so(OHOS::AbilityRuntime::OHOSLoopHandler::OnTriggered()+144)(c04cec88be96edc258a9019587945f5b)

#04 pc 000000000007d33c /system/lib64/platformsdk/libruntime.z.so(std::__h::__function::__func<OHOS::AbilityRuntime::OHOSLoopHandler::OnTriggered()::$_0, std::__h::allocator<OHOS::AbilityRuntime::OHOSLoopHandler::OnTriggered()::$_0>, void ()>::operator()() (.9efded9864dc55830f61b3b92d59beab)+56)(c04cec88be96edc258a9019587945f5b)

#05 pc 000000000001bdb8 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::EventHandler::DistributeEvent(std::__h::unique_ptr<OHOS::AppExecFwk::InnerEvent, void ()(OHOS::AppExecFwk::InnerEvent)> const&)+1144)(2255c54f4b2a5067783dd0d438fae4c7)

#06 pc 000000000002d6ac /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::(anonymous namespace)::EventRunnerImpl::ExecuteEventHandler(std::__h::unique_ptr<OHOS::AppExecFwk::InnerEvent, void ()(OHOS::AppExecFwk::InnerEvent)>&)+352)(2255c54f4b2a5067783dd0d438fae4c7)

#07 pc 000000000002cf68 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::(anonymous namespace)::EventRunnerImpl::Run()+912)(2255c54f4b2a5067783dd0d438fae4c7)

#08 pc 000000000003030c /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::EventRunner::Run()+532)(2255c54f4b2a5067783dd0d438fae4c7)

#09 pc 00000000000aebb8 /system/lib64/platformsdk/libappkit_native.z.so(OHOS::AppExecFwk::MainThread::Start()+404)(609ed26bb19fdef3802b5e11bcdcbe00)

#10 pc 0000000000004e38 /system/lib64/appspawn/appspawn/libappspawn_ace.z.so(RunChildProcessor(AppSpawnContent*, AppSpawnClient*)+572)(fb19444fe406bd4b1f49564af1389d8f)

#11 pc 000000000000b9e8 /system/bin/appspawn(AppSpawnChild+580)(bab4a649871ef963538742f1ebbbbb80)

#12 pc 00000000000150ec /system/bin/appspawn(ProcessSpawnReqMsg+2960)(bab4a649871ef963538742f1ebbbbb80)

#13 pc 0000000000013364 /system/bin/appspawn(OnReceiveRequest+136)(bab4a649871ef963538742f1ebbbbb80)

2 回复

贴这么多日志,但是看不出来报错原因,参考官网给你的cppCrash定位指南,先分析下呢。

https://developer.huawei.com/consumer/cn/doc/best-practices-V5/bpta-cppcrash-guidance-V5#section1757771016594

或则模拟器没问题,但是真机有问题,可以发下IDE版本和真机系统版本号,看下版本是否配套

针对您提到的HarmonyOS鸿蒙Next程序在虚拟机上不报错,但在真机上总是cppcrash的问题,这通常涉及到环境差异、资源限制或特定硬件兼容性问题。以下是一些可能的原因分析:

  1. 环境差异:虚拟机与真机在操作系统版本、硬件配置、内存管理等方面存在差异,可能导致某些代码在虚拟机上正常运行,在真机上则因资源不足或特定配置而出错。

  2. 硬件加速:真机可能启用了硬件加速功能,而虚拟机则通常不会。如果程序使用了与硬件加速相关的API,可能会导致cppcrash。

  3. 驱动兼容性:真机的驱动程序可能与虚拟机不同,某些特定的C++库或函数调用在真机上可能因驱动不兼容而崩溃。

  4. 资源限制:真机上的资源(如内存、CPU)可能不如虚拟机配置的理想,导致程序在资源紧张时崩溃。

  5. 权限问题:真机上的权限管理更严格,某些操作可能需要特定的权限,若未正确申请或授予,也可能导致程序崩溃。

建议仔细排查上述可能原因,并尝试在真机上使用调试工具(如ADB Logcat)获取更详细的崩溃信息。如果问题依旧没法解决请联系官网客服,官网地址是:https://www.itying.com/category-93-b0.html

回到顶部