-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Why Changing scenes keep using the RAM ? #19300
Comments
Looks like a leak but I cannot reproduce with 3.0.3rc2 under Linux, the Object count remains the same when returning to the main scene.
You can see the object count in the debugger's monitor. |
@eon-s yes .. object counts remains the same when returning ... but go to the Task manager and see how much RAM it take every time changing the scenes |
I can see leaks on system monitor, not in godot editor. |
Right, and on the running game, not the editor, check if the exported (debug and release) does the same. |
I tested it 3.0.2-stable release template (X11). |
i really don't know .. but i have a 2 big levels ... when changing between them it take almost 400 MB and the second one take about 700 ... |
without material, it stays stable. |
I have stored preloaded scenes on an autoloaded script and |
@eon-s yes , exported debug and release does the same |
well, using |
I think the problem is with unloading scene (especially spatial material thing) |
Has anyone tried jumping between multiple scenes.? |
Is it possible that memory leaks somewhere within the visualserver? |
Probably @reduz can see into it. Leaks aren't good. |
this needs to be fixed and cherry-picked on 3.0.x ASAP before 3.1 out, I think. |
@volzhs This no longer seems to be a bug, and neither Godot internal leak checker or valgrind are reporting any leaks. Closing. |
@reduz No , it's still exist in 3.1 Beta 1 |
Which operating system are you using to test? On Linux I clearly see nothing. |
@reduz i use Windows 7 x64 |
Moving to 4.0 milestone as discussed on IRC:
|
@akien-mga This is really really bad news Edit : @reduz technically this is really really terrible , this is a small scene , what about a big scene with materials and textures ? what about a full 3d game ? this will make Godot useless to make Games .. right ? |
I agree, this will make the game crash when on 32-bit Windows build the memory usage reaches 2 Gb, and probably the game/OS will also be less performant with high usage of RAM... |
Well, 32 bit should not be a concern since is in extinction, but procedurally generated content and open world where scene loading and unloading is constant it may result in an issue sooner than later, if at least we can have a "manual" way to clean the cache on some systems, it may be enough for the time being. |
32-bit Windows 7 is still a thing though, with about 2x more users on Steam than all Linux users together (https://store.steampowered.com/hwsurvey)... |
@starry-abyss Windows 7 EOL is in less than a year, so it won't be a thing for too long. |
@eon-s: Win XP has EOL a year ago IIRC and it's still kicking, and a lot of people are still on 7 as @starry-abyss points out. |
As shown by @bruvzg, it happens on any OS. It's the hardware limitation that might get hit by this. |
I mean, if you run virtual machine(s) or a lot of Chrome tabs in the background by example, whatever which OS is used, this might affect the limitation. |
Sorry, I totally misunderstood this issue. |
I thought discussion was about the shader cache, that does not get erased (but should not leak), not the custom code which actually was leaking (seems it went unimplemented after porting to GLES3). |
Feel free to test again, but I am confident it should work well now |
no more increasing ram on kubuntu 18.10 |
Crashes when you try to open a shader (via fs-dock or inspector button) a second time. |
Stack trace (macOS):
|
There is no memory increase on Windows 7 x64 !! but the problem is Godot crash if add a Visual shader to mesh , open the Visual shader , add Color node for example , change the color node and link it to Albedo the second problem is when add a Shader code to mesh , Run the game , Godot work fine , Edit that shader and save the scene and run the game , Godot crash , but after reopen the project again and open the scene , everything work fine until you change something in the shader code .. crash again after run the game Spatial material is Working Great !! |
Let's discuss and fix the crash in #25336. |
Fixed (I hope) |
it's Fixed !!! |
Godot version:
Godot 3
Issue description:
When changing the scenes .. the RAM Keep raising ... it should get free if the old scene is removed and allocate new memory for the new scene .. right ?
but it's not free the memory if the old scene is deleted
Steps to reproduce:
Go to scene_changer demo ... add few meshes and lights in scene A and run
it's a simple scene .. but if it was a huge scene .. it take a lot of RAM when changing from scene to scene
Minimal reproduction project:
scene_changer.zip
The text was updated successfully, but these errors were encountered: