t***@163.com
t***@163.com
  • 发布:2021-11-25 11:26
  • 更新:2021-11-25 11:32
  • 阅读:510

【报Bug】app拍照闪退问题

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.2.16

手机系统: Android

手机系统版本号: Android 11

手机厂商: 小米

手机机型: 红米 noto 10

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

拍照闪退,app奔溃日志

预期结果:

拍照不闪退

实际结果:

拍照不闪退

bug描述:

2021/11/23 07:36:37 [crash] imei:9AFBA7E7F2D619BBD1D58344C6A62657 md:V1901A p:a os:28 net:6 vb:1.9.9.80895 mc: appid:UNIF0F783E appcount:1 wvcount:3 pn:com.sqy.staff mem:5768kb etype:1 eurl: carsh_info:java.lang.RuntimeException: Canvas: trying to use a recycled bitmap android.graphics.Bitmap@313a151
at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:69)
at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:226)
at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:164)
at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:549)
at android.widget.ImageView.onDraw(ImageView.java:1345)
at android.view.View.draw(View.java:20544)
at android.view.View.updateDisplayListIfDirty(View.java:19339)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.draw(View.java:20552)
at android.view.View.updateDisplayListIfDirty(View.java:19339)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at io.dcloud.common.core.ui.k.drawChild(SourceFile:2)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at io.dcloud.common.core.ui.a$l.dispatchDraw(SourceFile:1)
at android.view.View.draw(View.java:20552)
at android.view.View.updateDisplayListIfDirty(View.java:19339)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.updateDisplayListIfDirty(View.java:19330)
at android.view.View.draw(View.java:20233)
at android.view.ViewGroup.drawChild(ViewGroup.java:4565)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4336)
at android.view.View.draw(View.java:20552)
at com.android.internal.policy.DecorView.draw(DecorView.java:1376)
at android.view.View.updateDisplayListIfDirty(View.java:19339)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:801)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:3548)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3344)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2698)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1591)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7650)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1029)
at android.view.Choreographer.doCallbacks(Choreographer.java:834)
at android.view.Choreographer.doFrame(Choreographer.java:763)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1015)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7087)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928)

2021-11-25 11:26 负责人:无 分享
已邀请:
DCloud_Android_ST

DCloud_Android_ST

问题是必现的吗

  • t***@163.com (作者)

    最近奔溃日志有点多。偶现

    2021-11-25 11:49

  • t***@163.com (作者)

    昨天项目反馈了一下。后来手机重启后可以了,今天又不行了

    2021-11-25 11:50

  • DCloud_Android_ST

    回复 t***@163.com: 调用拍照的页面是vue还是nvue

    2021-11-25 11:53

  • t***@163.com (作者)

    回复 DCloud_Android_ST: vue。后台崩溃日志全部都是这个一共73次

    2021-11-25 11:59

  • DCloud_Android_ST

    回复 t***@163.com: 嗯 你的app如果操作复现问题 提供下我们尝试复现一下

    2021-11-25 12:00

  • t***@163.com (作者)

    回复 DCloud_Android_ST: 下午我整理一下哈,把代码打个包发给你。

    逻辑就是,app拍照后,添加canvas水印后保存到本地。也算是必现问题,就是闪退的时候会一直闪退

    2021-11-25 12:07

  • t***@163.com (作者)

    回复 DCloud_Android_ST: 大佬。我上传附件了。另外里面的拍照用的组件有两个,使用的是添加水印的哪个图片出错了

    2021-11-25 15:02

  • DCloud_Android_ST

    你这附件都是部分片段 我这没时间我去拼凑呀 要不就提供完整的示例 要不就告知用你的app复现步骤 节省双方时间

    2021-11-25 15:06

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