Fixed
Status Update
Comments
wu...@google.com <wu...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
qw...@gmail.com <qw...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
qw...@gmail.com <qw...@gmail.com> #4
Hello, is there any update on this issue?
er...@google.com <er...@google.com> #5
Hello,
Our team has just tagged your issue and will be looked at soon. We will update once we do so.
wu...@google.com <wu...@google.com>
we...@google.com <we...@google.com>
qw...@gmail.com <qw...@gmail.com> #6
Hi,
I would really appreciate it if you could help me with that issue. We have 11 users that have had this issue so far.
I would really appreciate it if you could help me with that issue. We have 11 users that have had this issue so far.
we...@google.com <we...@google.com> #7
Hi, qwaskhaled@, thanks for your report&info.
A quick update about this issue, we already noticed some possible reasons that could cause this issue. It seems that the device reports the capability is different from the video encoder.
It causes some specific resolution/device to fail to initialize the encoder, we already take it as priority.
A quick update about this issue, we already noticed some possible reasons that could cause this issue. It seems that the device reports the capability is different from the video encoder.
It causes some specific resolution/device to fail to initialize the encoder, we already take it as priority.
we...@google.com <we...@google.com> #8
qwaskhaled@, we are working on the workaround for the compatibility issue.
We probabily may need to set customized parameters for specific devices since the issue could come from different causes.
Would you be able to get a full log from the devices that had this issue?
We probabily may need to set customized parameters for specific devices since the issue could come from different causes.
Would you be able to get a full log from the devices that had this issue?
qw...@gmail.com <qw...@gmail.com> #9
Hi,
I don't understand what you meant by a full log. I have another report so I will share it.
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
androidx.camera.video.VideoCapture.resetPipeline (VideoCapture.java:482)
androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture (VideoCapture.java:433)
androidx.camera.video.-$$Lambda$VideoCapture$6BBmhv2eFVUcrkw2nD0ve39oNMM.onError (Unknown Source:10)
androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$13 (Camera2CameraImpl.java:1153)
androidx.camera.camera2.internal.-$$Lambda$Camera2CameraImpl$EQgjyk5vUNeY9hNKpGr93fYzUDE.run (Unknown Source:4)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6865)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:504)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
I don't understand what you meant by a full log. I have another report so I will share it.
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
androidx.camera.video.VideoCapture.resetPipeline (VideoCapture.java:482)
androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture (VideoCapture.java:433)
androidx.camera.video.-$$Lambda$VideoCapture$6BBmhv2eFVUcrkw2nD0ve39oNMM.onError (Unknown Source:10)
androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$13 (Camera2CameraImpl.java:1153)
androidx.camera.camera2.internal.-$$Lambda$Camera2CameraImpl$EQgjyk5vUNeY9hNKpGr93fYzUDE.run (Unknown Source:4)
android.os.Handler.handleCallback (Handler.java:873)
android.os.Handler.dispatchMessage (Handler.java:99)
android.os.Looper.loop (Looper.java:193)
android.app.ActivityThread.main (ActivityThread.java:6865)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:504)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
we...@google.com <we...@google.com> #10
Hi, thanks for your reply.
We are looking for some error messages that could be shown a little bit before the crash point.
Could you provide a bugreport that is dumped right after the crash? The report should contain information to clarify the caues of this symptom.
We are looking for some error messages that could be shown a little bit before the crash point.
Could you provide a bugreport that is dumped right after the crash? The report should contain information to clarify the caues of this symptom.
qw...@gmail.com <qw...@gmail.com> #11
Hi,
I don't have this issue on my of my devices. I only attached reports from the Play console for users that had it. If there is any way I can help to collect these reports then please share with me the steps so I can start.
I don't have this issue on my of my devices. I only attached reports from the Play console for users that had it. If there is any way I can help to collect these reports then please share with me the steps so I can start.
we...@google.com <we...@google.com> #12
Ah, as far as I know, the app console doesn't collect the bugreport for analysis.
We will try to get devices for testing, please feel free to report if you see any other device model get the similar symptom. Thanks!
We will try to get devices for testing, please feel free to report if you see any other device model get the similar symptom. Thanks!
qw...@gmail.com <qw...@gmail.com> #13
Hi, we have it too for these devices.
Brand:INFINIX MOBILITY LIMITED
Model:SMART
Version:Android 10
Brand:TEM
Model:X40
Version:Android 9
Brand:HYUNDAI
Model:E504
Version:Android 8.1.0
I haven't heard of these brands.
Brand:INFINIX MOBILITY LIMITED
Model:SMART
Version:Android 10
Brand:TEM
Model:X40
Version:Android 9
Brand:HYUNDAI
Model:E504
Version:Android 8.1.0
I haven't heard of these brands.
we...@google.com <we...@google.com> #14
Yeah, thanks for your info! That's really helpful. We will try to get more info for these devices.
[Deleted User] <[Deleted User]> #15
Same crash on
Brand: LEAGOO
Model: t5c
Version:Android: 7.0
happening when calling cameraProvider.bindToLifecycle(this, cameraSelector, preview, VideoCapture.withOutput(recorder)). Works fine without VideoCapture.
java.lang.IllegalStateException: Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
at androidx.camera.video.Recorder.onSurfaceRequested(Recorder.java:406)
at androidx.camera.video.VideoCapture.createPipeline(VideoCapture.java:416)
at androidx.camera.video.VideoCapture.resetPipeline(VideoCapture.java:482)
at androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture(VideoCapture.java:433)
at androidx.camera.video.VideoCapture$$ExternalSyntheticLambda0.onError(Unknown Source)
at androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$14(Camera2CameraImpl.java:1175)
at androidx.camera.camera2.internal.Camera2CameraImpl$$ExternalSyntheticLambda7.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6174)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:869)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
Brand: LEAGOO
Model: t5c
Version:Android: 7.0
happening when calling cameraProvider.bindToLifecycle(this, cameraSelector, preview, VideoCapture.withOutput(recorder)). Works fine without VideoCapture.
java.lang.IllegalStateException: Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
at androidx.camera.video.Recorder.onSurfaceRequested(Recorder.java:406)
at androidx.camera.video.VideoCapture.createPipeline(VideoCapture.java:416)
at androidx.camera.video.VideoCapture.resetPipeline(VideoCapture.java:482)
at androidx.camera.video.VideoCapture.lambda$createPipeline$0$VideoCapture(VideoCapture.java:433)
at androidx.camera.video.VideoCapture$$ExternalSyntheticLambda0.onError(Unknown Source)
at androidx.camera.camera2.internal.Camera2CameraImpl.lambda$postSurfaceClosedError$14(Camera2CameraImpl.java:1175)
at androidx.camera.camera2.internal.Camera2CameraImpl$$ExternalSyntheticLambda7.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6174)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:869)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)
qw...@gmail.com <qw...@gmail.com> #16
Hi, is this issue fixed in the last beta release?
qw...@gmail.com <qw...@gmail.com> #17
Hello. Any update?
wu...@google.com <wu...@google.com> #18
Hello, thanks for asking again. This is in progress now. We will need more time to get this problem fixed. Thanks for your patience and we will keep you posted once it's fixed!
we...@google.com <we...@google.com> #19
Hi, We already phase in an improvement for the devices that report incorrect codec information. The crash will be redirected to an error signal in the later update.
qw...@gmail.com <qw...@gmail.com> #20
That's better. Thanks
wu...@google.com <wu...@google.com>
ap...@google.com <ap...@google.com> #21
Project: platform/frameworks/support
Branch: androidx-main
commit f0da105e43d71749c70f142fb6979f710f5b74db
Author: leo huang <leohuang@google.com>
Date: Thu Mar 03 20:50:34 2022
Retry setting video encoder when starting video recording
Recorder may fail to set video encoder in the initial state and enter an error state. One case is when the codec resource is occupied by a previous Recorder that is in a releasing state, or even occupied by another process. This change will try to reconfigure the video encoder when the recording request is made.
Relnote: "Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording."
Bug: 200359121
Bug: 213617227
Test: ./gradlew camera:camera-video:connectedAndroidTest
Change-Id: I89c295716c6228c47f8bdadefef8336c9c058bd3
A camera/camera-video/src/main/java/androidx/camera/video/internal/encoder/EncoderFactory.java
M camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
M camera/camera-video/src/main/java/androidx/camera/video/Recorder.java
M camera/camera-video/src/main/java/androidx/camera/video/StreamInfo.java
M camera/camera-video/src/androidTest/java/androidx/camera/video/RecorderTest.kt
https://android-review.googlesource.com/1996232
Branch: androidx-main
commit f0da105e43d71749c70f142fb6979f710f5b74db
Author: leo huang <leohuang@google.com>
Date: Thu Mar 03 20:50:34 2022
Retry setting video encoder when starting video recording
Recorder may fail to set video encoder in the initial state and enter an error state. One case is when the codec resource is occupied by a previous Recorder that is in a releasing state, or even occupied by another process. This change will try to reconfigure the video encoder when the recording request is made.
Relnote: "Fixed a crash when the Recorder encountered an InvalidConfigException. However, this fix only prevents app from crashing, but doesn't resolve the cause of the InvalidConfigException. If the Recorder still cannot be configured, applications will receive error callback when it starts recording."
Bug: 200359121
Bug: 213617227
Test: ./gradlew camera:camera-video:connectedAndroidTest
Change-Id: I89c295716c6228c47f8bdadefef8336c9c058bd3
A camera/camera-video/src/main/java/androidx/camera/video/internal/encoder/EncoderFactory.java
M camera/camera-video/src/main/java/androidx/camera/video/VideoCapture.java
M camera/camera-video/src/main/java/androidx/camera/video/Recorder.java
M camera/camera-video/src/main/java/androidx/camera/video/StreamInfo.java
M camera/camera-video/src/androidTest/java/androidx/camera/video/RecorderTest.kt
le...@google.com <le...@google.com> #22
Hi Reporter,
We have a solution to fix the crash and an improvement
They will be included in the next release (versions greater than 1.1.0-beta02
) so please stay tune. You can find release information
Feel free to open a bug if you still encounter any issues. Thanks.
Description
Fatal Exception: java.lang.IllegalStateException
Surface was requested when the Recorder had encountered error androidx.camera.video.internal.ResourceCreationException: androidx.camera.video.internal.encoder.InvalidConfigException: Encoder cannot created: null
androidx.camera.video.Recorder.onSurfaceRequested (Recorder.java:406)
androidx.camera.video.VideoCapture.createPipeline (VideoCapture.java:416)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:980)
CAMERAX VERSION (1.1.0-alpha12)
ANDROID OS BUILD NUMBER: Android 10
DEVICE NAME: CUBOT NOTE &
STEPS TO REPRODUCE:
We don't know
REPRODUCIBILITY
We don't know