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

TextField error: kotlin.IllegalStateException: ComposeScene is closed #5001

Closed
liufeng382641424 opened this issue Jun 20, 2024 · 4 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists

Comments

@liufeng382641424
Copy link

liufeng382641424 commented Jun 20, 2024

Version 1.6.11, the exception only occurs on iPhone 6 6s 7 7Plus. There are 2 input boxes on the page. I enter text in one of the input boxes and double-click to pop up the copy prompt box. At this time, clicking to switch to the other input box will cause an exception. Please try a few more times.

Here is my code:
`Column {
TextField(
value = "123",
onValueChange = {}
)

        TextField(
            value = "",
            onValueChange = {}
        )
    }`

The error is as follows:
Uncaught Kotlin exception: kotlin.IllegalStateException: ComposeScene is closed
at 0 My App 0x100ffa9af kfun:kotlin.Throwable#(kotlin.String?){} + 119
at 1 My App 0x100ff3e8f kfun:kotlin.Exception#(kotlin.String?){} + 115
at 2 My App 0x100ff40af kfun:kotlin.RuntimeException#(kotlin.String?){} + 115
at 3 My App 0x100ff464f kfun:kotlin.IllegalStateException#(kotlin.String?){} + 115
at 4 My App 0x101694a73 kfun:androidx.compose.ui.scene.SingleLayerComposeSceneImpl.invalidatePositionInWindow#internal + 271
at 5 My App 0x10175b08f kfun:androidx.compose.ui.scene.ComposeScene#invalidatePositionInWindow(){}-trampoline + 91
at 6 My App 0x1016ebfd7 kfun:androidx.compose.ui.scene.ComposeSceneMediator.$lambda$14$lambda$13#internal + 1027
at 7 My App 0x1016f297f kfun:androidx.compose.ui.scene.ComposeSceneMediator.$$lambda$14$lambda$13$FUNCTION_REFERENCE$52.invoke#internal + 87
at 8 My App 0x1016f2a83 kfun:androidx.compose.ui.scene.ComposeSceneMediator.$$lambda$14$lambda$13$FUNCTION_REFERENCE$52.$invoke(kotlin.Double){}#internal + 123
at 9 My App 0x1011250c3 kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 107
at 10 My App 0x10171146f kfun:androidx.compose.ui.window.ComposeSceneKeyboardOffsetManager.#internal + 203
at 11 My App 0x101712b63 kfun:androidx.compose.ui.window.ComposeSceneKeyboardOffsetManager.animateKeyboard$updateAnimationValues#internal + 375
at 12 My App 0x101713bef kfun:androidx.compose.ui.window.ComposeSceneKeyboardOffsetManager.object-1.animationDidUpdate#internal + 139
at 13 My App 0x101713c93 kfun:androidx.compose.ui.window.ComposeSceneKeyboardOffsetManager.object-1.$imp:animationDidUpdate#internal + 143
at 14 QuartzCore 0x184fdfceb + 759
at 15 QuartzCore 0x184fe687f + 367
at 16 CoreFoundation 0x1814dfa3b + 171
at 17 CoreFoundation 0x18151fc8b + 55
at 18 CoreFoundation 0x18152328f + 595
at 19 CoreFoundation 0x1814e049f + 2391
at 20 CoreFoundation 0x1814f3193 CFRunLoopRunSpecific + 571
at 21 GraphicsServices 0x1a2026987 GSEventRunModal + 159
at 22 UIKitCore 0x183cf6a87 + 1079
at 23 UIKitCore 0x183a8ffc7 UIApplicationMain + 335
at 24 SwiftUI 0x188d48d67 + 159
at 25 SwiftUI 0x188c9383b + 179
at 26 SwiftUI 0x188c791db $s7SwiftUI3AppPAAE4mainyyFZ + 95
at 27 My App 0x1001a07b7 $s8My_App6iOSAppV5$mainyyFZ + 39
at 28 My App 0x1001a0867 main + 11
at 29 dyld 0x1049ec4cf 0x0 + 4372481231

@liufeng382641424 liufeng382641424 added bug Something isn't working submitted labels Jun 20, 2024
@MatkovIvan
Copy link
Member

Based on stack trace, it's clearly the same as #4916 and fixed by JetBrains/compose-multiplatform-core#1384

@MatkovIvan MatkovIvan added duplicate This issue or pull request already exists and removed submitted labels Jun 20, 2024
@MatkovIvan
Copy link
Member

Sorry, from your previous description without stacktrace it wasn't clear

@liufeng382641424
Copy link
Author

#3286 It works on desktop.
I hope there is a temporary solution on iOS, for example, if I disable the pop-up prompt box when double-clicking or long pressing, it should not trigger the exception if it does not pop up. tks @MatkovIvan

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants