wasabeef / glide-transformations

An Android transformation library providing a variety of image transformations for Glide.
Apache License 2.0
9.9k stars 1.41k forks source link

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) crash spike after updating to 4.3.0 #196

Open antonb03 opened 3 years ago

antonb03 commented 3 years ago

After updating to 4.3.0 I saw a significant spike in crashes in the native library. I use BlurTransformation in my code and looks like the new version uses RenderScript to accomplish that which I suspect is causing an issue. Here is crashlog that I get.

backtrace:
  #00  pc 0000000000018bf8  /system/vendor/lib64/libRSDriver_adreno.so (rsdScriptSetGlobalVar(android::renderscript::Context const*, android::renderscript::Script const*, unsigned int, void*, unsigned long)+28)
  #00  pc 000000000003c6dc  /system/lib64/libRS_internal.so (android::renderscript::rsi_ScriptSetVarF(android::renderscript::Context*, void*, unsigned int, float)+68)
  #00  pc 0000000000042f50  /system/lib64/libRS_internal.so (android::renderscript::ThreadIO::playCoreCommands(android::renderscript::Context*, int)+680)
  #00  pc 00000000000272fc  /system/lib64/libRS_internal.so (android::renderscript::Context::threadProc(void*)+2152)
  #00  pc 0000000000099508  /system/lib64/libc.so (__pthread_start(void*)+36)
  #00  pc 0000000000023e18  /system/lib64/libc.so (__start_thread+68)
ryanZhange commented 3 years ago

crash by log

glide-disk-cach(31903)

SIGSEGV(SEGV_MAPERR) 1

00 pc 0000000000033848 /system/lib64/libRS_internal.so (android::renderscript::ObjectBase::decUserRef() const+20) [arm64-v8a::da3e09b46dec5afeaa9e038e75a0d7b1]

2

01 pc 000000000003f868 /system/lib64/libRS_internal.so (android::renderscript::ThreadIO::playCoreCommands(android::renderscript::Context*, int)+356) [arm64-v8a::da3e09b46dec5afeaa9e038e75a0d7b1]

3

02 pc 0000000000029b4c /system/lib64/libRS_internal.so (android::renderscript::Context::threadProc(void*)+1992) [arm64-v8a::da3e09b46dec5afeaa9e038e75a0d7b1]

4

03 pc 0000000000068544 /system/lib64/libc.so (__pthread_start(void*)+196) [arm64-v8a::048ed7ac2adc18ebf942ec734b8b4507]

5

04 pc 000000000001de40 /system/lib64/libc.so (__start_thread+16) [arm64-v8a::048ed7ac2adc18ebf942ec734b8b4507]

6 java:

hatem-72 commented 2 years ago

Hi, I also noticed a significant spike of crash after upgrading this library to 4.3.0. I also use the BlurTransformation inside my app. In fact I guess we are concerned by this part of the CHANGELOG --> - Remove support v8 renderscript (Please use BlurTransformation)

What does Please use BlurTransformation exactly mean ?

fengluoye2012 commented 2 years ago

回退到4.2.0版本就可以了 4.3.0使用了RenderScript类进行高斯模糊 会出现上面的崩溃;4.2.0版本使用的是java层的算法实现的高斯模糊 没有问题

moulie415 commented 2 years ago

Can confirm I'm on 4.3.0 and seeing the same issue, thank you @fengluoye2012 I will try downgrading to 4.2.0 and see what happens

hccya1988 commented 1 year ago

Downgrading to 4.2.0 will use fastbblur for blur bitmap, it is poor performance. Is there a better method to solve this issue?

DemaHamson commented 1 year ago

same issue SIGSEGV(SEGV_MAPERR) in some devices at 4.3.0 , Downgrading to 4.2.0 helped