Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashes as soon as I create a blur worker for live bluring #9

Open
huntj88 opened this issue Oct 12, 2017 · 1 comment
Open

crashes as soon as I create a blur worker for live bluring #9

huntj88 opened this issue Oct 12, 2017 · 1 comment
Labels

Comments

@huntj88
Copy link

huntj88 commented Oct 12, 2017

tried to create a new liveBlurWorker, but it crashes immediately with the stack trace below. I was attempting to use it in a recyclerView.

I even tried delaying the creation of it in case it relied on views being layed out.

made sure to put this in the default config

renderscriptTargetApi 20
renderscriptSupportModeEnabled true
Completable.complete().delay(2000,TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribeBy(onComplete = {
                val blurWorker = Dali.create(context).liveBlur(album_recycle,blur_view).downScale(8).assemble(true)
        })

relevant part of layout

<android.support.v7.widget.RecyclerView
        android:id="@+id/album_recycle"
        android:background="@color/white"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginBottom="24dp"
        app:layout_constraintBottom_toBottomOf="@+id/slide_handle_top"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <View
        android:id="@+id/blur_view"
        android:layout_width="0dp"
        android:layout_height="100dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />
10-11 22:08:43.669 1023-1023/me.huntj88.coolphotogrid I/Dali: Dali debug mode: false
10-11 22:08:43.689 1023-1023/me.huntj88.coolphotogrid V/RenderScript_jni: RS native mode
10-11 22:08:43.691 1023-1023/me.huntj88.coolphotogrid V/RenderScript_jni: Unable to load libRSSupportIO.so, USAGE_IO not supported
10-11 22:08:43.692 1023-1023/me.huntj88.coolphotogrid V/RenderScript_jni: Unable to load BLAS lib, ONLY BNNM will be supported: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/me.huntj88.coolphotogrid-2/base.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_dependencies_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_0_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_1_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_2_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_3_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_4_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_5_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_6_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_7_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_8_apk.apk", zip file "/data/app/me.huntj88.coolphotogrid-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/me.huntj88.coolphotogrid-2/lib/x86, /data/app/me.huntj88.coolphotogrid-2/base.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_dependencies_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_0_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_1_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_2_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_3_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_4_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_5_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_6_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_7_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_8_apk.apk!/lib/x86, /data/app/me.huntj88.coolphotogrid-2/split_lib_slice_9_apk.apk!/lib/x86, /system/lib, /vendor/lib]]] couldn't find "libblasV8.so"
10-11 22:08:44.008 1023-1023/me.huntj88.coolphotogrid D/AndroidRuntime: Shutting down VM
10-11 22:08:44.008 1023-1023/me.huntj88.coolphotogrid E/AndroidRuntime: FATAL EXCEPTION: main
                                                                          Process: me.huntj88.coolphotogrid, PID: 1023
                                                                          java.lang.IllegalArgumentException: y + height must be <= bitmap.height()
                                                                              at android.graphics.Bitmap.createBitmap(Bitmap.java:737)
                                                                              at android.graphics.Bitmap.createBitmap(Bitmap.java:701)
                                                                              at at.favre.lib.dali.builder.live.LiveBlurWorker.crop(LiveBlurWorker.java:104)
                                                                              at at.favre.lib.dali.builder.live.LiveBlurWorker.access$400(LiveBlurWorker.java:23)
                                                                              at at.favre.lib.dali.builder.live.LiveBlurWorker$BlurRunnable.run(LiveBlurWorker.java:86)
                                                                              at android.os.Handler.handleCallback(Handler.java:751)
                                                                              at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                              at android.os.Looper.loop(Looper.java:154)
                                                                              at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                              at java.lang.reflect.Method.invoke(Native Method)
                                                                              at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

@patrickfav patrickfav added the bug label Jul 30, 2018
@Sh0rxy
Copy link

Sh0rxy commented Jul 12, 2019

I know this is pretty late, but it still might help some people.

I had a similar issue, that puzzled me for a while.
The difference in my stack trace was, that the IllegalArgumentException mentioned:
x + width must be <= bitmap.width()

You may solve this problem if you assure, that when calling:
Dali.create(this).liveBlur(View unblurredContentView, View blurOntoView, View... blurOntoViewMore)

That the size of blurOntoView and blurOntoViewMore is not greater than the size of unblurredContentView.

That solved the error for me. I am not sure if the error occurs, if you dynamically resize the unblurredContentView, as it is not relevant for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants