Status Update
Comments
nj...@google.com <nj...@google.com>
il...@google.com <il...@google.com>
va...@google.com <va...@google.com> #2
This is a particularly hard device to come by - do you happen to have access to the device? If so could you provide us with the output of: adb shell dumpsys media.camera > info.txt
Thanks!
va...@google.com <va...@google.com> #3
Stacktrace:
Caused by: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes(SupportedSurfaceCombination.java:355)
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:197)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:198)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:943)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:293)
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:227)
Below are some findings based on our debugging
When Dex is connected
previewConfig.getMaxResolution() is returning "731x411" as maxSize.
Inside Preview.Builder.build() -> Default_MAX_resolution is set to "CameraX.getSurfaceManager().getPreviewSize()" which is 731x411
this is being picked as maxSize.
While rendering maxSize is 731x411 and minSize is 640x480 and below are available outputSizes
0 = {Size@11860} "4032x3024"
1 = {Size@11861} "3984x2988"
2 = {Size@11862} "4032x2268"
3 = {Size@11863} "3024x3024"
4 = {Size@11864} "2976x2976"
5 = {Size@11865} "3840x2160"
6 = {Size@11866} "3264x2448"
7 = {Size@11867} "4032x1960"
8 = {Size@11868} "2880x2160"
9 = {Size@11869} "3264x1836"
10 = {Size@11870} "2160x2160"
11 = {Size@11871} "2560x1440"
12 = {Size@11872} "2224x1080"
13 = {Size@11873} "2048x1152"
14 = {Size@11874} "1920x1080"
15 = {Size@11875} "1440x1080"
16 = {Size@11876} "1088x1088"
17 = {Size@11877} "1280x720"
18 = {Size@11878} "1024x768"
19 = {Size@11879} "1056x704"
20 = {Size@11880} "960x720"
21 = {Size@11881} "960x540"
22 = {Size@11882} "720x720"
23 = {Size@11883} "800x450"
24 = {Size@11884} "720x480"
25 = {Size@11885} "640x480"
26 = {Size@11886} "352x288"
27 = {Size@11887} "320x240"
28 = {Size@11888} "256x144"
29 = {Size@11889} "176x144"
and couldn't find any size in this range.
When Dex not connected
minsize = 640x480
maxsize = 1920x1080
0 = {Size@11836} "4032x3024"
1 = {Size@11837} "3984x2988"
2 = {Size@11838} "4032x2268"
3 = {Size@11839} "3024x3024"
4 = {Size@11840} "2976x2976"
5 = {Size@11841} "3840x2160"
6 = {Size@11842} "3264x2448"
7 = {Size@11843} "4032x1960"
8 = {Size@11844} "2880x2160"
9 = {Size@11845} "3264x1836"
10 = {Size@11846} "2160x2160"
11 = {Size@11847} "2560x1440"
12 = {Size@11848} "2224x1080"
13 = {Size@11849} "2048x1152"
14 = {Size@11850} "1920x1080"
15 = {Size@11851} "1440x1080"
16 = {Size@11852} "1088x1088"
17 = {Size@11853} "1280x720"
18 = {Size@11854} "1024x768"
19 = {Size@11855} "1056x704"
20 = {Size@11856} "960x720"
21 = {Size@11857} "960x540"
22 = {Size@11858} "720x720"
23 = {Size@11859} "800x450"
24 = {Size@11860} "720x480"
25 = {Size@11861} "640x480"
26 = {Size@11862} "352x288"
27 = {Size@11863} "320x240"
28 = {Size@11864} "256x144"
29 = {Size@11865} "176x144"
and we have 12 available sizes in this range
Camera2DeviceSurfaceManager.java:: getPreviewSize()
mCameraSupportedSurfaceCombinationMap.get(cameraId).getSurfaceDefinition().getPreviewSize() = "1920x1080"
cameraId=0
al...@hu.ma <al...@hu.ma> #4
The issue root cause is that CameraX will default filter out sizes smaller than 640x480. For Preview, the max size will be limited to under display size. I checked the HW spec info for the issue related devices. Display size of FUJITSU F-04J/F-05J is 360x640. That will result int that no size exists in the conditions that is larger or equal to 640x480 and smaller or equal to 360x640.
A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
For device FUJITSU arrowsM04, I checked its HW spec info and its display size I found is 1280x720. It seems that the problem should not exist in the device.
Could you confirm that the problem exist on arrowsM04 device? What will be the returned value when using Display#getRealSize to obtain the display size?
yu...@gmail.com <yu...@gmail.com> #5
> A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
OK. I will try it.
> Could you confirm that the problem exist on arrowsM04 device?
We receive the crash report (Crashlytics) that this crash has occurred on arrowsM04.
We don't have this device so we can't confirm that the problem really exist on arrowsM04.
> What will be the returned value when using Display#getRealSize to obtain the display size?
We can't investigate it for the same reason.
Thank you.
te...@gmail.com <te...@gmail.com> #6
This issue happened on devices that the display size is smaller than 640x480. In original auto-resolution mechanism, supported sizes smaller than 640x480 will be default filter out.
The auto-resolution mechanism encodes the guaranteed configurations tables in CameraDevice#createCaptureSession(SessionConfiguration). It defines that the PREVIEW size is the small one of the device display size and 1080p. The PREVIEW size will be the maximal size limitation for Preview use case. The reason it limits the size to display size and 1080p is the stream output in display size or 1080p has been able to provide good enough preview quality. Therefore, auto-resolution mechanism will limit the selected size to be smaller than the small one of the device display size and 1080p.
With above two conditions, in this issue, all sizes smaller than 640x480 have been filter out, therefore, there is no size smaller than the display size 320x240 can be selected to use. And cause the exception.
Solution:
When the display size is smaller than 640x480, auto-resolution mechanism won't filter out those small sizes smaller than 640x480. This makes those small size be left and can be selected for the Preview use case on small display devices.
The solution has been merged and will be included in next CameraX release.
cj...@gmail.com <cj...@gmail.com> #7
Hello.
This crash still occurs.
- CAMERAX VERSION: 1.0.0-beta4
- ANDROID OS BUILD NUMBER: Android 7.1.1
- DEVICE NAME: FUJITSU F-02H
We receive following crash report from FUJITSU F-02H. So far We have received this crash report only from F-02H.
java.lang.IllegalArgumentException
Can not get supported output size under supported maximum for the format: 34
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes (SupportedSurfaceCombination.java:349)
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions (SupportedSurfaceCombination.java:197)
androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions (Camera2DeviceSurfaceManager.java:198)
androidx.camera.core.CameraX.calculateSuggestedResolutions (CameraX.java:949)
androidx.camera.core.CameraX.bindToLifecycle (CameraX.java:351)
androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle (ProcessCameraProvider.java:230)
(our application's package name).CameraFragment.bindCameraUseCases (CameraFragment.java:174)
va...@google.com <va...@google.com> #8
Could you help to provide the following information to clarify the issue?
1. Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
2. Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
go...@gmail.com <go...@gmail.com> #9
- Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
Yes
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
Since we don't have this device, we'll try to collect this information in the next version of our app. The next version will be released later this month.
ae...@google.com <ae...@google.com>
ca...@sitoo.com <ca...@sitoo.com> #10
Hello.
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
We have collected the output of the device where the crash occurs.
Device1
- Model : arrows Be F-05J
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Device2
- Model : Fujitsu arrows M04
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Additional Information
CameraX version : 1.0.0-beta04
We collect the supported output sizes by following code.
val errorString = buildString {
append("The supported output sizes of ImageFormat.PRIVATE: ")
(requireContext().getSystemService(Context.CAMERA_SERVICE) as CameraManager).apply {
cameraIdList.forEachIndexed { index, cameraId ->
val msg = if (VERSION.SDK_INT >= VERSION_CODES.M) {
val configurationMap =
getCameraCharacteristics(cameraId).get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
val sizes = configurationMap?.getOutputSizes(ImageFormat.PRIVATE)
"CameraId $index: ${sizes?.joinToString(" ,")}"
} else {
"CameraId $index: This device version is under M."
}
append(msg)
}
}
}
ra...@gmail.com <ra...@gmail.com> #11
ca...@sitoo.com <ca...@sitoo.com> #12
I tried to find the device specs and both 720x1280
size display. For the camera id 0 device, it is a different case that the display size is larger than 640x480
but the device only supports a 480x480
size. The case also caused the same IllegalArgumentException and was also fixed by 1.0.0-beta04
release. Before 480x480
size would be filtered out and then caused the IllegalArgumentException. After it was merged, the 640x480
size threshold was removed and then the 480x480
size would be kept and selected to use.
It looks like 1.0.0-beta04
release had been used to collect the supported sizes information. But the issue should have been fixed by 1.0.0-beta04
release. Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
CameraX's 1.0.0-beta04
version. Maybe you can also consider to upgrade to the latest 1.0.0-rc01
version for your application. Thanks.
en...@gmail.com <en...@gmail.com> #13
Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
We collect informations only from the device on which IllegalArgumentException happened.
Our latest app uses CameraX version 1.0.0-beta10
and this issue still occurres.
However we don't receive crash report from Fujitsu arrows Be F-05J
or Fujitsu arrows M04
so far. (This doesn't mean this issue is fixed on these devices because our app is heavily rely on camera so these device's user wouldn't use our app anymore.)
Instead, we receive crash report from
- Model : Fujitsu F-03K
- Android Version : 7.1.2
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0 : 480x480
CameraId 1 : 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
kl...@google.com <kl...@google.com>
ap...@google.com <ap...@google.com> #14
I missed some settings when I simulated the issue by robolectric test so that I was not able to reproduce it. Now, I can reproduce the issue if the device only supports one 480x480 resolution. I'm working on the solution and target to make it included in next release.
ch...@gmail.com <ch...@gmail.com> #15
Branch: androidx-main
commit 69d15dff7bb857ee33a0f643ff42a0f8bc475ab2
Author: charcoalchen <charcoalchen@google.com>
Date: Fri Jan 08 18:30:03 2021
Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Do not filter out sizes smaller than 640x480 when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Relnote:"Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480."
Bug: 150506192
Test: SupportedSurfaceCombinationTest
Change-Id: I2a63ce8e2ad42a9cc060c8635ac3603bf440b1ec
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/SupportedSurfaceCombination.java
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.java
st...@google.com <st...@google.com> #16
ch...@gmail.com <ch...@gmail.com> #17
Thanks for the explanation, so the BOM versions will also be updated within a month (like 2023.04.xx)? If so, that will be great!
pr...@google.com <pr...@google.com> #18
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.4.2
androidx.compose.ui:ui:1.4.2
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit 7545cec3617ab5d1ea83d66822bc094e7f03c562
Author: José Figueroa Santos <serniebanders@google.com>
Date: Wed Apr 19 16:04:18 2023
[Material3][gradle] Update compose dependencies to 1.4.2
Upgrade needed to intake the following bug fix:
Bug: 268380384
Bug: 272483584
RelNote: ModalBottomSheet now can display IME keyboard
Test: Manual
Change-Id: Idc5082008acb547cac2100a69cab4be7db85f50f
M compose/material3/material3/build.gradle
M compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/BottomSheetSamples.kt
ed...@gmail.com <ed...@gmail.com> #20
I am using compose and my dependencies are as follows:
def composeBom = platform('androidx.compose:compose-bom:2023.01.00')
implementation composeBom
androidTestImplementation composeBom
// Material Design 3
implementation "androidx.compose.material3:material3:$compose_material3_version"
implementation "androidx.compose.material3:material3-window-size-class:$compose_material3_version"
implementation 'androidx.compose.ui:ui:1.5.0-alpha03'.
Once I hide the modal bottom sheet, only then does the keyboard shows up. Strange
an...@favordelivery.com <an...@favordelivery.com> #21
sh...@venturedive.com <sh...@venturedive.com> #22
st...@google.com <st...@google.com> #23
As per
ed...@gmail.com <ed...@gmail.com> #24
an...@gmail.com <an...@gmail.com> #26
Such a serious bug and nobody pays normal attention to it.
there is a hack described in this post
for now I use this approach, but I really hope that someone from Google will eventually fix this frustrating bug.
ja...@gmail.com <ja...@gmail.com> #27
Hi,
keyboard was shown properly in compose 1.4.3 but in 1.5.0-alpha03 it stopped working again.
In 1.4.3 and 1.5.0-alpha03 now i have following issue which causing app crash.
1 @main: CRASH DETECTED on thread Thread[main,5,main]
E java.lang.IllegalStateException: LayoutCoordinate operations are only valid when isAttached is true
E at androidx.compose.ui.node.NodeCoordinator.localToRoot-MK-Hz9U(NodeCoordinator.kt:850)
E at androidx.compose.foundation.text.TextFieldDelegate$Companion.notifyFocusedRect$foundation_release(TextFieldDelegate.kt:173)
E at androidx.compose.foundation.text.CoreTextFieldKt.notifyFocusedRect(CoreTextField.kt:1111)
E at androidx.compose.foundation.text.CoreTextFieldKt.notifyTextInputServiceOnFocusChange(CoreTextField.kt:962)
E at androidx.compose.foundation.text.CoreTextFieldKt.access$notifyTextInputServiceOnFocusChange(CoreTextField.kt:1)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$focusModifier$1.invoke(CoreTextField.kt:293)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$focusModifier$1.invoke(CoreTextField.kt:282)
E at androidx.compose.ui.focus.FocusChangedModifierNode.onFocusEvent(FocusChangedModifier.kt:59)
E at androidx.compose.ui.focus.FocusEventModifierNodeKt.refreshFocusEventNodes(FocusEventModifierNode.kt:68)
E at androidx.compose.ui.focus.FocusTransactionsKt.requestFocusForChild(FocusTransactions.kt:208)
E at androidx.compose.ui.focus.FocusTransactionsKt.performRequestFocus(FocusTransactions.kt:69)
E at androidx.compose.ui.focus.FocusTransactionsKt.requestFocus(FocusTransactions.kt:44)
E at androidx.compose.ui.focus.FocusRequester.focus$ui_release(FocusRequester.kt:72)
E at androidx.compose.ui.focus.FocusRequester.requestFocus(FocusRequester.kt:63)
E at androidx.compose.foundation.text.CoreTextFieldKt.tapToFocus(CoreTextField.kt:939)
E at androidx.compose.foundation.text.CoreTextFieldKt.access$tapToFocus(CoreTextField.kt:1)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$pointerModifier$1.invoke-k-4lQ0M(CoreTextField.kt:342)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$pointerModifier$1.invoke(CoreTextField.kt:341)
E at androidx.compose.foundation.text.TextFieldPressGestureFilterKt$tapPressTextFieldModifier$1$2$2.invoke-k-4lQ0M(TextFieldPressGestureFilter.kt:81)
E at androidx.compose.foundation.text.TextFieldPressGestureFilterKt$tapPressTextFieldModifier$1$2$2.invoke(TextFieldPressGestureFilter.kt:54)
E at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
E at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
E at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
E at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:672)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:548)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:570)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:314)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:301)
E at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:183)
E at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:102)
E at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:98)
E at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1371)
E at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1323)
E at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1263)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:500)
E at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1905)
E at android.app.Dialog.dispatchTouchEvent(Dialog.java:911)
E at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
E at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:458)
E at android.view.View.dispatchPointerEvent(View.java:15262)
E at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6654)
E at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6454)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5910)
E at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5967)
E at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5933)
E at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6098)
E at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5941)
E at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6155)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5914)
E at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5967)
E at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5933)
E at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5941)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5914)
E at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8996)
E at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8947)
E at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8916)
E at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9119)
E at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267)
E at android.os.MessageQueue.nativePollOnce(Native Method)
E at android.os.MessageQueue.next(MessageQueue.java:335)
E at android.os.Looper.loopOnce(Looper.java:161)
E at android.os.Looper.loop(Looper.java:288)
E at android.app.ActivityThread.main(ActivityThread.java:7872)
E at java.lang.reflect.Method.invoke(Native Method)
E at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
E Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@a05fbf2, androidx.compose.runtime.BroadcastFrameClock@67c3243, StandaloneCoroutine{Cancelling}@d0400c0, AndroidUiDispatcher@76f01f9]
Steps to reproduce should be quite simple. Just create some BottomSheetDialogFragment which will have compose view inside and in that compose view you should have some TextInputs. Also im using FocusRequester in that compose screen.
In compose 1.4.3 - keyboard was shown properly when i clicked into text inputs there BUT if i clicked on some input which was partially hidden under keyboard it caused crash (see stacktrace above). In compose 1.5.0-alpha03 - keyboard is not showing when i clicked into some text input - instead it will just do that crash (see stacktrace above).
This issue occur on Samsung S23 and also on emulator.
I think its related to
Please act urgently and increase this ticket priority because its important issue. Thanks
ed...@gmail.com <ed...@gmail.com> #28
I am using BOM 2023.04.01. No matter which version I use for androidx.compose.ui it does not work.
I am wondering whether there is some other dependency overriding the fix in a way that is does not work.
su...@gmail.com <su...@gmail.com> #29
when using the emulator, keyboard doesn't show up until you start typing using the hardware keyboard
ro...@google.com <ro...@google.com>
si...@google.com <si...@google.com> #30
P1 since it is reported to be a regression.
se...@google.com <se...@google.com> #31
First, prioritizing this as a regression for 1.5 and adding to burndown list. Lets get this sorted.
Second, the fix in this bug is only included in:
- Patch release: 1.4.3
- Alpha release: 1.5.0-alpha04
It was not included in 1.5.0-alpha03 as it didn't make the release cut.
In compose 1.4.3 - keyboard was shown properly when i clicked into text inputs there BUT if i clicked on some input which was partially hidden under keyboard it caused crash (see stacktrace above).
Thank you!
Can you share a minimal repro against 1.4.3 or 1.5.0-alpha04 with repro steps help expedite the fix.
Thanks!
ja...@gmail.com <ja...@gmail.com> #32
I tried version 1.5.0-alpha04 - keyboard is shown properly in that dialog but there is still that crash below (but its related to
E at androidx.compose.ui.node.NodeCoordinator.localToRoot-MK-Hz9U(NodeCoordinator.kt:844)
E at androidx.compose.foundation.text.TextFieldDelegate$Companion.notifyFocusedRect$foundation_release(TextFieldDelegate.kt:173)
E at androidx.compose.foundation.text.CoreTextFieldKt.notifyFocusedRect(CoreTextField.kt:1111)
E at androidx.compose.foundation.text.CoreTextFieldKt.notifyTextInputServiceOnFocusChange(CoreTextField.kt:962)
E at androidx.compose.foundation.text.CoreTextFieldKt.access$notifyTextInputServiceOnFocusChange(CoreTextField.kt:1)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$focusModifier$1.invoke(CoreTextField.kt:293)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$focusModifier$1.invoke(CoreTextField.kt:282)
E at androidx.compose.ui.focus.FocusChangedModifierNode.onFocusEvent(FocusChangedModifier.kt:59)
E at androidx.compose.ui.focus.FocusEventModifierNodeKt.refreshFocusEventNodes(FocusEventModifierNode.kt:68)
E at androidx.compose.ui.focus.FocusTransactionsKt.requestFocusForChild(FocusTransactions.kt:208)
E at androidx.compose.ui.focus.FocusTransactionsKt.performRequestFocus(FocusTransactions.kt:69)
E at androidx.compose.ui.focus.FocusTransactionsKt.requestFocus(FocusTransactions.kt:44)
E at androidx.compose.ui.focus.FocusRequester.focus$ui_release(FocusRequester.kt:72)
E at androidx.compose.ui.focus.FocusRequester.requestFocus(FocusRequester.kt:63)
E at androidx.compose.foundation.text.CoreTextFieldKt.tapToFocus(CoreTextField.kt:939)
E at androidx.compose.foundation.text.CoreTextFieldKt.access$tapToFocus(CoreTextField.kt:1)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$pointerModifier$1.invoke-k-4lQ0M(CoreTextField.kt:342)
E at androidx.compose.foundation.text.CoreTextFieldKt$CoreTextField$pointerModifier$1.invoke(CoreTextField.kt:341)
E at androidx.compose.foundation.text.TextFieldPressGestureFilterKt$tapPressTextFieldModifier$1$2$2.invoke-k-4lQ0M(TextFieldPressGestureFilter.kt:81)
E at androidx.compose.foundation.text.TextFieldPressGestureFilterKt$tapPressTextFieldModifier$1$2$2.invoke(TextFieldPressGestureFilter.kt:54)
E at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
E at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:178)
E at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:166)
E at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
E at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:670)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:546)
E at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:568)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:317)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
E at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
E at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:183)
E at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:102)
E at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:96)
E at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1376)
E at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1328)
E at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1268)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
E at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:500)
E at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1905)
E at android.app.Dialog.dispatchTouchEvent(Dialog.java:911)
E at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:70)
E at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:458)
E at android.view.View.dispatchPointerEvent(View.java:15262)
E at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6654)
E at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6454)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5910)
E at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5967)
E at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5933)
E at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6098)
E at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5941)
E at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6155)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5914)
E at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5967)
E at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5933)
E at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5941)
E at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5914)
E at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8996)
E at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8947)
E at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8916)
E at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:9119)
E at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267)
E at android.os.MessageQueue.nativePollOnce(Native Method)
E at android.os.MessageQueue.next(MessageQueue.java:335)
E at android.os.Looper.loopOnce(Looper.java:161)
E at android.os.Looper.loop(Looper.java:288)
E at android.app.ActivityThread.main(ActivityThread.java:7872)
E at java.lang.reflect.Method.invoke(Native Method)
E at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
E Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@dc5dd85, androidx.compose.runtime.BroadcastFrameClock@9c07da, StandaloneCoroutine{Cancelling}@96ff40b, AndroidUiDispatcher@c8872e8]```
se...@google.com <se...@google.com> #33
Thanks, we've split the TextField bits of
From my testing it looks like the relevant keyboard ime for this ticket is now fixed, and a new bug (
I will close this ticket if the only issue currently is the crash caused by !isAttached
which is now tracked in a new bug.
If anyone has a repro other than the following crash, please comment and will re-open.
Crash below now tracked in b/281984756
1 @main: CRASH DETECTED on thread Thread[main,5,main]
E java.lang.IllegalStateException: LayoutCoordinate operations are only valid when isAttached is true
E at androidx.compose.ui.node.NodeCoordinator.localToRoot-MK-Hz9U(NodeCoordinator.kt:850)
E at androidx.compose.foundation.text.TextFieldDelegate$Companion.notifyFocusedRect$foundation_release(TextFieldDelegate.kt:173)
E at androidx.compose.foundation.text.CoreTextFieldKt.notifyFocusedRect(CoreTextField.kt:1111)
ed...@gmail.com <ed...@gmail.com> #34
ju...@google.com <ju...@google.com> #35
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3-android:1.2.0-alpha02
ri...@gmail.com <ri...@gmail.com> #36
sa...@gmail.com <sa...@gmail.com> #37
I encountered the problem described above on devices with API 28 (emulator and real device). When receiving focus on a TextField(BasicTextField) inside a ModalBottomSheet that is called from a BottomSheetDialogFragment, the keyboard does not appear.
I tried using the hack described above, but it doesn't work.
The latest BOM version is currently 2024.02.00.
mt...@gmail.com <mt...@gmail.com> #38
With Compose BOM Version 2024.02.00, the keyboard is still not showing in a DialogFragment, where ComposeView is used from within onCreateDialog with AlertDialog.Builder.setView as described in
ha...@sina.com <ha...@sina.com> #39
bug still happen with compose bom version 2024.05.00
、、、
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowInsetsController com.android.internal.policy.DecorView.getWindowInsetsController()' on a null object reference at com.android.internal.policy.PhoneWindow.getInsetsController(PhoneWindow.java:3930) at androidx.core.view.WindowInsetsControllerCompat$Impl30.<init>(WindowInsetsControllerCompat.java:613) at androidx.core.view.WindowInsetsControllerCompat.<init>(WindowInsetsControllerCompat.java:102) at androidx.compose.ui.text.input.ImmHelper30.getInsetsControllerCompat(InputMethodManager.kt:133) at androidx.compose.ui.text.input.ImmHelper30.hideSoftInput(InputMethodManager.kt:152) at androidx.compose.ui.text.input.InputMethodManagerImpl.hideSoftInput(InputMethodManager.kt:83) at androidx.compose.ui.text.input.TextInputServiceAndroid.setKeyboardVisibleImmediately(TextInputServiceAndroid.android.kt:397) at androidx.compose.ui.text.input.TextInputServiceAndroid.processInputCommands(TextInputServiceAndroid.android.kt:302) at androidx.compose.ui.text.input.TextInputServiceAndroid.sendInputCommand$lambda$1(TextInputServiceAndroid.android.kt:209) at androidx.compose.ui.text.input.TextInputServiceAndroid.$r8$lambda$tFIm8sXGny3G873nGUe23EJe7OY(Unknown Source:0) at androidx.compose.ui.text.input.TextInputServiceAndroid$$ExternalSyntheticLambda0.run(Unknown Source:2) at androidx.compose.ui.text.input.TextInputServiceAndroid_androidKt.asExecutor$lambda$1$lambda$0(TextInputServiceAndroid.android.kt:504) at androidx.compose.ui.text.input.TextInputServiceAndroid_androidKt.$r8$lambda$RYljF3nl5HRu6JKEM8xFRHwbGFg(Unknown Source:0) at androidx.compose.ui.text.input.TextInputServiceAndroid_androidKt$$ExternalSyntheticLambda0.doFrame(Unknown Source:2) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1229) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239) at android.view.Choreographer.doCallbacks(Choreographer.java:899) at android.view.Choreographer.doFrame(Choreographer.java:827) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7872) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
、、、
di...@gmail.com <di...@gmail.com> #40
This bug is still present in BOM 2024.10.00
Description
Jetpack Compose version: 1.4.0-alpha03
Jetpack Compose component(s) used: Foundation + Material
Android Studio Build: Any
Kotlin version: 1.7.21
Steps to Reproduce or Code Sample to Reproduce:
Sample, requires
com.google.android.material:material
:Worked fine on 1.4.0-alpha02