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

Godot crashes after 1 Gb memory usage is reached #8279

Closed
Zylann opened this issue Apr 6, 2017 · 17 comments
Closed

Godot crashes after 1 Gb memory usage is reached #8279

Zylann opened this issue Apr 6, 2017 · 17 comments
Milestone

Comments

@Zylann
Copy link
Contributor

Zylann commented Apr 6, 2017

Tested on af282b5

When running my voxel module, I reached 1 Gb of memory allocated by Godot. Then everytime, Godot crashes with this message:

ERROR: All memory pool allocations are in use.
   At: d:\projets\info\godot\engine\godot_fork\core\dvector.h:525

Is there a way to get past this limitation? My computer has 4 Gb to spare, and I don't see an option to increase this limit.

Note: I didn't test in 2.x.

@Zylann Zylann changed the title [3.0] Godot crashes after 1 Gb memory usage is reached Godot crashes after 1 Gb memory usage is reached Apr 6, 2017
@ghost
Copy link

ghost commented Apr 6, 2017

This line?

@bojidar-bg
Copy link
Contributor

No, this line.

@ghost
Copy link

ghost commented Apr 6, 2017

No, I'm referring to the question "Is there a way to get past this limitation?"

@Zylann
Copy link
Contributor Author

Zylann commented Apr 6, 2017

The error is to be expected if Godot actually handles a memory limit. However that limit is too low for desktop computers :/

@ghost
Copy link

ghost commented Apr 6, 2017

Should it be made into a build setting?

@Zylann
Copy link
Contributor Author

Zylann commented Apr 6, 2017

Eventually, though I would expect it to work in editor too. Also I'm curious to know why there is a software-enforced memory limit?

@ghost
Copy link

ghost commented Apr 6, 2017

Ah, yes, I meant something like an export option, from the editor.

I'm just guessing but maybe it's because an error message is better than platform-dependent behaviour. In Linux, malloc won't fail for example, and yet the process can crash when you try to access the memory.

@kubecz3k
Copy link
Member

First of all thank you for your report and sorry for the delay.

We released Godot 3.0 in January 2018 after 18 months of work, fixing many old issues either directly, or by obsoleting/replacing the features they were referring to.

We still have hundreds of issues whose relevance/reproducibility needs to be checked against the current stable version, and that's where you can help us.
Could you check if the issue that you described initially is still relevant/reproducible in Godot 3.0 or any newer version, and comment about its current status here?

For bug reports, please also make sure that the issue contains detailed steps to reproduce the bug and, if possible, a zipped project that can be used to reproduce it right away. This greatly speeds up debugging and bugfixing tasks for our contributors.

Our Bugsquad will review this issue more in-depth in 15 days, and potentially close it if its relevance could not be confirmed.

Thanks in advance.

Note: This message is being copy-pasted to many "stale" issues (90+ days without activity). It might happen that it is not meaningful for this specific issue or appears oblivious of the issue's context, if so please comment to notify the Bugsquad about it.

@Zylann
Copy link
Contributor Author

Zylann commented Apr 10, 2018

This issue happened before we find a bad leak in PoolVectors (#9204), so I assume that was the cause. Can't be sure though because I didn't test it with latest.

@kubecz3k
Copy link
Member

@Zylann well I will close for now in such case. If you will find anything suspicious we will reopen.

@kubecz3k kubecz3k added this to the 3.0 milestone Apr 10, 2018
@Ranoller
Copy link
Contributor

Ranoller commented Sep 1, 2018

I don´t know how i arrive to this closed issue, but at 01/09/2018 the 1GB limitation (at least in editor) is still present. I let this for googling-githubing purposes.

@Zylann
Copy link
Contributor Author

Zylann commented Sep 1, 2018

@Ranoller do you have a repro suite?

@Ranoller
Copy link
Contributor

Ranoller commented Sep 1, 2018

@Zylann

follow
#21393
#9815

I don´t have a shareable minimal project, only my game, but this 1GB crash is reproducible only doing preloads in any script, it´s not necessary play project, only writing preloads and look task manager, once 1GB editor will crash anywhere.... I say 1GB crash but it´s different in 32 and 64 bit versions and different if you crash editor or if you crash game in runtime: crashing godot appending to an array "0" in runtime allow to allocate 2GB in 64 bit and 512 MB in 32 bit... this test is old (the preload test it´s my project from 2.0 and my project from 3.0 and both crash, last test i did was 8 days ago (first link).

I wil do a test for share because this issues are significant...

@Ranoller
Copy link
Contributor

Ranoller commented Sep 2, 2018

@Zylann

There is the test:
https://github.com/Ranoller/Godot_crash_memory_test

In my system (64bit) it´s until 2.2 GB of memory that godot crash. I didn´t test that in 32 because i don´t have in home any computer with 32 bit system and i´m in holidays.

@Ranoller
Copy link
Contributor

Ranoller commented Sep 2, 2018

Ok, my test it´s wrong. I investigate the main cause of the 2,2GB of godot crash and i find that an app can´t allocate more that this amount in a single array in windows (windows limit)... so i did more test and godot allocate 4,6,8,10 GB if any array doesn´t have more that 2.2GB... so problems with preloads, etc... will be others that memory allocating....

I will actualize my test anyway to have a real example to test if godot can eat your entire memory without leave any crumbs.

@olehpatrushev
Copy link

Got the same error on Godot 3.3.3 with Ubuntu 20.04 LTS during a navmesh baking (for large mesh).

@Calinou
Copy link
Member

Calinou commented Sep 7, 2021

Got the same error on Godot 3.3.3 with Ubuntu 20.04 LTS during a navmesh baking (for large mesh).

This is being tracked in #37154.

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

7 participants