• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Memory allocation failed

G

Gwy

Guest
Hi all and thank you for reading.

I cannot run my code anymore. I get the error below. If I run the Clean tool and then run the game, it will sometimes run but will crash on subsequent tries to run the code.

I am developing on Windows 10 for a mobile game (android and iOS). IDE v2.2.5.481. Runtime v2.2.5.378.

I tried running different runtimes but I always get the same error. I uninstalled and re-installed GameMaker and still get the same error.

In terms of RAM used, my computer is at 30% used Memory when I get this error. My computer has 16 GB of RAM. So, it doesnt seems to be a low memory issue. Disk space and CPU usage also seems fine.

Im thinking that I have a DirectX issue? When running 'dxdiag', it says that I have DirectX Version 12 installed. Is that an issue for gamemaker?
Another possible explanation from other forum post that I have read is that other software installed on my computer could be competing for the same resource. I have installed Davinci Resolve 16 and Windows Media Pack lately on my computer. Could one of these new software causing the issue?

I am really stuck here. Any help is appreciated. Thank you for your time!


[...]
C:\WINDOWS\system32\cmd.exe DONE (0)
DoSteam
Igor complete.
[Run] Run game
Options: Z:/genetic_F0A77D27\MainOptions.json
X://windows/Runner.exe -game "Y:/genetic_6045E79F_VM\genetic.win"
Attempting to set gamepadcount to 12
DirectX11: Using hardware device
ERROR!!! :: ############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object <undefined>:


Memory allocation failed: Attempting to allocate 2702781612 bytes

############################################################################################



X://windows/Runner.exe exited with non-zero status (-1073741819)
elapsed time 00:00:18.5634259s for command "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.5.378/bin/Igor.exe" -j=16 -options="C:\Users\Gwy\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Windows Run started at 06/25/2020 09:52:45
"cmd" /c subst Z: /d

elapsed time 00:00:00.0360068s for command "cmd" /c subst Z: /d started at 06/25/2020 09:53:04
"cmd" /c subst Y: /d

elapsed time 00:00:00.0344269s for command "cmd" /c subst Y: /d started at 06/25/2020 09:53:04
"cmd" /c subst X: /d

elapsed time 00:00:00.0367295s for command "cmd" /c subst X: /d started at 06/25/2020 09:53:04
FAILED: Run Program Complete
For the details of why this build failed, please review the whole log above and also see your Compile Errors window.
 

FrostyCat

Redemption Seeker
The normal Windows export is still 32-bit, so there's a ceiling on RAM usage at around 3GB even if you have more than that available.

It's probably under-optimized resource loading or an infinite loop/leak at the beginning of the game. If you can get that kind of error to pop up on a regular Windows machine, there is NO HOPE of it running on a mobile device as-is.
 

Neptune

Member
Same o_O
But I do think breaking up the reading/writing into smaller chunks with adequate gaps helps... Good luck.


I'd appreciate hearing too, if any of you know any good ways to optimize reading/writing in GM :)
 
G

Gwy

Guest
Thank you all for your time. I ran some more tests.

After I run the clean tool and run the code, I noticed that the GMAssetCompiler goes up to 4 Gigs of RAM before the game runs. Once it is done compiling the game runs on about 300 Mb of RAM. On subsequent tries (if I dont clean) it just crashes with the error posted in my first post.

Why does the GMAssetCompiler use so much RAM? Is this expected behavior? If not, how would I go about finding the culprit?

Also, I installed GameMaker IDE and ran my code on completely different hardware (high performing laptop). I get replicate the same error. So it seems that it is not a problem with my desktop configuration or other apps that could be interfering...

Any help is greatly appreciated. Thank you!
 
Top