HarmonyOS 鸿蒙Next 应用启动时报主题相关错误

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

HarmonyOS 鸿蒙Next 应用启动时报主题相关错误 部分报错信息如下:(信息太多无法一次发完)

Device info:HUAWEI MatePad Pro
Build info:PCE-W30 5.0.0.65(SP3C00E65R1P6)
Fingerprint:xxxxxxxxxxxxxxxxxxxxxx
Module name:xxx.xxx.xxx
Version:1.0.0.0
VersionCode:0
PreInstalled:No
Foreground:Yes
Timestamp:2024-10-11 15:59:02.285
Pid:33691
Uid:20020001
Process name:xxx.xxx.xxx
Process life time:4s
Reason:Signal:SIGSEGV(SEGV_MAPERR)@0x0000002fffffffd9 
Fault thread info:

Tid:33691, Name:x.xxx
#00 pc 00000000010175f4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::ThemeManagerImpl::GetTheme(unsigned long)+420)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#01 pc 0000000000816ab8 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::RefPtr<OHOS::Ace::NavigationBarTheme> OHOS::Ace::ThemeManager::GetTheme<OHOS::Ace::NavigationBarTheme>()+68)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#02 pc 00000000012063a4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::RefPtr<OHOS::Ace::NavigationBarTheme> OHOS::Ace::PipelineBase::GetTheme<OHOS::Ace::NavigationBarTheme>() const+48)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#03 pc 00000000015b5a9c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavDestinationModelNG::CreateBackButton(OHOS::Ace::RefPtr<OHOS::Ace::NG::NavDestinationGroupNode> const&)+416)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#04 pc 00000000015b6b0c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavDestinationModelNG::Create(std::__h::function<void ()>&&, OHOS::Ace::RefPtr<OHOS::Ace::NG::NavDestinationContext>)+1140)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#05 pc 00000000020e0030 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSNavDestination::Create(OHOS::Ace::Framework::JsiCallbackInfo const&)+2332)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#06 pc 00000000020e4eb0 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JsiClass<OHOS::Ace::Framework::JSNavDestination>::JSStaticMethodCallback(panda::JsiRuntimeCallInfo*)+156)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#07 pc 000000000050597c /system/lib64/platformsdk/libark_jsruntime.so(panda::Callback::RegisterCallback(panda::ecmascript::EcmaRuntimeCallInfo*)+388)(e3ed18a9883883ba2d09f7b139e04099)
#08 pc 0000000000343ca0 /system/lib64/module/arkcompiler/stub.an(RTStub_PushCallArgsAndDispatchNative+40)
#09 pc 0000000000000000 (anon:anon +0)
#10 pc 0000000000000000 (entry/src/main/ets/pages/main/MainPage.ets:238:3)
#11 pc 0000000000000000 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6768:1)
#12 pc 0000000000000000 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6809:1)
#13 pc 0000000000000000 (entry/src/main/ets/pages/main/MainPage.ets:238:3)
#14 pc 0000000000000000 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6465:1)
#15 pc 0000000000338ab8 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::InterpreterAssembly::Execute(panda::ecmascript::EcmaRuntimeCallInfo*)+276)(e3ed18a9883883ba2d09f7b139e04099)
#16 pc 000000000052b658 /system/lib64/platformsdk/libark_jsruntime.so(panda::FunctionRef::Call(panda::ecmascript::EcmaVM const*, panda::Local<panda::JSValueRef>, panda::Local<panda::JSValueRef> const*, int)+1160)(e3ed18a9883883ba2d09f7b139e04099)
#17 pc 00000000023dc008 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JsiFunction::Call(OHOS::Ace::Framework::JsiRef<OHOS::Ace::Framework::JsiValue>, int, OHOS::Ace::Framework::JsiRef<OHOS::Ace::Framework::JsiValue>* const) const+484)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#18 pc 0000000002262384 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::ViewFunctions::ExecuteRender()+776)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#19 pc 00000000021fee5c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSView::RenderJSExecution()+316)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#20 pc 0000000002207114 (a1ce9cbabbf6537d4af0fa89ed1cc756)
#21 pc 00000000011f910c (a1ce9cbabbf6537d4af0fa89ed1cc756)
#22 pc 00000000013bd59c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::CustomNode::Render()+472)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#23 pc 00000000020f698c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSNavigationStack::GetNavDestinationNodeInUINode(OHOS::Ace::RefPtr<OHOS::Ace::NG::UINode>, OHOS::Ace::RefPtr<OHOS::Ace::NG::NavDestinationGroupNode>&)+544)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#24 pc 00000000020f5dec (a1ce9cbabbf6537d4af0fa89ed1cc756)
#25 pc 00000000020f4f94 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSNavigationStack::CreateNodeByIndex(int, OHOS::Ace::WeakPtr<OHOS::Ace::NG::UINode> const&)+440)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#26 pc 0000000001587864 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavigationPattern::GenerateUINodeByIndex(int)+76)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#27 pc 0000000001586a90 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavigationPattern::UpdateNavPathList()+1428)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#28 pc 0000000001585274 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavigationPattern::SyncWithJsStackIfNeeded()+880)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#29 pc 00000000015905fc /system/lib64/platformsdk/libace_compatible.z.so(a1ce9cbabbf6537d4af0fa89ed1cc756)
#30 pc 0000000000aaadd8c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::PipelineContext::FlushBuildFinishCallbacks()+92)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#31 pc 0000000000aaaf50 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::PipelineContext::FlushVsync(unsigned long, unsigned int)+424)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#32 pc 0000000000a5bbfc /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::PipelineBase::OnVsyncEvent(unsigned long, unsigned int)+296)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#33 pc 0000000000a5dacc /system/lib64/platformsdk/libace_compatible.z.so(a1ce9cbabbf6537d4af0fa89ed1cc756)
#34 pc 00000000009849e4 /system/lib64/platformsdk/libace_compatible.z.so(std::__h::function<void (unsigned long, unsigned int)>::operator()(unsigned long, unsigned int) const+64)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#35 pc 0000000000984984 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Window::OnVsync(unsigned long, unsigned int)+64)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#36 pc 0000000000ba0e10 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::RosenWindow::OnVsync(unsigned long, unsigned int)+36)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#37 pc 0000000000ba1388 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::RosenWindow::RosenWindow(OHOS::sptr<OHOS::Rosen::Window> const&, OHOS::Ace::RefPtr<OHOS::Ace::TaskExecutor>, int)::$0::operator()(long, long) const::'lambda'()::operator()() const+192)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#38 pc 0000000000ba11cc /system/lib64/platformsdk/libace_compatible.z.so(a1ce9cbabbf6537d4af0fa89ed1cc756)
#39 pc 00000000000f9260 /system/lib64/libwm.z.so(OHOS::Rosen::VsyncStation::VsyncCallbackInner(long, long)+268)(aebda9d0370a80084ceef1d594c6161c)
#40 pc 00000000000f8f04 /system/lib64/libwm.z.so(OHOS::Rosen::VsyncStation::OnVsync(long, long, void*) (.cfi)+36)(aebda9d0370a80084ceef1d594c6161c)
#41 pc 000000000023270 /system/lib64/libvsync.z.so(OHOS::Rosen::VSyncCallBackListener::HandleVsyncCallbacks(long*, long)+680)(8000ac6290f3b353ec13555c1b5a4171)
#42 pc 000000000022f88 /system/lib64/libvsync.z.so(OHOS::Rosen::VSyncCallBackListener::OnReadable(int)+252)(8000ac6290f3b353ec13555c1b5a4171)
#43 pc 00000000001ef14 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(3e5f006930efda18e9b576b223e8e299)
#44 pc 00000000001ad8c /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::EventHandler::DistributeEvent(std::__h::unique_ptr<OHOS::AppExecFwk::InnerEvent, void (*)(OHOS::AppExecFwk::InnerEvent*)> const&)+1164)(3e5f006930efda18e9b576b223e8e299)
#45 pc 00000000002b580 /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*)>&)+348)(3e5f006930efda18e9b576b223e8e299)
#46 pc 00000000002ae58 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::(anonymous namespace)::EventRunnerImpl::Run()+880)(3e5f006930efda18e9b576b223e8e299)
#47 pc 00000000002ae1f8 /system/lib64/chipset-pub-sdk/libeventhandler.z.so(OHOS::AppExecFwk::EventRunner::Run()+524)(3e5f006930efda18e9b576b223e8e299)
#48 pc 00000000000b1d10 /system/lib64/platformsdk/libappkit_native.z.so(OHOS::AppExecFwk::MainThread::Start()+616)(c7230ce9ad3a7b090bb1ff24e406ceab)
#49 pc 0000000000004e30 /system/lib64/appspawn/appspawn/libappspawn_ace.z.so(RunChildProcessor(AppSpawnContent*, AppSpawnClient*)+568)(8c422d74c60203028b0c2e68dcae784f)
#50 pc 000000000000a4a4 /system/bin/appspawn(AppSpawnChild+484)(1aacf731c3bd3fd258c1e18ff8058380)
#51 pc 000000000000a194 /system/bin/appspawn(AppSpawnProcessMsg+688)(1aacf731c3bd3fd258c1e18ff8058380)
#52 pc 0000000000011bf4 /system/bin/appspawn(ProcessSpawnReqMsg+228)(1aacf731c3bd3fd258c1e18ff8058380)
#53 pc 0000000000011214 /system/bin/appspawn(OnReceiveRequest+172)(1aacf731c3bd3fd258c1e18ff8058380)
#54 pc 0000000000016058 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(HandleRecvMsg_+292)(2b138ba305788bab51bc3c2bc216b916)
#55 pc 0000000000015b58 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(HandleStreamEvent_+172)(2b138ba305788bab51bc3c2bc216b916)
#56 pc 0000000000013230 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(ProcessEvent+108)(2b138ba305788bab51bc3c2bc216b916)
#57 pc 0000000000012df0 /system/lib64/chipset-pub-sdk/libbegetutil.z.so(RunLoop_+356)(2b138ba305788bab51bc3c2bc216b916)
#58 pc 000000000000f39c /system/bin/appspawn(AppSpawnRun+136)(1aacf731c3bd3fd258c1e18ff8058380)
#59 pc 000000000000cd28 /system/bin/appspawn(main+744)(1aacf731c3bd3fd258c1e18ff8058380)
#60 pc 00000000000a07d0 /system/lib/ld-musl-aarch64.so.1(libc_start_main_stage2+64)(13a250ce91593ad3fa5545116dc8b451)

更多关于HarmonyOS 鸿蒙Next 应用启动时报主题相关错误的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html

5 回复

mark, 我也遇到同样崩溃, 求解

更多关于HarmonyOS 鸿蒙Next 应用启动时报主题相关错误的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


用这个脚本,把所有日志导出来看下,光看这个没看出啥来:

:: h00561938 get voip & meetime log
:: v1.2   2021-02
set ver_str=hmos
set date_time="%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%"
echo ####date_time =  %date%     %date_time%
set Folder="Log_%ver_str%_%date:~0,4%%date:~5,2%%date:~8,2%_%time:~0,2%%time:~3,2%%time:~6,2%"
echo ####start to get log to   (%CD%\%Folder%)...
mkdir %Folder%
hdc shell hilog -G -Q
hdc file recv /data/app/el2/100/base/com.example.myapplication/haps/entry/files/ %Folder%/
hdc hdc file recv /data/log/faultlog/faultlogger/ %Folder%/
hdc hdc file recv /data/log/faultlog/temp/ %Folder%/
pause

找HarmonyOS工作还需要会Flutter的哦,有需要Flutter教程的可以学学大地老师的教程,很不错,B站免费学的哦:BV1S4411E7LY/?p=17

还有一个空指针错误

Device info:HUAWEI MatePad Pro
Build info:PCE-W30 5.0.0.65(SP3C00E65R1P6)
Fingerprint:xxxxxxxx
Module name:xxx.xxx.xxx
Version:1.0.0.0
VersionCode:0
PreInstalled:No
Foreground:Yes
Timestamp:2024-10-12 13:58:50.684
Pid:16436
Uid:20020001
Process name:xxx.xxx.xxx
Process life time:3s
Reason:Signal:SIGSEGV(SEGV_MAPERR)@0x0000000000000008 probably caused by NULL pointer dereference
Fault thread info:
Tid:16436, Name:x.xxx
#00 pc 00000000015690fc /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavigationGroupNode::~NavigationGroupNode()+128)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#01 pc 00000000015695f4 /system/lib64/platformsdk/libace_compatible.z.so(virtual thunk to OHOS::Ace::NG::NavigationGroupNode::~NavigationGroupNode()+28)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#02 pc 00000000006e8a04 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::PipelineBase::~RefPtr()+104)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#03 pc 0000000001574c84 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::NG::NavigationModelNG::Create()+396)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#04 pc 00000000020e9bc4 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSNavigation::Create(OHOS::Ace::Framework::JsiCallbackInfo const&)+1432)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#05 pc 00000000020efc84 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JsiClassOHOS::Ace::Framework::JSNavigation::JSStaticMethodCallback(panda::JsiRuntimeCallInfo*)+156)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#06 pc 000000000050597c /system/lib64/platformsdk/libark_jsruntime.so(panda::Callback::RegisterCallback(panda::ecmascript::EcmaRuntimeCallInfo*)+388)(e3ed18a9883883ba2d09f7b139e04099)
#07 pc 0000000000343ca0 /system/lib64/module/arkcompiler/stub.an(RTStub_PushCallArgsAndDispatchNative+40)
#08 at anonymous (web/src/main/ets/components/WebContainerStack.ets:20:5)
#09 at updateFunc (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6768:1)
#10 at observeComponentCreation2 (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6809:1)
#11 at initialRender (web/src/main/ets/components/WebContainerStack.ets:19:3)
#12 at initialRenderView (/usr1/hmos_for_system/src/increment/sourcecode/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/stateMgmt.js:6465:1)
#13 pc 0000000000338ab8 /system/lib64/platformsdk/libark_jsruntime.so(panda::ecmascript::InterpreterAssembly::Execute(panda::ecmascript::EcmaRuntimeCallInfo*)+276)(e3ed18a9883883ba2d09f7b139e04099)
#14 pc 000000000052b658 /system/lib64/platformsdk/libark_jsruntime.so(panda::FunctionRef::Call(panda::ecmascript::EcmaVM const*, panda::Localpanda::JSValueRef, panda::Localpanda::JSValueRef const*, int)+1160)(e3ed18a9883883ba2d09f7b139e04099)
#15 pc 00000000023dc008 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JsiFunction::Call(OHOS::Ace::Framework::JsiRefOHOS::Ace::Framework::JsiValue const, int, OHOS::Ace::Framework::JsiRefOHOS::Ace::Framework::JsiValue* const)+484)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#16 pc 0000000002262384 /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::ViewFunctions::ExecuteRender()+776)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#17 pc 00000000021fee5c /system/lib64/platformsdk/libace_compatible.z.so(OHOS::Ace::Framework::JSView::RenderJSExecution()+316)(a1ce9cbabbf6537d4af0fa89ed1cc756)
#18 pc 0000000002207114 /system/lib64/platformsdk/libace_compatible.z.so(a1ce9cbabbf6537d4af0fa89ed1cc756)
#19 pc 00000000011f910c /system/lib64/platformsdk/libace_compatible.z.so(a1ce9cbabbf6537d4af0fa89ed1cc756)

针对HarmonyOS鸿蒙Next应用启动时报主题相关错误的问题,这通常与应用的资源文件或主题配置有关。以下是一些可能的解决方案方向,不涉及Java或C语言内容:

  1. 检查资源文件:确认应用的资源文件夹(如resources)中是否存在正确的主题配置文件,并且文件名和格式符合HarmonyOS的规范。主题配置文件通常定义了应用的界面风格、颜色等。

  2. 主题引用:在应用的配置文件或代码中检查是否正确引用了主题。如果引用了不存在的主题,应用启动时可能会报错。

  3. 兼容性检查:确保应用的主题配置与当前鸿蒙系统的版本兼容。有时系统更新后,旧的主题配置可能不再被支持。

  4. 清理和重建:尝试清理项目的构建缓存,并重新构建应用。这可以解决因构建过程中产生的错误或不一致导致的问题。

  5. 查看日志:详细查看应用启动时的系统日志,通常可以找到更具体的错误信息,有助于定位问题。

如果上述方法仍未解决问题,可能是应用代码或配置中存在更复杂的错误。此时,建议直接联系鸿蒙系统的官方技术支持。如果问题依旧没法解决请联系官网客服,官网地址是:https://www.itying.com/category-93-b0.html

回到顶部