常规业务逻辑操作,没有特殊逻辑,也不是点什么操作必现
![web_zx](https://img-cdn-tc.dcloud.net.cn/account/identicon/260c44c1ee60944ce950a2d404d521ca.png)
- 发布:2024-08-19 14:57
- 更新:2024-08-19 15:05
- 阅读:174
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: Windows 11 专业版
HBuilderX类型: 正式
HBuilderX版本号: 4.24
手机系统: Android
手机系统版本号: Android 12
手机厂商: 华为
手机机型: HUAWEIMatePad SE
页面类型: vue
vue版本: vue2
打包方式: 云端
项目创建方式: HBuilderX
App下载地址或H5⽹址: https://www.pgyer.com/N4k0Fb
操作步骤:
预期结果:
无闪退情况
无闪退情况
实际结果:
应用内存溢出,崩溃闪退
应用内存溢出,崩溃闪退
bug描述:
用户侧反馈应用闪退,查看自定义日志发现没有多大意义。唯独抓取到几段如下错误:
The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | java.lang.OutOfMemoryError: Failed to allocate a 411166976 byte allocation with 25165824 free bytes and 262MB until OOM, target footprint 286306080, growth limit 536870912io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:69)
io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
java.lang.Thread.run(Thread.java:930)
Failed to allocate a 411166976 byte allocation with 25165824 free bytes and 262MB until OOM, target footprint 286306080, growth limit 536870912
![web_zx](https://img-cdn-tc.dcloud.net.cn/account/identicon/260c44c1ee60944ce950a2d404d521ca.png)
web_zx (作者)
问题勾选不太对
UniApp Android端 Vue3+ts 项目
Cli创建?
创建以 typescript 开发的工程(如命令行创建失败,请直接访问 gitee 下载模板)https://gitee.com/dcloud/uni-preset-vue/repository/archive/vite-ts.zip
使用该模板创建的项目
BFC
你好,是不是某个页面用了nvue,nvue页面有什么复杂逻辑么
2024-08-20 18:20
web_zx (作者)
回复 BFC: 沒有用NVUE。目前是Ts+Vue3+android插件交互
现在自己排查发现在
1、Vue3任意数据变更重绘都会增长内存,销毁后内存有回收,但不彻底
2、Android插件通过回调和JS交互也会导致内存增长,且有回收,但不彻底
长时间运行后会触发OOM,自动重启,且内存占用基本保持原状态,再使用较短时间重复触发OOM崩溃
2024-08-21 17:33
web_zx (作者)
回复 web_zx: 且我们应用是生理数据实时监测应用,会频繁的变更数据或重绘界面,毫秒级的
2024-08-21 17:34
web_zx (作者)
回复 BFC: 我注意到曾经有其他帖子也反映内存泄漏:https://ask.dcloud.net.cn/question/147905
2024-08-21 18:37