android-stackblur icon indicating copy to clipboard operation
android-stackblur copied to clipboard

Native crashes being reported by users

Open riclage opened this issue 11 years ago • 2 comments

Hi,

I believe the following code is causing my app to crash on some devices:

StackBlurManager stackBlurManager = new StackBlurManager(normalBitmap);
blurredBitmap = stackBlurManager.processNatively(100);

I can't know for sure because native crashes do not provide any stack trace but there is just this one place in my code where I'm calling the method processNatively().

I'm not sure if it helps but here is the backtrace provided: #00 pc 0000156a /data/app-lib/.../libblur.so (stackblurJob+1713) #01 pc 00001b1d /data/app-lib/.../libblur.so (Java_com_enrique_stackblur_NativeBlurProcess_functionToBlur+96) #02 pc 00158a64 /data/dalvik-cache/data@[email protected]@classes.dex

This crash seems to happen regardless of API level (my app runs on 4.0+) or device. I get one crash report roughly every 2 days.

Any ideas on how I can debug this or at least catch the crash somehow?

Thank you, Ricardo

riclage avatar Oct 02 '14 18:10 riclage

Try the path from #29 pull request please. I also recommend to set the number of threads to 1. Multithread version is a little bit buggy now (#21)

illarionov avatar Oct 03 '14 09:10 illarionov

Thanks, will look into it. How do I set the number of threads?

I'm also trying to add the library https://github.com/xroche/coffeecatch to yours to catch exceptions within the native code and propagate it as a Java error. Maybe it's something you could look into as well.

riclage avatar Oct 03 '14 10:10 riclage