• 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.

SOLVED Fatal Error After Importing Sound Files or Image Files

otterZ

Member
Every time I try to import an image or sound files into my resources, when I click on 'Run' this error shows:

############################################################################################
FATAL ERROR in
action number 1
of Create Event
for object <undefined>:
Memory allocation failed: Attempting to allocate 2149365633 bytes
#####################################################################

The files are just MP3s and PNG files - nothing I have had trouble with before.

I tried clearing the cache / pressing the 'Clean' button. I disabled 'Enable Steam' just in case it was referencing an old build. So far no luck.

I'd appreciate any help / advice if anyone has encountered this before as my project is dead in the water right now - I can't do anything . . .
 

GameDevDan

Former Jam Host
Moderator
GMC Elder
Looks like the game is very quickly running out of memory for some reason (attempting to allocate around 2 GB - which is pretty high).

What exactly is happening at the start of your game?
 

otterZ

Member
Sorry GameDevDan, I must have forgotten to click on 'Watch this thread', so only saw your reply today. Thank you for your reply. Much appreciated.

The problem was that I forgot that there is a 2 GB RAM usage limit on 32 bit games made in GM. I was hitting this limit.

I'm now getting around this by optimizing all PNG image files and compressing all sound files, which should cut down the whole project's size by about 50%, which is enough room for me to add future resources to complete the game.

You were right to ask me what was happening at the beginning of the game. Obviously loading all those image files was tipping it over the edge, memory-wise.
 
Top