godot icon indicating copy to clipboard operation
godot copied to clipboard

Older project from Godot 4.0 won't work properly on godot 4.1.0 when running the project

Open pixelguy106 opened this issue 1 year ago • 7 comments

Godot version

4.0.1 stable

System information

Godot v4.1.stable - Android - Vulkan (Compatibility) - PowerVR Rogue GE8300 - (4 Threads)

Issue description

This project worked properly on Godot Android Editor 4.0 stable. However, after I updated Godot to the new version, which is 4.1, I encountered an issue. When I tried to open the project, a pop-up message appeared, stating that the project itself would be upgraded to make it compatible with the new version. I proceeded with the upgrade, but when I tried to run the project, the game froze. To resolve this, I closed the game and reopened it, and everything worked fine as intended. However, upon running the project again, the game froze once more. I had to go back and reopen it again to get it to work properly. This issue is quite annoying because every time I go back, it closes Godot itself, and it takes a long time to reload my project. It feels like a waste of time.

Steps to reproduce

First, you need an old project created in Godot 4.0 stable. Then, update the Godot editor to version 4.1. After updating, open the project again. When you try to open it, a message will pop up, stating that you need to upgrade the project. Once the upgrade is complete, try running the project. However, in my case, whenever I try to move the character using a button, the game freezes indefinitely.

Minimal reproduction project

If you open an old project in a new version of Godot and try to run it, you may encounter two scenarios.

  1. The game freezes after performing certain inputs: In this case, after opening the old project in the new version, when you try to run it and perform certain inputs (such as moving the character using buttons), the game freezes.

  2. The game works properly: Alternatively, after opening the old project in the new version and running it, the game functions correctly without any freezing issues.

These scenarios may vary depending on the specific project and any compatibility issues that arise when transitioning from an older version of Godot to a newer one.

https://github.com/godotengine/godot/assets/112818755/c05cecaf-62cf-4708-a85b-ac7246f5a45f

pixelguy106 avatar Jul 08 '23 05:07 pixelguy106

@pixelguy106 Please upload a minimal reproduction project to make this easier to troubleshoot.

Calinou avatar Jul 08 '23 13:07 Calinou

@pixelguy106 Please upload a minimal reproduction project to make this easier to troubleshoot.

I think the bug originates from the touch button usage. Specifically, the game freezes when using it. However, when I close and reopen Godot, the issue is resolved, as you can see in the video.

pixelguy106 avatar Jul 08 '23 14:07 pixelguy106

@pixelguy106 Yes, but we still need a way to reproduce the issue locally :slightly_smiling_face:

Otherwise, we'll have to close this issue as there's no way a contributor could fix it.

Calinou avatar Jul 08 '23 14:07 Calinou

@pixelguy106 Yes, but we still need a way to reproduce the issue locally 🙂

Otherwise, we'll have to close this issue as there's no way a contributor could fix it.

If there is anything I can help, just let me know I am happy to assist you more further

pixelguy106 avatar Jul 08 '23 14:07 pixelguy106

If there is anything I can help, just let me know I am happy to assist you more further

What I mean is, we need a copy of your project to be able to do anything. This should preferably be a stripped down project with no unnecessary files included to narrow the issue down, but the stripped project should be able to run on its own.

Calinou avatar Jul 09 '23 13:07 Calinou

An MRP (the link provided no longer contains the instructions for creating an MRP, as they were moved to the issue template):

  • A small Godot project which reproduces the issue, with no unnecessary files included. Be sure to not include the .godot folder in the archive (but keep project.godot).
  • Drag and drop a ZIP archive to upload it. Do not select another field until the project is done uploading.
  • Note for C# users: If your issue is not Mono-specific, please upload a minimal reproduction project written in GDScript or VisualScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a Mono setup available.

AThousandShips avatar Jul 09 '23 13:07 AThousandShips

bugs minium production.zip

Here the minimum bug reproductive.

I run it on the Godot Android editor. Note that if you run it directly from the main menu, the project doesn't freeze. However, once you open the project and run it inside the editor, the game freezes.

Here another example project but created from 4.0 version, almost similar but the bug is still the same test project.zip

pixelguy106 avatar Jul 10 '23 06:07 pixelguy106

The bug is still present in the newer build. I think this bug should be one of the priorities.

pixelguy106 avatar Jul 18 '23 03:07 pixelguy106

Is my code wrong? If so, how should it be implemented? It has been working without any issues before. Also, I discovered that if there is any error in the code, the entire program freezes when it runs. Previously, in version 4.0.3 stable, if there was an error in the code, only the part related to the error would stop, while other parts would continue to run. I suspect that the bugs originate from the multi-threading features, but it's only my assumption. If there is anything I can do to help resolve this, I would be happy to participate.

pixelguy106 avatar Jul 18 '23 14:07 pixelguy106

@YuriSizov @AThousandShips @ndarilek ??

pixelguy106 avatar Jul 19 '23 06:07 pixelguy106

@pixelguy106 Contributors help with issues on a best-effort basis with no ETA. Dozens of issues are opened every day. The Android editor is a complex area, and we have limited contributors with the expertise to address it.

Calinou avatar Jul 19 '23 14:07 Calinou

I think people should be banned from repos for randomly pinging folks to fix their issues. It's entitled and disruptive.

ndarilek avatar Jul 19 '23 17:07 ndarilek

@pixelguy106 Contributors help with issues on a best-effort basis with no ETA. Dozens of issues are opened every day. The Android editor is a complex area, and we have limited contributors with the expertise to address it.

Thank you for the clarification, and I apologize for pinging unnecessarily. I won't ping someone unless it's important.

pixelguy106 avatar Jul 20 '23 00:07 pixelguy106

I think people should be banned from repos for randomly pinging folks to fix their issues. It's entitled and disruptive.

Sorry for that. I won't ping someone unless it's very important. I want to clarify that this problem is not only affecting me but also other users of the Godot Android editor. The Godot Android editor has a smaller user base compared to the PC users, so the bugs might not be considered major issues for everyone, but they are significant for those using the Godot Android editor. Also, I want to point out that you can read my description of the bugs to understand why I highlighted them. I apologize for any annoyance I may have caused. :)

pixelguy106 avatar Jul 20 '23 01:07 pixelguy106

We are aware of this, no one is saying this isn't important or won't be focused on, we're just explaining why it hasn't been solved "yet" (it's been less than a month), and it was a statement on how it's hard to investigate it, not that it's not a priority

AThousandShips avatar Jul 30 '23 08:07 AThousandShips

We are aware of this, no one is saying this isn't important or won't be focused on, we're just explaining why it hasn't been solved "yet" (it's been less than a month), and it was a statement on how it's hard to investigate it, not that it's not a priority

I managed to fix the bugs in my project, so I thought I should close this report to allow contributors to focus on different things.

Polish_20230730_172922922

Here's how I did it: In the new code, I added an if statement to check if the input is a screen touch/drag, and it completely prevents the bug (no more freezing). On the other hand, my old code caused the project to freeze entirely, but strangely enough, if you run it on the main menu, it should work perfectly fine—at least for me. Additionally, I found another way to create this bug using a different approach.

Can you run all of that code on your PC and see if it works properly? My theory is that it should work completely fine without any issues since it's not running on Android.

pixelguy106 avatar Jul 30 '23 09:07 pixelguy106