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

Crash in BlinkIdDialogOnboardingView upon config change #335

Open
geranzo opened this issue Nov 14, 2024 · 0 comments
Open

Crash in BlinkIdDialogOnboardingView upon config change #335

geranzo opened this issue Nov 14, 2024 · 0 comments

Comments

@geranzo
Copy link

geranzo commented Nov 14, 2024

Description

We are seeing from time to time the following crash in the field:

          Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.hasFocus()' on a null object reference
       at com.microblink.blinkid.fragment.overlay.blinkid.reticleui.BlinkIdDialogOnboardingView$1.onPageSelected(line:18)
       at androidx.viewpager.widget.ViewPager.dispatchOnPageSelected(ViewPager.java:1947)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:665)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:631)
       at androidx.viewpager.widget.ViewPager.setCurrentItem(ViewPager.java:612)
       at com.microblink.blinkid.fragment.overlay.blinkid.reticleui.BlinkIdDialogOnboardingView.onConfigurationChanged(BlinkIdDialogOnboardingView.java:19)
       at com.microblink.blinkid.fragment.overlay.blinkid.reticleui.ReticleOverlayView.onConfigurationChanged(line:4)
       at com.microblink.blinkid.fragment.overlay.blinkid.BlinkIdOverlayController.IllIIIllII(BlinkIdOverlayController.java:5)
       at com.microblink.blinkid.fragment.overlay.BaseOverlayController$2.onConfigurationChanged(BaseOverlayController.java:1)
       at com.microblink.blinkid.fragment.RecognizerRunnerFragment.onConfigurationChanged(line:6)
       at androidx.fragment.app.Fragment.performConfigurationChanged(Fragment.java)
       at androidx.fragment.app.FragmentManager.dispatchConfigurationChanged(FragmentManager.java:3090)
       at androidx.fragment.app.FragmentManager.lambda$new$0(FragmentManager.java:469)
       at androidx.activity.ComponentActivity.onConfigurationChanged(ComponentActivity.kt:849)
       at androidx.appcompat.app.AppCompatActivity.onConfigurationChanged(AppCompatActivity.java)
       at android.app.ActivityThread.performActivityConfigurationChanged(ActivityThread.java:5554)
       at android.app.ActivityThread.performConfigurationChangedForActivity(ActivityThread.java:5421)
       at android.app.ActivityThread.performConfigurationChangedForActivity(ActivityThread.java:5399)
       at android.app.ActivityThread.handleActivityConfigurationChanged(ActivityThread.java:5819)
       at android.app.servertransaction.ActivityConfigurationChangeItem.execute(ActivityConfigurationChangeItem.java:48)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2045)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7425)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

I've tried to reproduce it and it wasn't hard to do so. I opened the BlinkId activity (started a scan), then hit the ? (Help) button to show the onboarding dialog, then I changed the theme mode light <--> dark and at this point the MicroBlink SDK crashes. The stack trace from my local reproduction is slightly different than what we see on the Crashlytics above but it ends up in the exact same line of code in BlinkIdDialogOnboardingView:

          Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.hasFocus()' on a null object reference
       at com.microblink.blinkid.fragment.overlay.blinkid.reticleui.BlinkIdDialogOnboardingView$1.onPageSelected(line:18)
       at androidx.viewpager.widget.ViewPager.dispatchOnPageSelected(ViewPager.java:1947)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:665)
       at androidx.viewpager.widget.ViewPager.setCurrentItemInternal(ViewPager.java:631)
       at androidx.viewpager.widget.ViewPager.onRestoreInstanceState(ViewPager.java:1462)
       at android.view.View.dispatchRestoreInstanceState(View.java:22522)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4098)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:4104)
       at android.view.View.restoreHierarchyState(View.java:22500)
       at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:698)
       at androidx.fragment.app.Fragment.restoreViewState(Fragment.java:3176)
       at androidx.fragment.app.Fragment.performActivityCreated(Fragment.java:3161)
       at androidx.fragment.app.FragmentStateManager.activityCreated(FragmentStateManager.java:619)
       at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:275)
       at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:114)
       at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1455)
       at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3034)
       at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2952)
       at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:263)
       at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:350)
       at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251)
       at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1601)
       at android.app.Activity.performStart(Activity.java:8790)
       at android.app.ActivityThread.handleStartActivity(ActivityThread.java:4056)
       at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:230)
       at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:210)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:182)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2643)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:257)
       at android.os.Looper.loop(Looper.java:368)
       at android.app.ActivityThread.main(ActivityThread.java:8839)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

Environment Details

BlinkID version: 6.11.2

Device model: any

Device Android version: any

Device ABI (processor architecture, e.g. ARMv7): ARM*

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

1 participant