https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
m

Marcin Wisniowski

05/23/2022, 9:58 PM
Long shot, but after updating (Compose Compiler
1.1.0-beta03
, Kotlin
1.5.31
) to (Compose Compiler
1.1.0-beta04
, Kotlin
1.6.0
) I am having a weird issue where after navigating back to a Fragment the Fragment's UI (View-based, not Compose) is no longer responsive. Single-activity app with navigation component, issue appears with any View-based Fragment after navigating back to it (fine on Compose Fragments). I am having a hard time debugging this, or seeing why would updating the Compose Compiler affect non-Compose Fragments, did anyone see a similar issue?
b

Berkeli Alashov

05/23/2022, 10:32 PM
I think I have the same exact issue, reported here. Confirmed by downgrading compose compiler to
1.1.0-beta03
and kotlin to
1.5.31
(I was on
1.2.0-beta01
before). It's working as expected on
1.1.0-beta03
and this weird behavior starts happening with
1.1.0-beta04
We need to find a simple reproducible example..
I'm glad I saw your report here, this has been bugging me since Friday 😄
m

Marcin Wisniowski

05/23/2022, 10:38 PM
I'm seeing exactly the same behavior as in your message: all code seemingly works, breakpoints are hit, but UI is as if inflated with no code ran. I have now removed all of Compose from my app, and confirmed the issue appears only due to adding
buildFeatures { compose true }
, even with no Compose usage whatsoever.
b

Berkeli Alashov

05/23/2022, 10:40 PM
@Ian Lake Do you have any suggestions on how to debug this?
a

Adam Powell

05/24/2022, 1:03 PM
Check your resolved library dependency versions with Gradle before and after to see if you've pulled along any other library version updates, that'll give a place to start from
b

Berkeli Alashov

05/24/2022, 6:37 PM
I ran
./gradlew app:dependencies
before and after changing
1.1.0-beta03
to
beta04
+ kotlin version, but it doesn't seem to give any useful info. Here's the diff: https://pastebin.com/FcRjPa5V
m

Marcin Wisniowski

05/24/2022, 6:43 PM
Just updating Kotlin to 1.6.0 does not trigger the bug, but toggling on
buildFeatures { compose true }
does. There is nothing to diff in that case: just enabling the compose build feature triggers the bug.
I found the problem, the bug happens only on screens that use Kotlin synthetics for views. Once I removed Kotlin synthetics and replaced them with
findViewById
the bug is gone. Of course this doesn't answer why it happens, but it seems the Compose Compiler breaks something in Kotlin synthetics for views. High time to migrate away I guess, although they were supposed to work until Kotlin 1.8, and I was hoping to skip View Binding and migrate straight to Compose by the time Kotlin 1.8 comes out. @Berkeli Alashov Can you confirm the issue is gone for you if you remove Kotlin synthetics from an affected Fragment/screen?
🎉 2
b

Berkeli Alashov

05/24/2022, 7:10 PM
I see usages of kotlin synthetics in affected fragments, but it would take too much time to migrate rn. I'm going to try add kotlin synthetics where we're using view binding (simpler to migrate since smaller screen) to see if it breaks.
m

Marcin Wisniowski

05/24/2022, 7:12 PM
I tried it with a simpler Fragment, where putting some `findViewById`s instead was quick to test.
It will be quite time consuming for me to migrate 30+ screens from synthetics to View Binding but I don't see another option now.
b

Berkeli Alashov

05/24/2022, 7:28 PM
Can confirm, kotlin synthetics + compose compiler 1.1.0-beta04 + kotlin 1.6.0 causes this bug. Tested by adding kotlin synth to unaffected screen. Migrating that many screens rn isn't an option for me either (found 86 files using using
kotlinx.android.synthetic
..) I guess now we can create reproducible example & report the bug.
m

Marcin Wisniowski

05/24/2022, 7:29 PM
Are you sure about these versions? On 1.1.0-beta03 it's fine for me. Bug appears from 1.1.0-beta04.
b

Berkeli Alashov

05/24/2022, 7:30 PM
my bad.. I meant 1.1.0-beta04 and 1.6.0 (fixed now)
👍 1
Created reproducible example/demo here: https://github.com/alashow/MultipleBackStackNavComponent @Marcin Wisniowski Could you create an issue with this demo? (I can do it tomorrow if you have not)
m

Marcin Wisniowski

05/30/2022, 7:25 PM
Thanks for raising it, I was away. I just finished migrating 30+ screens from synthethics to View Binding so that it doesn't affect me anymore. Not fun.
b

Berkeli Alashov

05/30/2022, 7:29 PM
Seems like we will have to migrate too.. https://kotlinlang.slack.com/archives/CJLTWPH7S/p1653687605042499 What part of the migration wasn’t fun? Hopefully it’s just bulk renames of variables from
myView
to
binding.myView
m

Marcin Wisniowski

05/30/2022, 7:31 PM
In theory, yes, but there is a lot of it, and there are complications in custom Views and RecyclerView adapters. Nothing problematic but just tedious.