1***@qq.com
1***@qq.com
  • 发布:2021-07-19 13:51
  • 更新:2022-09-12 15:12
  • 阅读:475

【报Bug】app上新闻长列表一直下拉,下拉大概20页后app闪退什么原因

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 10.12.6

HBuilderX类型: 正式

HBuilderX版本号: 3.1.18

手机系统: 全部

手机厂商: 苹果

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

App下载地址或H5⽹址: https://www.pgyer.com/9R2T

测试过的手机:

iphone7 版本14.5.1 三星sm-n950u1

示例代码:

崩溃日志:

2021/07/16 14:58:18 [crash] imei:023903ECAC60E89543553FAA482C1AC8 md:HUAWEI GRA-UL10 p:a os:21 net:3 vb:1.9.9.80859 mc: appid:UNI71D60DA appcount:1 wvcount:1 pn:com.lionmobo.matrix.news mem:240080kb etype:1 eurl: carsh_info:java.lang.OutOfMemoryError: Failed to allocate a 172436 byte allocation with 165369 free bytes and 161KB until OOM  
at java.lang.String.(String.java:332)  
at java.lang.String.(String.java:206)  
at com.taobao.weex.http.WXStreamModule.readAsString(WXStreamModule.java:275)  
at com.taobao.weex.http.WXStreamModule$2.onResponse(WXStreamModule.java:212)  
at com.taobao.weex.http.WXStreamModule$StreamHttpListener.onHttpFinish(WXStreamModule.java:397)  
at io.dcloud.feature.weex.adapter.DCWXHttpAdapter$1.run(DCWXHttpAdapter.java:99)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)  
at java.lang.Thread.run(Thread.java:831)  

2021/07/16 15:29:39 [crash] imei:023903ECAC60E89543553FAA482C1AC8 md:HUAWEI GRA-UL10 p:a os:21 net:3 vb:1.9.9.80859 mc: appid:UNI71D60DA appcount:1 wvcount:1 pn:com.lionmobo.matrix.news mem:239800kb etype:1 eurl: carsh_info:java.lang.OutOfMemoryError: Failed to allocate a 1881612 byte allocation with 591002 free bytes and 577KB until OOM  
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)  
at android.graphics.Bitmap.nativeCreate(Native Method)  
at android.graphics.Bitmap.createBitmap(Bitmap.java:847)  
at android.graphics.Bitmap.createBitmap(Bitmap.java:817)  
at android.graphics.Bitmap.createBitmap(Bitmap.java:784)  
at com.facebook.imagepipeline.memory.BucketsBitmapPool.alloc(BucketsBitmapPool.java:54)  
at com.facebook.imagepipeline.memory.BucketsBitmapPool.alloc(BucketsBitmapPool.java:29)  
at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:267)  
at com.facebook.imagepipeline.platform.DefaultDecoder.decodeFromStream(DefaultDecoder.java:212)  
at com.facebook.imagepipeline.platform.DefaultDecoder.decodeJPEGFromEncodedImageWithColorSpace(DefaultDecoder.java:152)  
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decodeJpeg(DefaultImageDecoder.java:177)  
at com.facebook.imagepipeline.decoder.DefaultImageDecoder$1.decode(DefaultImageDecoder.java:58)  
at com.facebook.imagepipeline.decoder.DefaultImageDecoder.decode(DefaultImageDecoder.java:121)  
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:277)  
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:124)  
at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:166)  
at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:202)  
at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:22)  
at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:73)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)  
at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:51)  
at java.lang.Thread.run(Thread.java:831)  

列表部分代码

<swiper-item class="swiper-item-box" v-for="(page, index) in tabList" :key="index">    
                    <list style="width: 690rpx" @scroll="scrollAppFun" @loadmore="scrolltolowerFun" enable-back-to-top="true" loadmoreoffset="100" :style="{height: swiperHeight + 'px'}">    
                        <cell class="swiper-item" v-for="(list, listIndex) in list[index].arr" :key="list.id">    
                            <news-item ref="newsItem" :videoPlayArr="videoPlayArr" :scrollTop="scrollTop" :index="index" :listIndex="listIndex" :list="list" :title="page.title" @videoPlayObj="videoPlayObj"></news-item>    
                        </cell>    

                        <cell>    
                            <text class="loading-text">{{loadingText}}</text>    
                        </cell>    
                    </list>    
                </view>    
            </swiper-item>   

操作步骤:

新闻列表页一直下拉加载20条左右,就会出现此bug

预期结果:

不卡并且不闪退

实际结果:

卡了并闪退了

bug描述:

连接手机 运行到手机,一直下拉加载列表,每页10条,大概加载20条之后,页面卡死几秒后闪退,并且到十几条的时候,页面的标题文字不显示,可能是没加载完,但是dom结构已经有了。测试了公司的几个ios android,均出现了上述问题。
后来我就用官方出的新闻demo用上述方法在手机上测试,也出现了闪退现象。

2021-07-19 13:51 负责人:无 分享
已邀请:
1***@qq.com

1***@qq.com

请问解决了么

该问题目前已经被锁定, 无法添加新回复