Compile Out of memory.. [Solved its Jungle]

Monkey Archive Forums/Monkey Discussion/Compile Out of memory.. [Solved its Jungle]

Paul - Taiphoz(Posted 2017) [#1]
Right so is there any way to give the compiler more memory, im not sure if its trans or gcc but when I build I 2 out of 3 tried get it failing due to lack of memory even tho im sitting on 8 gig and 4 gig free at the time.

must be some config options some where I can up the memory the compiler can use?


Gerry Quinn(Posted 2017) [#2]
Is your project super large?

I was going to suggest compiling to another target to see if it was trans or gcc, but that mightn't really help if it compiles, because it's probably harder to translate Monkey to C++ compared to most targets. If it still fails on another target, though, it has to be trans.

A bit baffling that a compiler should run out in this day and age though.


Paul - Taiphoz(Posted 2017) [#3]
Its' freaking tiny, but I'm using junglegui which uses reflection so I suspect that's the cause, but yeah it compiles there aint anything wrong with the code, its just that it takes me like 10 tries to actually get it to go with it complaining about memory the other nine times.


Paul - Taiphoz(Posted 2017) [#4]
This is what it says .

So looks like it is cc1plus.exe thats running out...... no clue why I have 8 gig total and only using about half of that.
Translating...
Building...
g++  -m32  -O0 -Wno-free-nonheap-object -I../glfw3/include -I../glfw3/src -I../openal/include -I../stb -I../zlib-1.2.8 -I../lpng1610 -c -o build/Debug32/main.o ../main.cpp
Application protection!! The connected process is using too much memory!!
Connection closed due protection. Connected process was using too much memory!
g++ -m32  -Wl,--subsystem,windows -L../openal/libs/Win32 -L../openal/libs/Win64 -o Debug32/MonkeyGame build/Debug32/context.o build/Debug32/init.o build/Debug32/input.o build/Debug32/monitor.o build/Debug32/wgl_context.o build/Debug32/win32_init.o build/Debug32/win32_monitor.o build/Debug32/win32_time.o build/Debug32/win32_tls.o build/Debug32/win32_window.o build/Debug32/window.o build/Debug32/winmm_joystick.o build/Debug32/stb_vorbis.o build/Debug32/stb_image.o build/Debug32/main.o -lcomdlg32 -lgdi32 -lopengl32 -lOpenAL32 -lws2_32
Abnormal program termination.
 Exit code: -1



Paul - Taiphoz(Posted 2017) [#5]
changed windows virtual mem gave it some more , solved the problem.


Paul - Taiphoz(Posted 2017) [#6]
So I moved junglegui out of my modules folder and put it inside the monkey modules folder and so far iv not seen the out of memory error, so not sure if this is a fix or not but it seems to be better than before which is good.


Paul - Taiphoz(Posted 2017) [#7]
scratch that its still happening. ok since I clearly like talking to myself I have now tried the same code and the same compiler on a diff PC and I dont get the error there, even tho this PC has more memory than the other.

So It's got to be something setting wise that's causing this but im at a loss.


therevills(Posted 2017) [#8]
I cant find "Application protection!! The connected process is using too much memory!!" via Google, closest thing is about an anti-virus app...


Paul - Taiphoz(Posted 2017) [#9]
I tried turning that off, no joy. :/ its freaking annoying me to no end because I know it shouldnt be happening :(


Paul - Taiphoz(Posted 2017) [#10]
wait could this be jungle ? gona see if this happens with other ide's


Paul - Taiphoz(Posted 2017) [#11]
Good news, Bad News... :(
The good news is i'v been coding all morning and compiled about 30 times so far zero instances of this stupidly annoying error........ From TED!

The Bad News is that it's clearly an issue with Jungle which blows chunks as my licence is out of date so wont be able to solve it. so for now iv been coding in Jungle and then just building from Ted..

Annoying but I can work with it I guess, so I hope this helps some one else, if you get this error and find this post through a search then try building/compile from the default monkey IDE with a bit of luck it will solve your issue.


therevills(Posted 2017) [#12]
In my version of Jungle there is an option under Tools > Preferences under General settings called "Prevents any connection from using more the 3/4 of the physical RAM. (CPU heavy)"... could you try unchecking that if its ticked?


Paul - Taiphoz(Posted 2017) [#13]
will give it a shot and let you know , fingers crossed but that deff sounds like the culprit.


Paul - Taiphoz(Posted 2017) [#14]
yup that did it.. have no idea why that option was even ticked , thanks for the heads up bud..


therevills(Posted 2017) [#15]
No worries! Glad you found the issue and deduced that it was in Jungle!