-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Crash when mixing with JavaFx coroutines #17
Comments
Interesting problem, seems Swing (used by Compose) and JavaFX coroutine dispatchers cannot coexist. So not sure, if such a config is supported. Is it possible to not use JFX coroutine dispatcher? |
Not a major issue for me TBH - I was going to rewrite JavaFX granulary but now I'll just write Compose GUI as a separate app. So, there is no need to waste time on fixing this. |
Please do waste time on fixing this. And anyway it is quite puzzling to me how is the simple presence of different dispatcher can cause an issue. What if I want to write or use other non-standard dispatchers? What causes the issue? What to look out for? |
I'd like to gradually experiment with Compose in a JavaFx application which is the desktop version and the control panel of the supporting service of a mobile application, and this is a showstopper for me, too. |
@igordmn IIRC you had simple fix with more explicit dispatcher selector. Can we apply it and check if it helps? |
Wild guess: just find and replace |
Users can use multiple dispatchers in their code. For example we can use JavaFX coroutine dispatcher: JetBrains/compose-multiplatform#17 In that case Dispatchers.Main will become Dispatchers.JavaFx and compose code will be not working properly. Test: ./gradlew jvmTest desktopTest -Pandroidx.compose.multiplatformEnabled=true Change-Id: I91a35a4bad8a62a7a533c80dabbbddc213f36baa
@dector could you please check if issue has gone with the build "0.2.0-build123"? |
@olonho |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
I'm migrating existing JavaFx app to current Compose version. Found an issue when trying to render
Text()
:Log fragment
This happens only when
Text()
is present in hierarchy ANDjavafx coroutines
are included as a dependency.Here is MRS (open it in IDEA and run
MainKt
- app will crash almost instantly).compose-issue.zip
The text was updated successfully, but these errors were encountered: