stream-chat-android icon indicating copy to clipboard operation
stream-chat-android copied to clipboard

Crash when loading channel list

Open Chikrix opened this issue 6 years ago • 1 comments

I updated to the latest version of the library 4.2.5 and changed from AvatarViewGroup to AvatarView and since then the app crashes when I try to load the channel list, I get the error

java.lang.IllegalArgumentException: width and height must be > 0
        at android.graphics.Bitmap.createBitmap(Bitmap.java:1033)
        at android.graphics.Bitmap.createBitmap(Bitmap.java:1000)
        at android.graphics.Bitmap.createBitmap(Bitmap.java:950)
        at android.graphics.Bitmap.createBitmap(Bitmap.java:911)
        at com.getstream.sdk.chat.view.AvatarView.createImageRounded(AvatarView.kt:87)
        at com.getstream.sdk.chat.view.AvatarView.createBitmap(AvatarView.kt:68)
        at com.getstream.sdk.chat.view.AvatarView$createBitmap$2.invokeSuspend(Unknown Source:12)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Chikrix avatar May 14 '20 16:05 Chikrix

Hi @Chikrix it has been fixed on #482 You can use the new version 4.2.6 with the bugfix

JcMinarro avatar May 15 '20 12:05 JcMinarro