-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Dragging a property spams history messages, causing rapid memory usage increases due to editor output panel being filled with text #84499
Comments
Please upload a minimal reproduction project1 to make this easier to troubleshoot. Footnotes
|
Here is the project: GodotBug.zip
|
I was able to reproduce this issue with a Sprite in a simple 2D scene by rapidly changing the colour of the "Modulate" property. I was easily able to get the RAM usage to jump by a Megabyte every few seconds. |
I was able to reproduce this issue in the most unlikely way possible: Going to the Spinner of the Z-Index of a sprite, and just holding down on the arrow key so it spins through various values. From this it seems that this problem is caused by any rapidly changing value in the Inspector. |
Think I've found the issue. It's the Output Log at the bottom of the Editor. Having it spammed with "Set albedo_color" or "Set Z-Index" assuredly takes its toll on RAM usage, especially since the Output log doesn't get cleared unless the editor is shut down (even changing scene doesn't clear it). The weird thing is that looking at the code, it does seem that some functionality had been laid down to handle getting a series of repeating log messages. ( in editor\editor_log.cpp ). |
Message collapsing is disabled by default. You need to enable it by clicking the "3 horizontal lines" icon on the right of the Output panel: Here's an example of it in action, both with I'd prefer if it was enabled by default, but this can likely only be changed in 4.3 since we're in feature freeze. We could also reduce the number of editor history messages being printed in the first place, but I recall this being nontrivial when you drag a property (so that only one message is printed at the end of dragging). Lastly, we could get rid of these messages entirely as the History dock now features them in a similar fashion. |
Please do this. |
Thanks @Calinou, I did more testing with the collapsing feature and it didn't use up extra RAM as I rapidly changed a feature. |
So here are possible solutions:
There's a lot to consider, but after giving it some thought I realised that (6) was the most straightforward and easiest change to implement right now to solve this specific issue. Identical changes made less than 800 milliseconds apart only give a single output message. Previously, messing around with the colour picker could give hundreds of messages, now it will only give a handful. Since it reuses the same system that UndoRedo and History log uses, there's both minimal code change and it's consistent. My pull request is incoming. |
Pull request made. I suggest that (pending review) this pull request is used to close this specific issue. Further discussion on what to do about the Output Log should continue in other places (such as the other issues that have been linked to this one) |
Godot version
v4.1.3.stable.official [f06b6836a]
System information
Godot v4.1.3.stable - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 SUPER (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 5700X 8-Core Processor (16 Threads)
Issue description
I have a plane mesh with a 2048x2048 PNG texture applied. Changing the albedo colour of the texture results in Godot consuming as much memory as possible until my computer freezes, shortly before Godot crashes.
Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: