We are seeing some crashes on iOS, specifically ar...
# compose-ios
j
We are seeing some crashes on iOS, specifically around keyboards and text input, and backgrounding/foregrounding the app. Our usecase is: two screens, both with input fields, a network request between them which is enough to put it in the background whilst it performs and comes back. There are no good stacktrace at all sadly, so I am just wondering if anyone else have seen crashes or weird behaviours with keyboards and such on iOS?
ok, that was a red herring. just backgrounding and forgrounding the iOS app several times on a screen with no text input or keyboards, behaves the same it seems.
so, ignore me whilst i keep pulling my hair in despair
a
what is your Compose version?
j
Copy code
compose-multiplatform = "1.10.1"
I can't replicate the issue without a textfield on the screen, but it does not matter if i use textfield state or the older value approach
a
Thank you. The issue I thought about initially must be fixed in this version - unfortunately no other value ideas so far. Maybe you can try 1.11.0-alpha03 - would it be better? Also, what crashlogs you have?
j
I am trying to replicate it in an isolated project, to see what it could be. Will also try that alpha. The crashlogs are super helpful...
Copy code
thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x5d64fdda2040d8)
  * frame #0: 0x000000019d153020 libobjc.A.dylib`objc_msgSend + 32
    frame #1: 0x000000019d8541d0 Foundation`__NSThreadPerformPerform + 264
    frame #2: 0x00000001a020ff10 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
    frame #3: 0x00000001a020fe84 CoreFoundation`__CFRunLoopDoSource0 + 172
    frame #4: 0x00000001a01edacc CoreFoundation`__CFRunLoopDoSources0 + 232
    frame #5: 0x00000001a01c46d8 CoreFoundation`__CFRunLoopRun + 820
    frame #6: 0x00000001a01c3a6c CoreFoundation`_CFRunLoopRunSpecificWithOptions + 532
    frame #7: 0x0000000241dd8498 GraphicsServices`GSEventRunModal + 120
    frame #8: 0x00000001a5b9edf8 UIKitCore`-[UIApplication _run] + 792
    frame #9: 0x00000001a5b47e54 UIKitCore`UIApplicationMain + 336
    frame #10: 0x00000001a8e5ad20 SwiftUI`closure #1 in KitRendererCommon(_:) + 168
    frame #11: 0x00000001a8e578d4 SwiftUI`runApp(_:) + 112
    frame #12: 0x00000001a8e573c0 SwiftUI`static App.main() + 172
    frame #14: 0x000000010b6ab40c OurApp.debug.dylib`main at OurApp.swift:0
    frame #15: 0x000000019d1d6e28 dyld`start + 7116
😅 1
did not work updating to the alpha.
a
Hm.. if you will be able to create a reproducer - please file an issue in out YouTrack.
j
yeah will see what I can churn out
Ok. i have found the commit which is when this started happening. I can not reproduce before this commit Single line change as well, and i guess I could have made assumptions that this would be a reason:
gradle.properties -> kotlin.native.binary.objcDisposeOnMain=false
I need to go back to the team to understand exactly why they needed this, I think it was mostly due to performance issues on some heavy canvas drawing.
will add to a small project to see if i can reproduce in isolation
yeah i can. I mean, knowing that we have that line in gradle properties, do you still want a project reproducing this?
here is the exact issue you created on the topic 😄 https://youtrack.jetbrains.com/issue/CMP-7115/Compose-app-with-TextField-crashes