android / android/camera-samples

CameraXBasic crash with getOrCreateInstance

Open
#354 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
5.5k
Forks
2.4k
PR merge metrics
No merged PRs in 30d

Description

`02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: FATAL EXCEPTION: main
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: Process: se.skyglobal.app, PID: 23261
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: java.lang.RuntimeException: Unexpected thread interrupt. Should not be possible since future is already complete.
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.camera.core.CameraX.getOrCreateInstance(SourceFile:8)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.camera.lifecycle.ProcessCameraProvider.getInstance(SourceFile:2)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at se.skyglobal.app.ui.camera.CameraFragment.setUpCamera(SourceFile:1)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at se.skyglobal.app.ui.camera.DialogCameraFragment$a.run(SourceFile:2)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at android.os.Looper.loop(Looper.java:223)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7660)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: Caused by: java.lang.InterruptedException
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.concurrent.futures.AbstractResolvableFuture.get(SourceFile:64)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.concurrent.futures.CallbackToFutureAdapter$b.get(SourceFile:1)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.camera.core.impl.utils.futures.FutureChain.get(SourceFile:1)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at aa.get(SourceFile:7)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: at androidx.camera.core.CameraX.getOrCreateInstance(SourceFile:6)
02-02 04:26:18.379 1010213 23261 23261 E AndroidRuntime: ... 10 more`

Not sure when it happened

Device is Pixel 5

Contributor guide

Open the contributing guide

Research direction

Start at the CameraXBasic camera flow, especially CameraFragment.setUpCamera and its call to ProcessCameraProvider.getInstance, then trace the CameraX.getOrCreateInstance stack shown in the report. Compare the behavior on the reported Pixel 5 and determine the conditions causing the interrupted future. Done should establish the cause and prevent the reported crash with a verified test or reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.