Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: lifecycle-viewmodel
Version used: 2.8
Summary: the migration of ViewModelProvider to KMP seemingly reverted a 2 year old fix to an issue that had to do with desugaring for compileOnly dependencies in a library project.
Lifecycle 2.5.0 alpha accidentally broke backward compatibility, this was quickly fixed in Lifecycle 2.5.0-rc02, see this issue for context: https://issuetracker.google.com/issues/230454566
The fix was here:https://android-review.googlesource.com/c/platform/frameworks/support/+/2108693
The recent migration of ViewModelProvider.Factory to KMP seems to have reverted the fix:https://android-review.googlesource.com/c/platform/frameworks/support/+/2966765
As a result, the original runtime crash has surfaced again in lifecycle-viewmodel 2.8, as reported here:https://github.com/square/leakcanary/issues/2677
Someone created a repro at the time, you could probably reuse that to repro after updating the dependencies:https://github.com/dougnazar/leak_viewmodel