4

Happens only in 6.0 devices, the stack trace is as follows. I'm scaling images down by setting BitmapFactory.Options.inSampleSize, so my code is scaling png files. What that be an issue?

backtrace:
    #00  pc 000000000002c7d8  /system/lib64/libpng.so (sub_filter_2bpp_neon64+136)
    #01  pc 0000000000012da4  /system/lib64/libpng.so (png_read_row+440)
    #02  pc 0000000000013048  /system/lib64/libpng.so (png_read_rows+96)
    #03  pc 000000000028c024  /system/lib64/libskia.so (_ZN17SkPNGImageDecoder8onDecodeEP8SkStreamP8SkBitmapN14SkImageDecoder4ModeE+1692)
    #04  pc 000000000027f70c  /system/lib64/libskia.so (_ZN14SkImageDecoder6decodeEP8SkStreamP8SkBitmap11SkColorTypeNS_4ModeE+152)
    #05  pc 00000000000f6140  /system/lib64/libandroid_runtime.so
    #06  pc 00000000000f6a78  /system/lib64/libandroid_runtime.so
    #07  pc 0000000003497668  /system/framework/arm64/boot.oat
tactoth
  • 897
  • 1
  • 12
  • 24

1 Answers1

0

I got a Legacy project and after the first release some users started crashes. I spent three days searching. The problem was found very quickly when I got the problem device. As it turned out, I was looking at the wrong place because the project had many native libraries.

In my case, the problem was in the wrong PNG file in resources. This PNG was used for shadow in XML markup.

<View android:layout_width="fill_parent" 
      android:layout_height="8dp"
      android:background="@drawable/df_tab_bar_shadow"/>

The picture was 16-bit colors. I converted PNG to 32-bit colors and the problem is solved

krawa
  • 583
  • 6
  • 12