Skip to content
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

Fix leakage of JNI object references #90710

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

m4gr3d
Copy link
Contributor

@m4gr3d m4gr3d commented Apr 15, 2024

Fixes #87548

The issue occurred because we were continuously allocating local references to jstring objects in GodotJavaWrapper::has_feature(...) and not deleting them after using them.

In addition to deleting local references in that method, I took a pass at the rest of the codebase and did the same where needed.

Additional testing would be appreciated to ensure no regressions where introduced in the cleanup.

@m4gr3d m4gr3d added bug platform:android topic:porting needs testing cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release labels Apr 15, 2024
@m4gr3d m4gr3d added this to the 4.3 milestone Apr 15, 2024
@m4gr3d m4gr3d requested a review from a team as a code owner April 15, 2024 17:36
@skrillfalconblast
Copy link

I've tested it out on an S6 Edge running Android 7, its a perfect fix.

@akien-mga akien-mga merged commit 8c474dd into godotengine:master Apr 22, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@m4gr3d m4gr3d deleted the fix_jstring_leaks branch April 22, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release platform:android topic:porting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android build crashes when typing in LineEdit and TextEdit
3 participants