原生Android崩溃-无效位图
Native Android Crash - Invalid Bitmap
我在Google Developer Console中获得崩溃报告,其中包含中止消息:"错误,无法访问此处无效/释放的位图!"下面的堆栈跟踪是到目前为止我所能得到的所有信息。这个问题只发生在Android 6.0设备(棉花糖)上。我无法在我的任何设备上重现这个问题。看到这种情况的用户甚至无法打开应用程序;因为这个错误涉及到位图,我在整个项目中寻找损坏的图像文件,但我没有找到任何。有什么建议吗?谢谢!
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint:'google/ryu/dragon:6.0.1/MXC89L/3084571:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 15550, tid: 15550, name: appname >>> com.domain.appname <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Error, cannot access an invalid/free'd bitmap here!'
x0 0000000000000000 x1 0000000000003cbe x2 0000000000000006 x3 0000000000000000
x4 0000000000000000 x5 0000000000000001 x6 0000000000000000 x7 0000000000000000
x8 0000000000000083 x9 000000000000003c x10 0000007fcd9a8e2c x11 0000007fcd9a8e68
x12 0000007fcd9a8d40 x13 0000000000000034 x14 0000007fcd9a8f18 x15 0000000000000000
x16 0000007b0b1996a8 x17 0000007b0b15caac x18 0000007b0b51c418 x19 0000007b0b59c0a8
x20 0000007b0b59bfe8 x21 000000000000000b x22 0000000000000006 x23 0000007b0c3f9900
x24 0000000000000000 x25 000000007081e970 x26 0000007fcd9a9928 x27 0000007fcd9a9950
x28 0000007af426d340 x29 0000007fcd9a8dd0 x30 0000007b0b15a248
sp 0000007fcd9a8dd0 pc 0000007b0b15cab4 pstate 0000000020000000
backtrace:
#00 pc 000000000006aab4 /system/lib64/libc.so (tgkill+8)
#01 pc 0000000000068244 /system/lib64/libc.so (pthread_kill+68)
#02 pc 0000000000021238 /system/lib64/libc.so (raise+28)
#03 pc 000000000001b9d8 /system/lib64/libc.so (abort+60)
#04 pc 000000000000ceec /system/lib64/libcutils.so (__android_log_assert+236)
#05 pc 00000000000e8720 /system/lib64/libandroid_runtime.so (_ZNK7android6Bitmap11assertValidEv+40)
#06 pc 00000000000e8804 /system/lib64/libandroid_runtime.so (_ZN7android6Bitmap11getSkBitmapEP8SkBitmap+20)
#07 pc 00000000000fa2b8 /system/lib64/libandroid_runtime.so
#08 pc 00000000730a6f84 /data/dalvik-cache/arm64/system@framework@boot.oat (offset 0x1eda000)
我还看到了这个堆栈跟踪,我猜它是相关的:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/j3xlteuc/j3xlteatt:6.0.1/MMB29K/J320AUCU1APC9:user/release-keys'
Revision: '0'
ABI: 'arm'
pid: 29403, tid: 29403, name: appname >>> com.domain.appname <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'Error, cannot access an invalid/free'd bitmap here!'
r0 00000000 r1 000072db r2 00000006 r3 b6fb2d9c
r4 b6fb2da4 r5 b6fb2d54 r6 0000000b r7 0000010c
r8 00000000 r9 b4924500 sl 12e7a280 fp 70c321e8
ip 00000006 sp bebb7540 lr b6d11501 pc b6d138f0 cpsr 400b0010
backtrace:
#00 pc 000428f0 /system/lib/libc.so (tgkill+12)
#01 pc 000404fd /system/lib/libc.so (pthread_kill+32)
#02 pc 0001cc4b /system/lib/libc.so (raise+10)
#03 pc 00019ec9 /system/lib/libc.so (__libc_android_abort+34)
#04 pc 00017550 /system/lib/libc.so (abort+4)
#05 pc 00008723 /system/lib/libcutils.so (__android_log_assert+86)
#06 pc 00090523 /system/lib/libandroid_runtime.so (android::Bitmap::assertValid() const+18)
#07 pc 0009059f /system/lib/libandroid_runtime.so (android::Bitmap::getSkBitmap(SkBitmap*)+6)
#08 pc 00099c35 /system/lib/libandroid_runtime.so
#09 pc 033768df /system/framework/arm/boot.oat (offset 0x2f4c000)
如果您的位图调用recycle()方法可能会崩溃。不要使用bitmap.recycle()方法。
相关文章:
- C / C++ 移位/偏移/向左或向右移动位图?
- 如何在快板的屏幕中显示子位图的绘制?
- CreateDIBSection为同一图像返回不一致的位图位值
- C++ 位图中的 ttc 字体
- 使用 GDI+ 旋转位图,然后转换为 HDC
- 难以从 CImageList 设置菜单项位图
- 如何将位图拉伸到父面板(wxWidgets 自定义)
- 如何使用 freetype2 访问单色位图中的像素状态
- 将位图 (bmp) 转换为具有透明度的 png (Windows c++)
- 安卓工作室 |CPP 文件错误错误: 位图库中对"AndroidBitmap_unlockPixels"的未定义引用
- 位图到垫子/2D 数组
- Gdiplus位图没有Alpha通道
- 如何从路径字符串加载Gdiplus::位图
- 在C++中使用Gdiplus创建透明位图
- 用C++压缩内存中的位图
- C++gdi::内存中的位图到PNG图像
- LoadImage 函数不适用于 ImageMagick 创建的位图图像
- (位图)LoadImage() 返回 NULL,GetLastError() 返回 0
- 将Qt qml文件转换为位图图像
- 原生Android崩溃-无效位图