Hi, my project is using compose multiplatform, and...
# compose-ios
f
Hi, my project is using compose multiplatform, and i got this frequent error : #11 0x0000000102c20c24 in kfun:org.jetbrains.skia.DirectContext#flushAndSubmit$default(org.jetbrains.skia.Surface;kotlin.Boolean;kotlin.Int){} () My project libs version : Kotlin : 2.2.0 CMP : 1.9.0-beta01 crashes occured on iOS devices
a
Hi! Is it happening on every run? Do you have a reproducer?\
f
Its rarely happening, but its common crash on my app
@Andrei Salavei Sometimes when navigating to other screen the crash occured
a
Thank you! What navigation library you're using? Also, please, file an issue in our YouTrack with Compose Multiplatform project. Attach full crashlog there and a test app with reproducer steps to speed-up investigation and fixing from our side.
f
Hi, sorry for late replies, i am using compose navigation for my app. Will try to issue in YouTrack and send full crashlog.
👍 1
Hi @Andrei Salavei i have submitted the bug to the youtrack. Thank you
👍 1
Hi @Andrei Salavei sorry for not follow up the youtrack post, i am currently have no time to post sample code project because the work schedule and the errors is very sneaky but here is what i found. 1. My project consist of navigation and features, and some features use UIKitViewController embedded to display SwiftUI view inside compose. When navigating from feature A to feature X which has one or more SwiftUI, This can cause directContext error, which i am suspecting comes from SwiftUI and skia initiating race issues. 2. After i modified the code, in which i only show swift view after onResumed, so far i am yet to see the errors of the apps. Tested on my iPhone 16
a
@ferdialif02, we regularly testing various combinations of Compose and SwiftUI during the release cycle and no issues where found. Unfortunately from your description it's not clear how to reproduce the problem - so the reproducer is needed. You can remove everything unrelated to the crash from the project and send me it directly with clear steps how to reproduce the crash. From our practice - when creating the reproducer, the bug goes away - and it means, something else is involved. For the reference - your ticket: https://youtrack.jetbrains.com/issue/CMP-8675/kfunorg.jetbrains.skia.DirectContextflushA[…]skia.Surfacekotlin.Booleankotlin.Int-8?backToIssues=false