react-native-blurhash icon indicating copy to clipboard operation
react-native-blurhash copied to clipboard

[BUG] crash on android

Open zhigang1992 opened this issue 3 years ago • 4 comments

Bug

Crashes tracked from Google Play Store

Crashlog

java.lang.NullPointerException: 
  at android.view.View.requestLayout (View.java:25588)
  at android.widget.ImageView.setImageDrawable (ImageView.java:605)
  at androidx.appcompat.widget.AppCompatImageView.setImageDrawable (AppCompatImageView.java:104)
  at android.widget.ImageView.setImageBitmap (ImageView.java:769)
  at androidx.appcompat.widget.AppCompatImageView.setImageBitmap (AppCompatImageView.java:112)
  at com.mrousavy.blurhash.BlurhashImageView.renderBlurhash (BlurhashImageView.kt:76)
  at com.mrousavy.blurhash.BlurhashImageView.access$renderBlurhash (BlurhashImageView.kt:39)
  at com.mrousavy.blurhash.BlurhashImageView$updateBlurhash$1.invokeSuspend (BlurhashImageView.kt:86)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:571)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:750)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:678)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:665)
image
java.lang.NullPointerException: 
  at android.view.View.requestLayout (View.java:27055)
  at android.widget.ImageView.setImageDrawable (ImageView.java:600)
  at androidx.appcompat.widget.AppCompatImageView.setImageDrawable (AppCompatImageView.java:104)
  at android.widget.ImageView.setImageBitmap (ImageView.java:764)
  at androidx.appcompat.widget.AppCompatImageView.setImageBitmap (AppCompatImageView.java:112)
  at com.mrousavy.blurhash.BlurhashImageView.renderBlurhash (BlurhashImageView.kt:76)
  at com.mrousavy.blurhash.BlurhashImageView.access$renderBlurhash (BlurhashImageView.kt:39)
  at com.mrousavy.blurhash.BlurhashImageView$updateBlurhash$1.invokeSuspend (BlurhashImageView.kt:86)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:571)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:750)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:678)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:665)
image

Environment

System:
    OS: macOS 12.0
    CPU: (20) x64 Intel(R) Core(TM) i9-10900K CPU @ 3.70GHz
    Memory: 7.45 GB / 64.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.8.0 - /var/folders/v4/8jyh3pp92x58b6gkspmqv7z00000gn/T/yarn--1630417502647-0.8163490576417483/node
    Yarn: 1.22.10 - /var/folders/v4/8jyh3pp92x58b6gkspmqv7z00000gn/T/yarn--1630417502647-0.8163490576417483/yarn
    npm: 7.21.0 - /usr/local/bin/npm
    Watchman: 2021.08.23.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.2 - /usr/local/lib/ruby/gems/3.0.0/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7621141
    Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
  Languages:
    Java: 15.0.2 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.64.1 => 0.64.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
✨  Done in 3.75s.
"react": 17,
"react-native": 0.64,
"react-native-blurhash": 1.1.3

zhigang1992 avatar Aug 31 '21 13:08 zhigang1992

Hi! Sorry for the delay, been really busy with RNEU. That crash seems really weird, I'll take a look. Thanks for the report! 🖤

mrousavy avatar Sep 02 '21 08:09 mrousavy

does that crash happen 100% of the time or just sometimes?

mrousavy avatar Sep 02 '21 08:09 mrousavy

Congrats on the awesome talk.

Only some times, I also can't reproduce this on my end. It's from PlayStore report.

Figure I post the crash log here see if anyone has any idea.

zhigang1992 avatar Sep 03 '21 05:09 zhigang1992

hey @zhigang1992 is this something that's still an issue, do you have a rough % of affected users? Looking at trying out this library :)

henrymoulton avatar Jan 25 '22 12:01 henrymoulton