godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.3k stars 21.06k forks source link

Android editor crashes when running multiple instances of a project #98080

Open MRBossASIF-DEV opened 1 week ago

MRBossASIF-DEV commented 1 week ago

Tested versions

Tested Versions:

Current Version: Godot 4.4.0 dev3 (commit hash: [insert commit hash here if available])

Reproducibility:

The issue is consistently reproducible in the current version (4.4.0 dev3).

Additional Versions Tested:

  1. Godot 4.3.stable:

Issue: Reproducible

  1. Godot 4.2.stable:

Issue: Reproducible

  1. Godot 4.1.stable:

Issue: Reproducible

  1. Godot 4.2.dev1:

Issue: Reproducible

  1. Godot 4.2.dev2:

Issue: Reproducible

Summary:

The bug is reproducible across all tested versions. This indicates that it is not a regression, as the issue has been present in these versions. Identifying the root cause will be essential for resolving the problem

System information

System Information: Operating System: Android 11 Device Model: Infinix Hot 11 Play CPU Model: MediaTek Helio G35 CPU Architecture: ARM64 GPU Model: PowerVR GE8320 RAM: 3 GB / 4 GB Storage: 32 GB / 64 GB (expandable via microSD) Battery: 6000 mAh Rendering Backend: GLES3 (or specify GLES2, Vulkan, etc., as applicable) Godot Version: Godot 4.4.0 dev3

Issue description

https://github.com/user-attachments/assets/56806949-6966-4992-9c26-abb6c3149a7d

I am facing a critical issue in my Godot project on Android. Whenever I open multiple instances of the application, the app closes automatically right after running the project. There is no error message or crash log— the app just exits abruptly. It seems like the app is unable to handle more than one instance properly, leading to an immediate closure.

The issue does not appear to be related to any specific bug in the code, as the app works perfectly with a single instance. However, as soon as I try to run multiple instances, the app cuts off and closes without any warning.

This is a major problem because I am developing a multiplayer game, and running multiple instances is crucial for testing and gameplay. Without resolving this issue, it is impossible to proceed with the multiplayer functionality. I would appreciate it if this could be addressed and fixed as soon as possible.

Steps to reproduce

  1. Open the Godot project on an Android device.

  2. Run the project and open a single instance of the app. The app works fine.

  3. Now, attempt to open multiple instances of the app (either by launching it again or through a multitasking action on the Android device).

  4. Notice that the app exits automatically without any error or crash log right after running the second instance.

If needed, I can provide a minimal reproduction project that demonstrates this issue. It includes basic scenes and the necessary setup to replicate the problem on Android. Simply run the project on an Android device, open multiple instances, and observe the app's behavior as described above.

Minimal reproduction project (MRP)

I have created a minimal reproduction project that demonstrates the issue. The project is written in GDScript, as C# is not supported for Android development in this context.

The project includes only the necessary files to reproduce the issue, and I have ensured that the .godot folder is not included in the archive (the project.godot file is retained).

You can upload the ZIP archive of the project here (max 10 MB).

If the reproduction steps are not project dependent, you can specify that as well.


Feel free to add any specific instructions or details about how to use the project when you upload it!

MRBossASIF-DEV commented 1 week ago

Not hot 11. System Is infinix hot 12 play

Calinou commented 1 week ago

I don't think running multiple instances was tested on Android when it was implemented, so it's probably not supported and should be hidden in the UI for now.

Even if it was possible, it would be very demanding on the hardware. Individual instances would have a hard time keeping a playable framerate and the device could run out of memory, especially with 3+ instances or on old/low-end devices.

MRBossASIF-DEV commented 1 week ago

Thank you for the clarification, Hugo. It makes sense that running multiple instances on Android could cause performance issues, especially on low-end devices. For now, hiding this option in the UI seems like a reasonable solution. If there's any need for further testing or feedback regarding this, I would be happy to assist.

On Fri, Oct 11, 2024, 7:17 PM Hugo Locurcio @.***> wrote:

I don't think running multiple instances was tested on Android when it was implemented, so it's probably not supported and should be hidden in the UI for now.

Even if it was possible, it would be very demanding on the hardware. Individual instances would have a hard time keeping a playable framerate and the device could run out of memory, especially with 3+ instances or on old/low-end devices.

— Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/98080#issuecomment-2407397811, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKIDJRYRKOPCJ62L5V6SOQLZ27FXRAVCNFSM6AAAAABPYCBMUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBXGM4TOOBRGE . You are receiving this because you authored the thread.Message ID: @.***>