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

Clicking away on share app crashed the app #4413

Closed
Tracked by #4463
teolemon opened this issue Jul 31, 2023 · 3 comments · Fixed by #4472
Closed
Tracked by #4463

Clicking away on share app crashed the app #4413

teolemon opened this issue Jul 31, 2023 · 3 comments · Fixed by #4472
Assignees
Labels
🐛 bug Something isn't working lifecycle 🎯 P0 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…

Comments

@teolemon
Copy link
Member

What

  • Clicking away on share app crashed the app

Steps to reproduce the behavior

  1. Go to Settings >> Share app
  2. Click on it
  3. Click in the void above the bottom sheet
  4. See crash.
@teolemon teolemon added the 🐛 bug Something isn't working label Jul 31, 2023
@g123k
Copy link
Collaborator

g123k commented Aug 4, 2023

This is actually the scanner that is crashing (juliansteenbakker/mobile_scanner#666):

E/AndroidRuntime(29943): FATAL EXCEPTION: main
E/AndroidRuntime(29943): Process: org.openfoodfacts.scanner, PID: 29943
E/AndroidRuntime(29943): java.lang.NullPointerException
E/AndroidRuntime(29943): 	at dev.steenbakker.mobile_scanner.MobileScanner.start$lambda$11$lambda$6(MobileScanner.kt:172)
E/AndroidRuntime(29943): 	at dev.steenbakker.mobile_scanner.MobileScanner.$r8$lambda$6xiYqBKE4NOIEBpF_EUVJP0DW6M(Unknown Source:0)
E/AndroidRuntime(29943): 	at dev.steenbakker.mobile_scanner.MobileScanner$$ExternalSyntheticLambda3.onSurfaceRequested(Unknown Source:4)
E/AndroidRuntime(29943): 	at androidx.camera.core.Preview.lambda$sendSurfaceRequest$1(Preview.java:516)
E/AndroidRuntime(29943): 	at androidx.camera.core.Preview$$ExternalSyntheticLambda2.run(Unknown Source:4)
E/AndroidRuntime(29943): 	at android.os.Handler.handleCallback(Handler.java:942)
E/AndroidRuntime(29943): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29943): 	at android.os.Looper.loopOnce(Looper.java:201)
E/AndroidRuntime(29943): 	at android.os.Looper.loop(Looper.java:288)
E/AndroidRuntime(29943): 	at android.app.ActivityThread.main(ActivityThread.java:7918)
E/AndroidRuntime(29943): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29943): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E/AndroidRuntime(29943): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

@g123k g123k added the 🎯 P0 label Aug 6, 2023
@g123k
Copy link
Collaborator

g123k commented Aug 6, 2023

I'm able to reproduce the issue in numerous cases.
This happens when you leave/reopen the app on Android and the scanner is not in foreground.

I will create a PR on the official repo and depending, we will see how to merge it.
But for me, this is one is blocking for the release.

@teolemon teolemon added 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion… lifecycle labels Aug 6, 2023
@g123k
Copy link
Collaborator

g123k commented Aug 6, 2023

PR submitted: juliansteenbakker/mobile_scanner#710

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working lifecycle 🎯 P0 🤳🥫 Scan We need to be able to scan on low-end, old devices, even with a bad camera, connexion…
Development

Successfully merging a pull request may close this issue.

2 participants