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

Native method - jdk.internal.misc.Unsafe.park #59

Open
radivojeostojic opened this issue Apr 4, 2024 · 7 comments
Open

Native method - jdk.internal.misc.Unsafe.park #59

radivojeostojic opened this issue Apr 4, 2024 · 7 comments

Comments

@radivojeostojic
Copy link

I have been encountering frequent ANR (Application Not Responding) issues over the past several days on the Google Console:

at jdk.internal.misc.Unsafe.park (Native method)
  at java.util.concurrent.locks.LockSupport.park (LockSupport.java:211)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire (AbstractQueuedSynchronizer.java:715)
  at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly (AbstractQueuedSynchronizer.java:1047)
  at java.util.concurrent.CountDownLatch.await (CountDownLatch.java:230)
  at com.microblink.blinkid.recognition.NativeRecognizerWrapper.lIlIIIIlIl (line:12)
  at com.microblink.blinkid.view.recognition.RecognizerRunnerView.pause (line:11)
  at com.microblink.blinkid.fragment.RecognizerRunnerFragment.onPause (line:3)
  at androidx.fragment.app.Fragment.performPause (Fragment.java:3200)
  at androidx.fragment.app.FragmentStateManager.pause (FragmentStateManager.java:630)
  at androidx.fragment.app.FragmentStateManager.moveToExpectedState (FragmentStateManager.java:293)
  at androidx.fragment.app.FragmentStore.moveToExpectedState (FragmentStore.java:113)
  at androidx.fragment.app.FragmentManager.moveToState (FragmentManager.java:1374)
  at androidx.fragment.app.FragmentManager.dispatchStateChange (FragmentManager.java:2841)
  at androidx.fragment.app.FragmentManager.dispatchPause (FragmentManager.java:2802)
  at androidx.fragment.app.FragmentController.dispatchPause (FragmentController.java:295)
  at androidx.fragment.app.FragmentActivity.onPause (FragmentActivity.java:366)
  at android.app.Activity.performPause (Activity.java:9166)
  at android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1657)
  at android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:5769)
  at android.app.ActivityThread.performPauseActivity (ActivityThread.java:5730)
  at android.app.ActivityThread.handlePauseActivity (ActivityThread.java:5682)
  at android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:48)
  at android.app.servertransaction.ActivityTransactionItem.execute (ActivityTransactionItem.java:45)
  at android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:180)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:98)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2685)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:230)
  at android.os.Looper.loop (Looper.java:319)
  at android.app.ActivityThread.main (ActivityThread.java:8913)
  at java.lang.reflect.Method.invoke (Native method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:608)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1103)

plugin version: 6.1.2

Flutter doctor:

[!] Flutter (Channel [user-branch], 3.16.9, on macOS 14.3 23D56
    darwin-arm64, locale en-US)
    ! Flutter version 3.16.9 on channel [user-branch] at
      /Users/radivojeostojic/Documents/development/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an
      official channel.
      If that doesn't fix the issue, reinstall Flutter by following
      instructions at https://flutter.dev/docs/get-started/install.
    ! Warning: `dart` on your path resolves to
      /opt/homebrew/Cellar/dart/3.3.1/libexec/bin/dart, which is not inside
      your current Flutter SDK checkout at
      /Users/radivojeostojic/Documents/development/flutter. Consider adding
      /Users/radivojeostojic/Documents/development/flutter/bin to the front
      of your path.
    ! Upstream repository unknown source is not a standard remote.
      Set environment variable "FLUTTER_GIT_URL" to unknown source to
      dismiss this error.
    • Framework revision 41456452f2 (2 months ago), 2024-01-25 10:06:23
      -0800
    • Engine revision f40e976bed
    • Dart version 3.2.6
    • DevTools version 2.28.5
    • If those were intentional, you can disregard the above warnings;
      however it is recommended to use "git" directly to perform update
      checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/radivojeostojic/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15E204a
    • CocoaPods version 1.15.2

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 2023.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)

[✓] VS Code (version 1.87.1)
    • VS Code at /Users/radivojeostojic/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.84.0

[✓] Connected device (3 available)
    • sdk gphone64 arm64 (mobile) • emulator-5554             • android-arm64 • Android 14 (API 34) (emulator)
    • Radivoje’s iPhone (mobile)  • 00008110-000159280100401E • ios           • iOS 17.4.1 21E236
    • macOS (desktop)             • macos                     • darwin-arm64  • macOS 14.3 23D56 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.
@mparadina
Copy link
Contributor

Hi @radivojeostojic

Thank you for reaching out.

Are you maybe able to reproduce the behavior on your end?
Have you tried to reproduce it with our sample application?

@radivojeostojic
Copy link
Author

@mparadina I tried to run the sample app on Android 14, but I didn't manage to reproduce this issue. On the other hand, I am seeing a lot of different exceptions:

E/AndroidRuntime(13067): FATAL EXCEPTION: highpool[0]
E/AndroidRuntime(13067): Process: com.google.android.gms.persistent, PID: 13067
E/AndroidRuntime(13067): java.lang.IllegalStateException: Maximum limit of concurrent alarms 500 reached for uid: u0a130, callingPackage: com.google.android.gms
E/AndroidRuntime(13067): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3065)
E/AndroidRuntime(13067): 	at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime(13067): 	at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime(13067): 	at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime(13067): 	at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:311)
E/AndroidRuntime(13067): 	at android.app.AlarmManager.setImpl(AlarmManager.java:1084)
E/AndroidRuntime(13067): 	at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1348)
E/AndroidRuntime(13067): 	at avps.h(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13067): 	at avpc.e(:com.google.android.gms@[email protected] (190400-535401451):5)
E/AndroidRuntime(13067): 	at awqh.j(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13067): 	at avkg.e(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13067): 	at avkb.r(:com.google.android.gms@[email protected] (190400-535401451):11)
E/AndroidRuntime(13067): 	at awqi.z(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13067): 	at czhg.h(:com.google.android.gms@[email protected] (190400-535401451):22)
E/AndroidRuntime(13067): 	at czhc.run(:com.google.android.gms@[email protected] (190400-535401451):19)
E/AndroidRuntime(13067): 	at aced.c(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13067): 	at aced.run(:com.google.android.gms@[email protected] (190400-535401451):7)
E/AndroidRuntime(13067): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(13067): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(13067): 	at acjn.run(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13067): 	at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime(13067): 	Suppressed: dfhy: 
E/AndroidRuntime(13067): 		at tk_trace.location_base-GoogleLocationManagerChimeraService_onStartCommand(Unknown Source:0)
E/AndroidRuntime(13067): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(13067): 	at com.android.server.alarm.AlarmManagerService.setImpl(AlarmManagerService.java:2365)
E/AndroidRuntime(13067): 	at com.android.server.alarm.AlarmManagerService$5.set(AlarmManagerService.java:3006)
E/AndroidRuntime(13067): 	at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:181)
E/AndroidRuntime(13067): 	at android.os.Binder.execTransactInternal(Binder.java:1339)
E/AndroidRuntime(13067): 	at android.os.Binder.execTransact(Binder.java:1275)
E/AndroidRuntime(13067): 
E/AndroidRuntime(13178): FATAL EXCEPTION: highpool[5]
E/AndroidRuntime(13178): Process: com.google.android.gms.persistent, PID: 13178
E/AndroidRuntime(13178): java.lang.IllegalStateException: Maximum limit of concurrent alarms 500 reached for uid: u0a130, callingPackage: com.google.android.gms
E/AndroidRuntime(13178): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3065)
E/AndroidRuntime(13178): 	at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime(13178): 	at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime(13178): 	at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime(13178): 	at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:311)
E/AndroidRuntime(13178): 	at android.app.AlarmManager.setImpl(AlarmManager.java:1084)
E/AndroidRuntime(13178): 	at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1348)
E/AndroidRuntime(13178): 	at avps.h(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13178): 	at avpc.e(:com.google.android.gms@[email protected] (190400-535401451):5)
E/AndroidRuntime(13178): 	at awqh.j(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13178): 	at avkg.e(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13178): 	at avkb.r(:com.google.android.gms@[email protected] (190400-535401451):11)
E/AndroidRuntime(13178): 	at awqi.z(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13178): 	at czhg.h(:com.google.android.gms@[email protected] (190400-535401451):22)
E/AndroidRuntime(13178): 	at czhc.run(:com.google.android.gms@[email protected] (190400-535401451):19)
E/AndroidRuntime(13178): 	at aced.c(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13178): 	at aced.run(:com.google.android.gms@[email protected] (190400-535401451):7)
E/AndroidRuntime(13178): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(13178): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(13178): 	at acjn.run(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13178): 	at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime(13178): 	Suppressed: dfhy: 
E/AndroidRuntime(13178): 		at tk_trace.location_base-GoogleLocationManagerChimeraService_onStartCommand(Unknown Source:0)
E/AndroidRuntime(13178): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(13178): 	at com.android.server.alarm.AlarmManagerService.setImpl(AlarmManagerService.java:2365)
E/AndroidRuntime(13178): 	at com.android.server.alarm.AlarmManagerService$5.set(AlarmManagerService.java:3006)
E/AndroidRuntime(13178): 	at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:181)
E/AndroidRuntime(13178): 	at android.os.Binder.execTransactInternal(Binder.java:1339)
E/AndroidRuntime(13178): 	at android.os.Binder.execTransact(Binder.java:1275)
E/AndroidRuntime(13178): 
E/AndroidRuntime(13302): FATAL EXCEPTION: highpool[4]
E/AndroidRuntime(13302): Process: com.google.android.gms.persistent, PID: 13302
E/AndroidRuntime(13302): java.lang.IllegalStateException: Maximum limit of concurrent alarms 500 reached for uid: u0a130, callingPackage: com.google.android.gms
E/AndroidRuntime(13302): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3065)
E/AndroidRuntime(13302): 	at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime(13302): 	at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime(13302): 	at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime(13302): 	at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:311)
E/AndroidRuntime(13302): 	at android.app.AlarmManager.setImpl(AlarmManager.java:1084)
E/AndroidRuntime(13302): 	at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1348)
E/AndroidRuntime(13302): 	at avps.h(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13302): 	at avpc.e(:com.google.android.gms@[email protected] (190400-535401451):5)
E/AndroidRuntime(13302): 	at awqh.j(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13302): 	at avkg.e(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13302): 	at avkb.r(:com.google.android.gms@[email protected] (190400-535401451):11)
E/AndroidRuntime(13302): 	at awqi.z(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13302): 	at czhg.h(:com.google.android.gms@[email protected] (190400-535401451):22)
E/AndroidRuntime(13302): 	at czhc.run(:com.google.android.gms@[email protected] (190400-535401451):19)
E/AndroidRuntime(13302): 	at aced.c(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13302): 	at aced.run(:com.google.android.gms@[email protected] (190400-535401451):7)
E/AndroidRuntime(13302): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(13302): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(13302): 	at acjn.run(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13302): 	at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime(13302): 	Suppressed: dfhy: 
E/AndroidRuntime(13302): 		at tk_trace.location_base-GoogleLocationManagerChimeraService_onStartCommand(Unknown Source:0)
E/AndroidRuntime(13302): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(13302): 	at com.android.server.alarm.AlarmManagerService.setImpl(AlarmManagerService.java:2365)
E/AndroidRuntime(13302): 	at com.android.server.alarm.AlarmManagerService$5.set(AlarmManagerService.java:3006)
E/AndroidRuntime(13302): 	at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:181)
E/AndroidRuntime(13302): 	at android.os.Binder.execTransactInternal(Binder.java:1339)
E/AndroidRuntime(13302): 	at android.os.Binder.execTransact(Binder.java:1275)
E/AndroidRuntime(13302): 
E/AndroidRuntime(13407): FATAL EXCEPTION: highpool[1]
E/AndroidRuntime(13407): Process: com.google.android.gms.persistent, PID: 13407
E/AndroidRuntime(13407): java.lang.IllegalStateException: Maximum limit of concurrent alarms 500 reached for uid: u0a130, callingPackage: com.google.android.gms
E/AndroidRuntime(13407): 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3065)
E/AndroidRuntime(13407): 	at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime(13407): 	at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime(13407): 	at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime(13407): 	at android.app.IAlarmManager$Stub$Proxy.set(IAlarmManager.java:311)
E/AndroidRuntime(13407): 	at android.app.AlarmManager.setImpl(AlarmManager.java:1084)
E/AndroidRuntime(13407): 	at android.app.AlarmManager.setExactAndAllowWhileIdle(AlarmManager.java:1348)
E/AndroidRuntime(13407): 	at avps.h(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13407): 	at avpc.e(:com.google.android.gms@[email protected] (190400-535401451):5)
E/AndroidRuntime(13407): 	at awqh.j(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13407): 	at avkg.e(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13407): 	at avkb.r(:com.google.android.gms@[email protected] (190400-535401451):11)
E/AndroidRuntime(13407): 	at awqi.z(:com.google.android.gms@[email protected] (190400-535401451):3)
E/AndroidRuntime(13407): 	at czhg.h(:com.google.android.gms@[email protected] (190400-535401451):22)
E/AndroidRuntime(13407): 	at czhc.run(:com.google.android.gms@[email protected] (190400-535401451):19)
E/AndroidRuntime(13407): 	at aced.c(:com.google.android.gms@[email protected] (190400-535401451):6)
E/AndroidRuntime(13407): 	at aced.run(:com.google.android.gms@[email protected] (190400-535401451):7)
E/AndroidRuntime(13407): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
E/AndroidRuntime(13407): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
E/AndroidRuntime(13407): 	at acjn.run(:com.google.android.gms@[email protected] (190400-535401451):0)
E/AndroidRuntime(13407): 	at java.lang.Thread.run(Thread.java:1012)
E/AndroidRuntime(13407): 	Suppressed: dfhy: 
E/AndroidRuntime(13407): 		at tk_trace.location_base-GoogleLocationManagerChimeraService_onStartCommand(Unknown Source:0)
E/AndroidRuntime(13407): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(13407): 	at com.android.server.alarm.AlarmManagerService.setImpl(AlarmManagerService.java:2365)
E/AndroidRuntime(13407): 	at com.android.server.alarm.AlarmManagerService$5.set(AlarmManagerService.java:3006)
E/AndroidRuntime(13407): 	at android.app.IAlarmManager$Stub.onTransact(IAlarmManager.java:181)
E/AndroidRuntime(13407): 	at android.os.Binder.execTransactInternal(Binder.java:1339)
E/AndroidRuntime(13407): 	at android.os.Binder.execTransact(Binder.java:1275)

@radivojeostojic
Copy link
Author

I am also getting Network error, although I have internet connection on my device:
Screenshot_20240405-112840

@radivojeostojic
Copy link
Author

@mparadina We actually managed to see similar logs while testing the sample app on a physical device (Moto G13, Android 13):


E/lIlIIIlIll.java:36@Recognition(32081): Failed to capture frame
E/lIlIIIlIll.java:36@Recognition(32081): java.lang.IllegalStateException: Session has been closed; further changes are illegal.
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:887)
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.capture(CameraCaptureSessionImpl.java:180)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.lIlIIIlIll.llIIlIlIIl(line:31)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.lIlIIIlIll.llIIlIlIIl(line:4)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.IIllllllll.IllIIIllII(line:2)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.IllIllIlll.llIIlIlIIl(line:8)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.IllIIlIIII.llIIlIlIIl(line:5)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.IIIllllllI.llIIlIlIIl(line:17)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.lIlIIlIIll.llIIlIlIIl(line:2)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.IllIIlIIII.IllIIIllII(line:1)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.recognition.lllIIIlIlI.llIIlIlIIl(line:5)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.recognition.NativeRecognizerWrapper.llIIlIlIIl(line:76)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.recognition.IllIIIllII.run(line:12)
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.os.Handler.handleCallback(Handler.java:942)
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.llIIIllIlI.dispatchMessage(line:1)
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.os.Looper.loopOnce(Looper.java:201)
E/lIlIIIlIll.java:36@Recognition(32081): 	at android.os.Looper.loop(Looper.java:288)
E/lIlIIIlIll.java:36@Recognition(32081): 	at com.microblink.blinkid.secured.llllIIIIll.run(line:21)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): Failed to capture frame
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): java.lang.IllegalStateException: Session has been closed; further changes are illegal.
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.checkNotClosed(CameraCaptureSessionImpl.java:887)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.hardware.camera2.impl.CameraCaptureSessionImpl.capture(CameraCaptureSessionImpl.java:180)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIIlIll.llIIlIlIIl(line:31)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIIlIll.llIIlIlIIl(line:4)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IIllllllll.IllIIIllII(line:2)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IllIllIlll.llIIlIlIIl(line:8)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IllIIlIIII.llIIlIlIIl(line:5)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IIIllllllI.llIIlIlIIl(line:17)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIlIIll.llIIlIlIIl(line:2)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IllIIlIIII.IllIIIllII(line:1)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.view.recognition.IIlIIIllIl.onCameraFrame(line:98)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.IIllllllll.llIIlIlIIl(line:2)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIlIlll.llIIlIlIIl(line:2)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIlIlll.$r8$lambda$NH_DR0Y1NK3WQEtuijF83A4VUMo(Unknown Source:0)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.lIlIIlIlll$$ExternalSyntheticLambda0.run(Unknown Source:4)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.os.Handler.handleCallback(Handler.java:942)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.llIIIllIlI.dispatchMessage(line:1)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.os.Looper.loopOnce(Looper.java:201)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at android.os.Looper.loop(Looper.java:288)
E/lIlIIIlIll.java:36@BaseCamera2Frame(32081): 	at com.microblink.blinkid.secured.llllIIIIll.run(line:21)
D/VRI[BlinkIdActivity](32081): hardware acceleration = true, forceHwAccelerated = false
D/InputTransport(32081): Create ARC handle: 0xb40000735db13120

@mparadina
Copy link
Contributor

Hi @radivojeostojic

Thank you for testing out the sample application!

From what I can see from the provided logs, the issue might be with the camera management on the Android device.
As we do not have that specific device, can you check on your end if the crash appears when you modify the UI settings with the following code:

        BlinkIdUISettings settings = new BlinkIdUISettings(recognizerBundle);
        OverlaySerializationUtils.extractCommonUISettings(jsonUISettings, settings);
        settings.setCameraSettings(new CameraSettings.Builder()
                .setForceLegacyApi(true)
                .build());

This code needs to be placed in the native Java code in the following path in the sample application, below line 23:
...blinkid-flutter/BlinkID/android/src/main/java/com/microblink/blinkid/flutter/overlays/serialization/BlinkIdOverlaySettingsSerialization.java

You can also find it more easily if you're using Android Studio directly.

@radivojeostojic
Copy link
Author

@mparadina This change appears to have resolved the issue. I'll incorporate this change into my code and continue to monitor its performance in production. Thank you for your assistance

@mparadina
Copy link
Contributor

@radivojeostojic glad to hear that the provided solution helped!

Even though it did help, we only recommend applying this camera API setting to certain devices with which you are experiencing this issue, as it can affect the overall SDK performance with devices that have the newer camera API implemented.

For future releases, we can expose this setting in the BlinkIdOverlaySettings so that you can access it directly via Dart, without additionally modifying the native code.

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

No branches or pull requests

2 participants