-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[camera_android_camerax] Fixes premature garbage collection of native objects when app is under memory pressure #9287
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: camera_android_camerax | |
description: Android implementation of the camera plugin using the CameraX library. | ||
repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax | ||
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 | ||
version: 0.6.16 | ||
version: 0.6.16+1 | ||
|
||
environment: | ||
sdk: ^3.6.0 | ||
|
@@ -31,7 +31,7 @@ dev_dependencies: | |
sdk: flutter | ||
leak_tracker_flutter_testing: any | ||
mockito: ^5.4.4 | ||
pigeon: ^25.3.1 | ||
pigeon: ^25.3.2 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to clarify: this is a guess at the fix for flutter/flutter#152763 or have you determined this is the cause? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is a guess, but a very educated guess. I haven't been able to reproduce the exact error from the camerax_issue, but I have been able to reproduce the issues from flutter/flutter#168531 and flutter/flutter#168306 on iOS. Both of these are similar to the camerax_issue because they are I think it is harder to reproduce the error on Android because garbage collection for Java is nondeterministic and it requires the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah gotcha makes sense! SGTM :) |
||
|
||
topics: | ||
- camera |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In #8618, I manually added this to the generated pigeon file
CameraXLibrary.g.kt
. To prevent the need to manually change generated code, I moved the disable here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working on another camera PR (#9264) and I created a baseline lint file for that same
UnsafeOptInUsageError
lint. I think that might be better just in case the lint is valid for non-generated files, but let me know what you think!If you agree and these other lints are from
CameraXLibrary.g.kt
, maybe we should remove them and just regenerate the baseline file.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll wait for #9264 to land and then regen the baseline file for this PR