michaeltroger / greenpass-android

Green Pass PDF Wallet Android App
https://play.google.com/store/apps/details?id=com.michaeltroger.gruenerpass
GNU General Public License v3.0
78 stars 3 forks source link

[BUG] Quickly scrolling up and down in PDF causes crash in Debug build #257

Open michaeltroger opened 6 months ago

michaeltroger commented 6 months ago

Describe the bug Quickly scrolling up and down in large PDF (20+ pages) causes app crash in barcode reader (native code). But only in debug builds

To Reproduce Steps to reproduce the behavior:

  1. Debug build installed
  2. Barcode extraction is enabled
  3. Import large PDF
  4. Scroll quickly up and down repeatedly
  5. App crashes

Expected behavior App should not crash

Screenshots x

Smartphone (please complete the following information):

Additional context

java_vm_ext.cc:591] JNI DETECTED ERROR IN APPLICATION: JNI GetLongField called with pending exception java.lang.RuntimeException: vector
java_vm_ext.cc:591]   at java.util.List de.markusfisch.android.zxingcpp.ZxingCpp.readBitmap(android.graphics.Bitmap, int, int, int, int, int, de.markusfisch.android.zxingcpp.ZxingCpp$ReaderOptions) (ZxingCpp.kt:-2)
java_vm_ext.cc:591]   at java.util.List de.markusfisch.android.zxingcpp.ZxingCpp.readBitmap(android.graphics.Bitmap, android.graphics.Rect, int, de.markusfisch.android.zxingcpp.ZxingCpp$ReaderOptions) (ZxingCpp.kt:182)
java_vm_ext.cc:591]   at java.lang.Object com.michaeltroger.gruenerpass.barcode.BarcodeRendererImpl$extractBarcode$2.invokeSuspend(java.lang.Object) (BarcodeRenderer.kt:58)