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

Embedding Godot in existing Android projects memory leaks #95060

Open
hardikbhalodi opened this issue Aug 2, 2024 · 2 comments
Open

Embedding Godot in existing Android projects memory leaks #95060

hardikbhalodi opened this issue Aug 2, 2024 · 2 comments

Comments

@hardikbhalodi
Copy link

hardikbhalodi commented Aug 2, 2024

Tested versions

version: 4.2.2.stable

Device: Samsung S10 Lite (Android 13)

System information

Ubuntu 22.04.4 LTS, GODOT ENGINE version: 4.2.2.stable, Device: Samsung S10 Lite (Android 13)

Issue description

I just tried the official demo GLTF viewer
https://github.com/m4gr3d/Godot-Android-Samples/tree/master/apps/gltf_viewer

When i close the app with back button of device below error came in log and also sometime app crashing

**Object::Destroy(0xb4000079e9dc7f00) for engine ignored; 2 total active objects
16:55:00.866 libOpenSLES              E  Object::Destroy(0xb4000079e9dc7f00) for engine ignored; active object ID 2 at 0xb4000079e9c08e00
16:55:00.866 libOpenSLES              E  Object::Destroy(0xb4000079e9dc7f00) for engine ignored; active object ID 3 at 0xb4000079e9c4c400
16:55:00.914 godot                    E  USER WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
16:55:00.914 godot                    E     at: cleanup (core/object/object.cpp:2209)
16:55:00.935 libc                     A  FORTIFY: pthread_mutex_trylock called on a destroyed mutex (0xb400007a6573c66c)
16:55:00.936 libc                     A  Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 28395 (AudioTrack), pid 28260 (com.gododemo3)
16:55:01.245 DEBUG                    A  Cmdline: com.gododemo3
16:55:01.245 DEBUG                    A  pid: 28260, tid: 28395, name: AudioTrack  >>> com.gododemo3 <<<
16:55:01.245 DEBUG                    A        #04 pc 00000000000c2d7c  /data/app/~~RGYPDDw01I0KEmkQOkUWMw==/com.gododemo3-EfB8SEs8A_rvRlWxX7KLPw==/base.apk!libc++_shared.so (std::__ndk1::recursive_mutex::try_lock()+12) (BuildId: 25b13e08a3a359bf0ac835176dfbc89a7b30c1c4)
16:55:01.245 DEBUG                    A        #05 pc 0000000000d6e620  /data/app/~~RGYPDDw01I0KEmkQOkUWMw==/com.gododemo3-EfB8SEs8A_rvRlWxX7KLPw==/base.apk!libgodot_android.so**

i also made the Node2D hello world demo both have same issue.

Steps to reproduce

Load the demo app in android phone and press back button.

Minimal reproduction project (MRP)

GodotoDemo3_App.zip
TestEmbedded_GODOT_PROJECT.zip

@kus04e4ek
Copy link
Contributor

kus04e4ek commented Aug 2, 2024

Can you check Godot 4.3 RC 2? There were some issues about memory leaks and crashes fixed on Android.
ObjectDB instances leaked at exit is definetly a weird one, could have been fixed in 4.3 too though.

@hardikbhalodi
Copy link
Author

Tested with 4.3 , issue persist and seems now app not quite on mobile back press just hang on embedded view screen.

USER WARNING: 2 RIDs of type "CanvasItem" were leaked.
16:53:28.118 godot E at: _free_rids (servers/rendering/renderer_canvas_cull.cpp:2485)
16:53:28.123 godot E ERROR: 2 RID allocations of type 'PN18TextServerAdvanced22ShapedTextDataAdvancedE' were leaked at exit.
16:53:28.126 godot E USER WARNING: ObjectDB instances leaked at exit (run with --verbose for details).
16:53:28.126 godot E at: cleanup (core/object/object.cpp:2284)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants