当前位置: 首页 > article >正文

ios 混合开发应用白屏问题

一、问题场景

项目业务中某个前端页面中使用了多个echart 组件来显示历史数据, 在反复切换到这个页面后,会出现白屏问题。

二、问题分析

0x116000ab0 - GPUProcessProxy::didClose:

0x116000ab0 - GPUProcessProxy::gpuProcessExited: reason=Crash

0x1150180c0 - [PID=3342] WebProcessProxy::gpuProcessExited: reason=Crash

Error acquiring assertion: <Error Domain=RBSServiceErrorDomain Code=1 "((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))" UserInfo={NSLocalizedFailureReason=((target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.rendering AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.networking AND target is not running or doesn't have entitlement com.apple.developer.web-browser-engine.webcontent))}>

0x1150243c0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=3343, error: (null)

Failed to terminate process: Error Domain=com.apple.extensionKit.errorDomain Code=18 "(null)" UserInfo={NSUnderlyingError=0x30128cb40 {Error Domain=RBSRequestErrorDomain Code=3 "No such process found" UserInfo={NSLocalizedFailureReason=No such process found}}}

Failed to terminate process: Error Domain=com.apple.extensionKit.errorDomain Code=18 "(null)" UserInfo={NSUnderlyingError=0x30128ec40 {Error Domain=RBSRequestErrorDomain Code=3 "No such process found" UserInfo={NSLocalizedFailureReason=No such process found}}}

在切换页面的过程中看到如上日志,感觉是跟图形渲染相关的进程已经出问题了,

在出现白屏的时候,是如下日志:

 

0x116000ab0 - GPUProcessProxy::didClose:

0x116000ab0 - GPUProcessProxy::gpuProcessExited: reason=Crash

0x1150180c0 - [PID=3342] WebProcessProxy::gpuProcessExited: reason=Crash

0x104d70408 - WebProcessPool::gpuProcessDidExit: GPU Process has crashed more than 2 times in the last 30 seconds, terminating all WebProcesses

0x104d70408 - WebProcessPool::terminateAllWebContentProcesses

Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>

0x1150180c0 - [PID=0] WebProcessProxy::didClose: (web process 0 crash)

0x1150180c0 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash

0x1150243c0 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'GPUProcess Background Assertion' for process with PID=3361, error: (null)

Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>

0x115024600 - ProcessAssertion::acquireSync Failed to acquire RBS assertion 'XPCConnectionTerminationWatchdog' for process with PID=0, error: (null)

0x104d6c018 - [pageProxyID=10, webPageID=11, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason=Crash

0x104d6c018 - [pageProxyID=10, webPageID=11, PID=0] WebPageProxy::dispatchProcessDidTerminate: reason=Crash

webViewWebContentProcessDidTerminate

从日志中可以看出webview 已经调用 webViewWebContentProcessDidTerminate 这个方法,进程都终止了。

在网上搜索了各种白屏问题,例如:

深入理解WKWebView白屏_webviewwebcontentprocessdidterminate-CSDN博客

感觉最终的处理方式也只有reload 了

//进程被终止时调用

- (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView{

    [webView reload];

    NSLog(@"webViewWebContentProcessDidTerminate");

}

 

不知道是不是苹果Safari 和 Chrome 里面的机制有差别,在电脑上运行同样的H5页面切换,明显感觉到Safari 要慢一下,感觉卡一些。


http://www.kler.cn/a/442073.html

相关文章:

  • vscode离线安装插件--终极解决方案
  • ASP.NET Core - 配置系统之自定义配置提供程序
  • 20250118-读取并显示彩色图像以及提取彩色图像的 R、G、B 分量
  • hydra破解密码
  • python编程-OpenCV(图像读写-图像处理-图像滤波-角点检测-边缘检测)边缘检测
  • C语言编程笔记:文件处理的艺术
  • 健康养生:拥抱生活的艺术
  • 【C++】explicit关键字详解(explicit关键字是什么? 为什么需要explicit关键字? 如何使用explicit 关键字)
  • Linux Shell 脚本编程基础知识篇
  • VUE的缓存问题
  • 搭建分布式Hive集群
  • 【C语言程序设计——入门】基本数据类型与表达式(头歌实践教学平台习题)【合集】
  • WPF ControlTemplate 控件模板
  • vue3+fastAPI最简单例子
  • 小主机大用途:香橙派使用Docker轻松搭建Lsky Pro图床实操教程
  • vue 自定义组件image 和 input
  • AWTK-WEB 快速入门(1) - C 语言应用程序
  • 【动态规划】多歧路 , 今安在? - 路径问题
  • 监控视频汇聚融合云平台一站式解决视频资源管理痛点
  • 大数据治理:开启数据价值挖掘之旅
  • Node的学习以及学习通过Node书写接口并简单操作数据库
  • 后台管理系统权限功能菜单和按钮权限如何实现的
  • 【附件】Selenium chromedriver 驱动及浏览器下载
  • windows C#-命名实参和可选实参(上)
  • 【mysql】如何查看大表记录行数
  • P8795 [蓝桥杯 2022 国 A] 选素数