HarmonyOS 鸿蒙Next 通过首页跳转到展示页左划退回时APP崩溃问题
HarmonyOS 鸿蒙Next 通过首页跳转到展示页左划退回时APP崩溃问题
Build info:BRA-AL00 5.0.0.123(SP16C00E121R4P25log)
Fingerprint:724608382f376f3d5437be2fea70dcae21c722dd48f0e91b4f61a647393a6311
Module name:com.example.myapplication
Version:1.0.0
VersionCode:1000000
PreInstalled:No
Foreground:Yes
Timestamp:2025-01-13 20:24:59.662
Pid:35826
Uid:20020190
Process name:com.example.myapplication
Process life time:69s
Reason:Signal:SIGSEGV(SEGV_MAPERR)@0x0000000100000007
Fault thread info:
Tid:35826, Name:e.myapplication
#00 pc 00000000003533e0 /vendor/lib64/chipsetsdk/libhvgr_v200.so
#01 pc 000000000025f72c /vendor/lib64/chipsetsdk/libhvgr_v200.so
#02 pc 000000000031e4f0 /vendor/lib64/chipsetsdk/libhvgr_v200.so
#03 pc 0000000000384bd4 /vendor/lib64/chipsetsdk/libhvgr_v200.so
#04 pc 00000000002ee164 /vendor/lib64/chipsetsdk/libhvgr_v200.so(eglMakeCurrent+2544)
#05 pc 000000000003a340 /system/lib64/libEGL.so(OHOS::EglWrapperDisplay::InternalMakeCurrent(OHOS::EglWrapperSurface*, OHOS::EglWrapperSurface*, OHOS::EglWrapperContext*, bool, OHOS::EglWrapperContext*)+100)(1037725294778ca2a5638624c1b58a04)
#06 pc 000000000003a63c /system/lib64/libEGL.so(OHOS::EglWrapperDisplay::MakeCurrent(void*, void*, void*)+352)(1037725294778ca2a5638624c1b58a04)
#07 pc 000000000002ebe0 /system/lib64/libEGL.so(eglMakeCurrent+288)(1037725294778ca2a5638624c1b58a04)
#08 pc 000000000003012c /data/storage/el1/bundle/libs/arm64/libnativerender.so(EGLCore::CreateEnvironment()+264)(60f4dec8cd1a393a4d0180ae1fbeb606b54d954e)
#09 pc 000000000002ffd0 /data/storage/el1/bundle/libs/arm64/libnativerender.so(EGLCore::EglContextInit(void*, int, int)+596)(60f4dec8cd1a393a4d0180ae1fbeb606b54d954e)
#10 pc 00000000000312b0 /data/storage/el1/bundle/libs/arm64/libnativerender.so(OnSurfaceCreatedCB(OH_NativeXComponent*, void*)+412)(60f4dec8cd1a393a4d0180ae1fbeb606b54d954e)
#11 pc 0000000000e0ee44 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::XComponentPattern::OnSurfaceCreated()+484)(370a873be2e64e38a3628a1c01b543cf)
#12 pc 0000000002b47ca0 /system/lib64/platformsdk/libace_compatible.z.so(370a873be2e64e38a3628a1c01b543cf)
#13 pc 0000000000a33ea4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::TaskExecutor::PostSyncTask(std::__h::function<void ()>&&, OHOS::Ace::TaskExecutor::TaskType, std::__h::basic_string<char, std::__h::char_traits<char>, std::__h::allocator<char>> const&, OHOS::Ace::PriorityType) const+120)(370a873be2e64e38a3628a1c01b543cf)
#14 pc 0000000000bd7de4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::TaskExecutor::PostSyncTask(std::__h::function<void ()> const&, OHOS::Ace::TaskExecutor::TaskType, std::__h::basic_string<char, std::__h::char_traits<char>, std::__h::allocator<char>> const&) const+108)(370a873be2e64e38a3628a1c01b543cf)
#15 pc 0000000000c31354 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JsiDeclarativeEngine::FireExternalEvent(std::__h::basic_string<char, std::__h::char_traits<char>, std::__h::allocator<char>> const&, unsigned int, bool)+1072)(370a873be2e64e38a3628a1c01b543cf)
#16 pc 0000000000d24598 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::XComponentPattern::FireExternalEvent(OHOS::Ace::RefPtr<OHOS::Ace::NG::PipelineContext>, std::__h::basic_string<char, std::__h::char_traits<char>, std::__h::allocator<char>> const&, unsigned int, bool)+220)(370a873be2e64e38a3628a1c01b543cf)
#17 pc 00000000023f0d3c /system/lib64/platformsdk/libace_compatible.z.so(370a873be2e64e38a3628a1c01b543cf)
更多关于HarmonyOS 鸿蒙Next 通过首页跳转到展示页左划退回时APP崩溃问题的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
看您日志,报SIGSEGV(SEGV_MAPERR),访问不存在的内存地址或则空指针导致的。可以使用Asan工具,扫描下你们应用,检测下内存错误原因,然后进行分析修改。
CppCrash日志分析:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/cppcrash-guidelines-V5
更多关于HarmonyOS 鸿蒙Next 通过首页跳转到展示页左划退回时APP崩溃问题的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
定位到了一个代码行位置,但是没看出来具体怎么错的,能帮忙看下吗?
麻烦把你定位的代码发出来看下
有要学HarmonyOS AI的同学吗,联系我:https://www.itying.com/goods-1206.html
怎么发给你,给个邮箱看看
针对您提到的HarmonyOS 鸿蒙Next系统中,通过首页跳转到展示页后左划退回导致APP崩溃的问题,可能涉及以下几个方面的排查:
-
页面生命周期管理:检查首页与展示页之间的页面跳转逻辑,确保页面生命周期管理正确。特别是onPause、onResume、onDestroy等方法的调用顺序与资源释放是否合规。
-
内存管理:分析是否存在内存泄漏问题,导致在左划退回时因资源不足而崩溃。利用鸿蒙系统提供的内存分析工具进行排查。
-
动画与资源释放:若展示页使用了复杂的动画或大量资源,确保在页面销毁时这些资源得到正确释放。
-
系统兼容性:确认当前APP是否完全兼容HarmonyOS Next版本,包括API级别、系统特性等。
-
日志分析:查看崩溃日志,分析崩溃时栈帧信息,定位具体崩溃原因。
-
第三方库:若使用了第三方库,检查其版本是否与鸿蒙系统兼容,或是否存在已知bug。
如果问题依旧没法解决请联系官网客服,官网地址是:https://www.itying.com/category-93-b0.html。