Fixed
Status Update
Comments
au...@google.com <au...@google.com> #2
You need to temporarily add following to your build.gradle
:
tasks.withType(KotlinCompile).configureEach {
kotlinOptions {
freeCompilerArgs += [
"-Xjvm-default=all",
]
}
}
Note that in certain circumstances you may want to use all-compatibility
instead of all
, learn more about that in
Starting with kotlin 1.6.20 you won't need touch build.gradle
for more information see
ca...@google.com <ca...@google.com> #3
Which of the build.gradle files am I to add the code above as there are 2 build.gradle files
py...@gmail.com <py...@gmail.com> #4
en el Module.
ca...@google.com <ca...@google.com> #5
I have tried adding the code in various places in my Module level build.gradle
but keep receiving the error
Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'KotlinCompile' for extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
at org.gradle.internal.metaobject.AbstractDynamicObject.getMissingProperty(AbstractDynamicObject.java:85)
at org.gradle.internal.metaobject.ConfigureDelegate.getProperty(ConfigureDelegate.java:130)
Can you please provide a more detailed example of how to use the temporary code within a Module level build.gradle
file?
ca...@google.com <ca...@google.com> #6
This is what worked for me. Try adding the code to app level build.gradle
file:
android {
...
kotlinOptions {
...
freeCompilerArgs += [
"-Xjvm-default=all",
]
}
}
py...@gmail.com <py...@gmail.com> #7
deleted
Description
Answers for bug triage
What's going on
WindowOnBackInvokedDispatcher$OnBackInvokedCallbackWrapper
stub instances are held in memory by native refs (as is normal with any IPC call). The IPC call in question isIWindowSession.setOnBackInvokedCallback()
.WindowOnBackInvokedDispatcher$OnBackInvokedCallbackWrapper.mCallback
is therefore also held in memory, and it references a ViewRootImpl anonymous impl of that callback, therefore leaking the entire view hierarchy long after the view root was detached.Leak trace
Heap Dump
Heap dump uploaded to drive (access limited toandroid-bugreport@google.com ): https://drive.google.com/file/d/1q4DloxTA32UmNeMwEKW2I62VDHbBl-uk/view?usp=sharing
Fix
The fix is most likely to set
OnBackInvokedCallbackWrapper.mCallback
to null on unregister.Twitter thread
Come say hi!https://twitter.com/Piwai/status/1513977972293730304