Pages: 1 2 »
  Print  
Author Topic: Out of memory error while compiling  (Read 9928 times)
Offline (Male) SuperRiderTH
Posted on: May 29, 2013, 06:20:49 pm

Member
Joined: May 2013
Posts: 26

View Profile
I have been using Enigma for a bit and I went to run the game and I got:

cc1plus.exe: out of memory allocating 65536 bytes
mingw32-make.exe[1]: Leaving directory `e:/ENIGMA/enigma-dev/ENIGMAsystem/SHELL'
mingw32-make.exe: *** [Game] Error 2

Is there anyway to fix this?
Logged
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: May 29, 2013, 11:29:08 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
Holy moses. How big is your game? Or are you just genuinely short on memory? I don't think the JVM's allocation bounds affect ENIGMA's compiler; if they did, it would be possible that your game was just big enough to only cause a memory issue when compiling.

Could you get us the size of the game file, and the memory consumption of each of LateralGM (javaw.exe) and cc1plus? The task manager should list those.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) SuperRiderTH
Reply #2 Posted on: May 30, 2013, 01:18:06 pm

Member
Joined: May 2013
Posts: 26

View Profile
The .gm81 is 9.17 MB (9,623,627 bytes) according to windows, and it cant be a problem with memory, I have 12GB of ram.

 I tried to run it again, got the same error, and I watched the Task Manager and I saw cc1plus's memory go up to around 2,000,000 K. java.exe is at 728,900 K while running.

In the run file I added -Xmx1000M -Xms1000M to the command for starting up enigma, the game fails to open otherwise.

Also, I dual boot Windows 7 (64-bit) and Ubuntu 13.04. While I am using Ubuntu and I try to run the game my whole computer becomes non responsive while compiling and never finishes.
Logged
Offline (Unknown gender) TheExDeus
Reply #3 Posted on: May 30, 2013, 02:07:56 pm

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Well 2GB is the amount a 32bit program can get. When it hits that ceiling windows will trow an exception (aka crash) when more is asked. The question is why cc1plus does this? And a better question is what the hell is cc1plus? Shouldn't it be g++?
Logged
Offline (Unknown gender) forthevin
Reply #4 Posted on: May 30, 2013, 02:22:50 pm

Contributor
Joined: Jun 2012
Posts: 167

View Profile
2 GB is far too much, cc1plus should not use nearly so much memory. It may be the same issue as when compiling Iji.

After trying to run on Windows, could you give us how many lines the file ENIGMAsystem/SHELL/Preprocessor_Environment_Editable/IDE_EDIT_object_functionality.h contains?
Logged
Offline (Male) SuperRiderTH
Reply #5 Posted on: May 30, 2013, 02:32:58 pm

Member
Joined: May 2013
Posts: 26

View Profile
IDE_EDIT_objectfunctionality.h has 18062 lines.
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: May 30, 2013, 02:37:58 pm

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
This smells like a bug in GCC. Nothing ENIGMA puts in that code should make it bloat to 2GiB. The only other file that might bloat up immensely is IDE_EDIT_objectaccess.h... Even then, though, 20,000 lines is hardly a reason  to require 2GiB of RAM.

Would you be willing to share either of the game file or that folder (Preprocessor_Environment_Editable)? It contains a loose C++ translation of your game code, but it's not enough to reverse-engineer back to the original game.
« Last Edit: May 30, 2013, 02:39:43 pm by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) polygone
Reply #7 Posted on: May 30, 2013, 02:43:27 pm

Contributor
Location: England
Joined: Mar 2009
Posts: 794

View Profile
Hang on didn't somebody else post that memory problem with cc1plus. I'm trying to remember what happened there.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) polygone
Reply #8 Posted on: May 30, 2013, 03:04:04 pm

Contributor
Location: England
Joined: Mar 2009
Posts: 794

View Profile
Yes they did, somebody called Wishdream on the irc. I didn't know what it was causing it so I told him to wait for Josh but he never came back.

It was probably the same problem, he said cc1plus was spammed like 20 times in the task manager and I initially figured it was MinGW screwing it. But in the IRC he said he also tried it on 3 different systems and they all had the same issue, the only thing apparently common was that they were all Win 7. I'm not sure on the validity of his testing though, but the specs of the systems he gave me were:

AMD Athlon(tm) 64 X2 Dual Core 4800+ 2.50GHz CPU, 1GB RAM 64-bit Win 7 OS, AMD Radeon HD 6670 1GB GFX Card, Realtek HD Audio
Win 7 32-bit 2GB RAM laptop
Win 7 64-bit 2GB RAM Laptop

Although thinking about it now, I'm considering whether it was the game size doing it and if he was then just testing the same game. SuperRiderTH do other games or a blank room work correctly for you?
« Last Edit: May 30, 2013, 03:32:24 pm by polygone » Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) SuperRiderTH
Reply #9 Posted on: May 30, 2013, 03:19:49 pm

Member
Joined: May 2013
Posts: 26

View Profile
Other games do work. It is only this one causing a problem.

This game right now is very WIP, and I just started to move things over to ENIGMA and start to fix missing functions, etc. It is a modification of the Sonic Revival Engine, with Super Ring Engine stuff ported into it.

So here is the Preprocessor folder.

http://www.mediafire.com/download/saidqfd451b16fg/Preprocessor_Environment_Editable.7z
« Last Edit: May 30, 2013, 03:38:58 pm by SuperRiderTH » Logged
Offline (Male) polygone
Reply #10 Posted on: May 30, 2013, 03:32:56 pm

Contributor
Location: England
Joined: Mar 2009
Posts: 794

View Profile
Ah so can you upload the game, then we can see if it happens for anybody else.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) polygone
Reply #11 Posted on: May 30, 2013, 03:42:56 pm

Contributor
Location: England
Joined: Mar 2009
Posts: 794

View Profile
By the way with a game as large as the one you're trying it's highly unlikely that it will be compatible with ENIGMA right now anyway.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Male) SuperRiderTH
Reply #12 Posted on: May 30, 2013, 03:56:51 pm

Member
Joined: May 2013
Posts: 26

View Profile
Really the only problems are the no inheritance, variable_local_get/set/exists, and compiling. So not much problems. Just have to remake some things.
Logged
Offline (Male) polygone
Reply #13 Posted on: May 30, 2013, 04:07:56 pm

Contributor
Location: England
Joined: Mar 2009
Posts: 794

View Profile
ok. can you upload the game then? google drive has fast upload if you want something quick.
Logged
I honestly don't know wtf I'm talking about but hopefully I can muddle my way through.
Offline (Unknown gender) forthevin
Reply #14 Posted on: May 30, 2013, 04:27:41 pm

Contributor
Joined: Jun 2012
Posts: 167

View Profile
IDE_EDIT_objectaccess.h is ~40 MB, which is definitely the cause of the issue. This means that the problem is as far as I can tell the same as for Iji: the game in question is too massive measured in terms of lines of code and number of actions for ENIGMA to handle it properly at the moment. The reason is that the current game compilation process does not scale well. SuperRiderTH, can you verify that the game is indeed very large in terms of lines of code and number of actions?

We do plan to fix the issue in the future, but it may be a while before the issue has been fixed.
Logged
Pages: 1 2 »
  Print