Out of Memory Error

Archives Forums/Linux Discussion/Out of Memory Error

Tachyon(Posted 2007) [#1]
Using: Ubuntu 7.04, BlitzMax fully sync'd.

It appears I have everything installed properly because I can compile and run the samples that come with BM. However, my big project doesn't compile.

In debug mode, it says "failed to assemble game.bmx.console.debug.linux.x86.s". Right above that it says "error: out of memory".

When not in debug mode, I get a warning that libstdc++.so.6 may conflict with libstdc++.so.5, but then it says process complete, however the game doesn't launch/run.

Now then, I am running this on an older laptop with 384mb RAM, which should be enough I would think. Any thoughts?


Brucey(Posted 2007) [#2]
it's an issue with fasm not having a big enough default memory pool...

see here : http://blitzmax.com/Community/posts.php?topic=67478

for a fix - note the extra "-m" flag which defines how much memory it can have.

I believe it defaults to 16meg, which in some cases - like compiling MiniB3D on Linux - isn't enough.


Tachyon(Posted 2007) [#3]
Hmm, I guess I had already tried that because that hack was already implemented. Just as an experiment I bumped it up to 65536 and got the same error.

I tried updating fasm as well which didn't work, and have since reverted back to the version that is packed with BlitzMax 1.24.

But now I do see a line that I hadn't noticed when I posted my first message:
appstub.linux signal handler 11

This appears right above "Process Complete" when I compile outside of debug mode; it doesn't show up in debug mode. There is no "unhandled exception" printed with it like this post mentions: http://www.blitzbasic.com/Community/posts.php?topic=68237


Brucey(Posted 2007) [#4]
The libstdc warning you mention in the first post you can safely ignore.

I imagine that since you can't run it in debug you can't see what is causing the seg-fault when you run it release mode.


You aren't "Include"ing all your files are you, perchance?

Because that creates one rather large source file that fasm would have to process.
If you have *lots* of smaller .bmx files, fasm shouldn't really have much of problem.

I noticed that MiniB3D "Includes", which is why it runs out of space when trying to build that *BIG* source file...


Tachyon(Posted 2007) [#5]
Er, yeah, I do use a lot of includes. I know you have crusaded against using includes and I have been trying to update my code to use imports instead. But since I don't have a problem on Windows or MacOS with my current code structure I hoped to be able to come up with a Linux fix.


Tachyon(Posted 2007) [#6]
Okay it's working. This thread should be renamed "Linux Hates Capital Letters".

I don't know why this would have given a out of memory error, but I found one file in my project structure that still had a capital letter in it. As Brucey pointed out in another thread, that's a no-no on Linux. Renaming that file fixed my error.

Note to others: be sure to remove ALL capitalization from ALL filenames AND folders that are part of your project. Also, change any spaces in filenames to underscores: "_". Inside your program make sure all path strings are lowercase as well.

And thanks Brucey for your help.


Brucey(Posted 2007) [#7]
Great to hear you got it working at last.

That's a strange one indeed... the kind of error message that has one looking in completely the wrong places.

As for the "crusade"... I guess it does come across like that, after so many postings... It's not that I think they are evil, just that I think there are better alternatives ;-)