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

[BUG] Progressive freezing of the menu editor when adding animation keys in AnimationPlayer #104483

Open
Mordilla-Software opened this issue Mar 22, 2025 · 8 comments

Comments

@Mordilla-Software
Copy link

Mordilla-Software commented Mar 22, 2025

Tested versions

System information

  • MacOS ARM64
  • Godot 4.5.dev
  • Vulkan (1.3.296.0)

Issue description

  • When adding animation keys in the AnimationPlayer using the menu editor, the editor experiences a progressive freezing or slowdown. The issue becomes more pronounced as more keys are added. Unlike a complete crash, the editor remains responsive but increasingly sluggish.
  • This issue appears to be linked to the function reserve(p_other.size()), which is reportedly never called, potentially leading to inefficient memory handling.

Additionnal Information

  • The issue is not a complete crash but a noticeable slowdown.
  • The function reserve(p_other.size()) seems to be relevant but is not triggered.
  • Smooth interaction with the menu editor when adding animation keys, without freezing or significant slowdown.

Steps to reproduce

  • Open a project in Godot 4.5.dev on macOS ARM64 with Vulkan 1.3.296.0.

  • Create a new scene and add an AnimationPlayer and a TextureRect node.

  • In the AnimationPlayer, create an animation named "RESET".

  • Set the timeline to 0.1 seconds.

  • In the AnimationPlayer, create other animation.

  • In other animation add multiple animation keys via the menu editor.

  • Observe the progressive freezing and slowdown as more keys are added.

  • Every time a new animation is saved, there is a noticeable delay — the "animation editor" seems stuck for a while. Moreover, as more animations are added using the "property key button," this delay grows longer.

  • Video :

Enregistrement.de.l.ecran.2025-03-22.a.13.mp4

Minimal reproduction project (MRP)

MRP : MRP.zip

@AThousandShips
Copy link
Member

AThousandShips commented Mar 22, 2025

As I asked in the other issue, does this occur without #103698, assuming it doesn't since you opened an issue, if not it shouldn't be relevant

@Mordilla-Software
Copy link
Author

Without your fix, we get the error : ERROR: It is impossible to reserve less capacity than is currently available

@AThousandShips
Copy link
Member

AThousandShips commented Mar 22, 2025

Then this shouldn't be a bug report but a comment on the issue, but this is very unlikely to be caused by the changes as they do not do anything that could cause a crash

Please upload an MRP and I will test this, an MRP is required to test this properly as the steps are complicated

Also can you please record a video of it crashing, or provide the output when it does by starting from console

@Mordilla-Software
Copy link
Author

Mordilla-Software commented Mar 22, 2025

I think these are two separate issues. In my opinion, we need to determine the cause why reserve() get crash when p_other.size() are < of get_capacity() and why p_other.size() is low than reserve can approve when you click on any key property animation..

if (p_other.size() > get_capacity()) {
			reserve(p_other.size());
		}

Your fix is a good idea add condition, but it doesn't get to the root of the problem >.<

I may be expressing myself badly ^^'
And i'm still a novice, maybe I'm wrong..

So .. How to create an MRP ?

@AThousandShips
Copy link
Member

AThousandShips commented Mar 22, 2025

It doesn't crash when the size is less, that would crash when run without the PR, you seem confused about what things are done here

You can help by testing this change instead and see if it still crashes, just remove the:

if (p_other.size() > get_capacity()) {
	reserve(p_other.size());
}

Part and run, if it doesn't crash then the issue is indeed the changes in the PR, otherwise it isn't and if it does then it should crash even without my PR (in fact this would almost certainly be the case as the behavior in both cases are identical, the only difference is that it doesn't create any errors)

An MRP is:

  • 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).
  • Having an MRP is very important for contributors to be able to reproduce the bug in the same way that you are experiencing it. When testing a potential fix for the issue, contributors will use the MRP to validate that the fix is working as intended.
  • Drag and drop a ZIP archive to upload it (max 10 MB). Do not select another field until the project is done uploading.
  • Note for C# users: If your issue is not C#-specific, please upload a minimal reproduction project written in GDScript. This will make it easier for contributors to reproduce the issue locally as not everyone has a .NET setup available.

@Mordilla-Software
Copy link
Author

Mordilla-Software commented Mar 22, 2025

Thanks for answer, and your patiente.

I was able to test a few things on my own, and in fact, the bug comes when “reserve(p_other.size())” is never called your get same stuck editor..

I have add MRP : MRP.zip

@AThousandShips
Copy link
Member

AThousandShips commented Mar 22, 2025

Good to confirm that it's unrelated, would be good to remove the details in the report

Also does the editor just slow down/freeze or does it crash?

@Mordilla-Software
Copy link
Author

Mordilla-Software commented Mar 22, 2025

You can use godot normaly, but menu editor has down a few moment and comeback again (The delay is longer when new animations are added)

@Mordilla-Software Mordilla-Software changed the title Menu editor crashes after interacting with animations. [BUG] Progressive freezing of the menu editor when adding animation keys in AnimationPlayer Mar 22, 2025
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

2 participants