【HarmonyOS NEXT】设备显示白屏 syswarning happended in XXX
【HarmonyOS NEXT】设备显示白屏 syswarning happended in XXX
一、问题背景:
运行启动鸿蒙应用项目,设备显示白屏,IDE左下角提示syswarning happended in XXX设备名。
点击Jump to Log提示如下:
Device info:HUAWEI Mate 60 Pro
Build info:ALN-AL00 5.0.0.115(SP6C00E11)
Fingerprint:15d8cca67efbe7c67f21f8523f3a7b36c0d47b8ceee0d8f987
Module name:com.test.basedemo
Version:1.0.0
Foreground:Yes
Pid:28940
Uid:20020001
Reason:WINDOW_EXCEPTION_DETECTION
syswarning: WINDOW_EXCEPTION_DETECTION WINDOW_EXCEPTION_DETECTION at 2025020
DisplayPowerInfo:powerState:AWAKE
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DOMAIN:WINDOWMANAGER
STRINGID:WINDOW_EXCEPTION_DETECTION
TIMESTAMP:2025/02/07
PID:28940
UID:20020001
PACKAGE_NAME:
PROCESS_NAME:
*******************************************
start time: 2025/02/07
DOMAIN = WINDOWMANAGER
EVENTNAME = WINDOW_EXCEPTION_DETECTION
TIMESTAMP = 2025/02/07
PID = 28940
UID = 20020001
TID = 28940
PACKAGE_NAME =
PROCESS_NAME =
eventLog_action = cmd:w
eventLog_interval = 300
MSG = SetUIContent timeout uid: 20020001, windowName: basedemo0, bundleName: com.test.basedemo
catcher cmd: hidumper -s WindowManagerService -a -a
-------------------------------[ability]-------------------------------
----------------------------------WindowManagerService----------------------------------
-------------------------------------ScreenGroup 0-------------------------------------
WindowName DisplayId Pid WinId Type Mode Flag ZOrd Orientation [ x y w h ] [ OffsetX OffsetY ] [ ScaleX ScaleY PivotX PivotY ]
SCBScenePanel1 0 3143 3 2109 1 0 100 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
BackgroundBlurView2 0 3143 4 2109 1 0 101 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBWallpaper3 0 3143 5 2000 1 0 1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBDesktop4 0 3143 7 2001 1 0 2 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBGestureNavBar15 0 3143 18 2111 1 0 2200 0 [ 0 2577 1260 143 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBStatusBar16 0 3143 19 2108 1 0 2202 0 [ 0 0 1260 123 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBGestureBack20 0 3143 23 2111 1 0 4101 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBFormCenter24 0 3143 27 2135 1 0 2002 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
basedemo0 0 28940 79 1 1 0 102 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
---------------------------------------------------------------------------------------
SCBNegativeScreen5 0 3143 8 2126 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
SCBGlobalSearch6 0 3143 9 2125 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
GuidanceDialogScene7 0 3143 10 2109 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
SCBBannerNotificatio 0 3143 11 2106 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
BannerOrLiveManager9 0 3143 12 2109 1 0 -1 0 [ 0 0 0 0 ] [ 0 0 ] [ 1 1 0 0 ]
SCBGestureTopBar10 0 3143 13 2111 1 0 -1 0 [ 0 0 1260 123 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBSysDialogDefault1 0 3143 14 2104 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBScreenLockBouncer 0 3143 15 2110 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBScreenLock13 0 3143 16 2110 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBSystemTopPanel14 0 3143 17 2111 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBDropdownPanel17 0 3143 20 2109 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
SCBSysDialogUpper18 0 3143 21 2111 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBVolumePanel19 0 3143 22 2111 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
SCBSpacedGesture21 0 3143 24 2135 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
SCBSideEdgeBar22 0 3143 25 2135 1 0 -1 0 [ 0 312 1260 338 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBPrivacyIndicator2 0 3143 26 2127 1 0 -1 0 [ 0 0 1260 2720 ] [ 0 0 ] [ 1 1 0 0 ]
softKeyboard1 0 3640 28 2105 102 0 -1 0 [ 0 1700 1260 874 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBKeyboardPanel 0 3143 29 2134 1 0 -1 0 [ 0 1700 1260 1020 ] [ 0 0 ] [ 1 1 0.5 0.5 ]
SCBKeyboardDialog25 0 3143 38 2106 1 0 -1 0 [ 0 0 0 0 ] [ 0 0 ] [ 1 1 0 0 ]
Focus window: 79
Total window num: 32
Catcher log total time is 90ms
二、解决方案
方案一:
该问题是因为启动页没有注册导致,需要在路由表中添加路径(resources - base - profile - main_pages )
添加完成后,重新同步项目,启动即可正常加载。
方案二:
创建页面时,通过右键New - Page 进行创建,IDE会自动加入到路由表中。