Hi / Compile Crashes On Parsers

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Hi / Compile Crashes On Parsers

#1 Post by yandonman »

Edit by Geoff: Moved here because the thread is mostly about compile problems. /Edit

Hi all.

I just recently found this game/site and I found myself slightly addicted to the game (even in it's pre-release state) so I thought I'd stick around for a bit. So I figure it'd be best to introduce myself :)

I'm come from a MOO2 background, which I'm sure you see a lot of, so you'll have to pardon my stupid questions while I try to get my head around FO which I get is not a Masters of Orion game. (but why is it called FreeORION? that's an obvious tie in...) ... I've also played Sins of a Solar Empire... MOO2 is better (and I hated MOO3).

I also come from another FO game... FleetOps (http://www.fleetops.net), a Star Trek Armada II mod, where I do commentaries (http://www.youtube.com/user/yandonman). I don't know if commentaries will help a 4X game... but if y'all need something FRAPs-ed, let me know.

I also have some experience with C++, so I might be able to help out. Yes, I know to look at the open task list and follow the FO design philosophy. Hopefully I can at least polish a few things here and there.

Some newb questions... (possibly rants... go easy on me please! ;) )


Why is the performance so slow when calculating a turn? It's not memory intensive, and it's not IO bound (per process explorer)... I've yet to run xperf on it... that's next step.

Why does clicking on Production or Research have a lag?

Also, adding ships to fleets is laggy, and noticeably a function of the number of ships. (aka: more ships being added = more lag. Also, seems that adding the list to the last ship in the list is worse than adding the list of ships to the first ship... non-substantiated observation)

Why do I get a "fatal error C1060: compiler is out of heap space" when trying to compile the Parsers project? I've Googled it... and I've tried /Zn25 and /Zn200 ... neither have worked. Also, my system is x86 with 4 GB RAM (so 3.5 GB effectively). When I compile, cl.exe will shoot up to 1.5 GB PrivateBytes. Seems to have something to do with template usage (of which Parsers does use...) , but I haven't found a solution yet :(

Is there no space-battles UI yet? What about ground battles UI?

Are there any plans to make the game more "personable"? (aka: in MOO2, you got to 'talk' to your scientist when there were research breakthroughs, and you had little people you could modify the focus of production/science. Which I thought gave the game a personable touch, that encouraged getting emotionally involved in your race/empire. This, as opposed to other 4x games that seem to be a bunch of spreadsheets and numbers - very cold)


Cheers!
Yandon
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi (introduction post)

#2 Post by Geoff the Medio »

yandonman wrote:Why is the performance so slow when calculating a turn? It's not memory intensive, and it's not IO bound (per process explorer)... I've yet to run xperf on it... that's next step.
If you're playing a game with lots of AIs in it, they might be using lots of CPU processing their turns. What stage of turn processing is showing in the messages window for the longest times? Also, if you go into the options menu, UI tab, and turn on verbose logging for debugging, you can look in the freeorion.log and freeoriond.log files and look for instances of "time:" (no quotes). That shows how many milliseconds doing something has taken. Whatever the big ones are (over 1000) are taking long.
Why does clicking on Production or Research have a lag?
Just the first time, or every time? I don't have much lag opening those screens... a tenth of a second maybe? May be due to loading all the tech or part textures for the first time. You'd probably also get a long pause opening a system that contains one or more asteroid belts while those textures are loaded.
Also, adding ships to fleets is laggy, and noticeably a function of the number of ships. (aka: more ships being added = more lag. Also, seems that adding the list to the last ship in the list is worse than adding the list of ships to the first ship... non-substantiated observation)
Fleet management is one of the slower UI response things... Try right clicking a large fleet and picking "Split Fleet"... I suspect it'll take a while if you're getting short hangs moving single ships around. I don't follow what you mean about "Adding the list to the last ship in the list", though regardless, it's not something easily fixed. Essentially, every time a ship is moved, the fleet it came from, the fleet it's going to, and the ship are changed, so the UI updates. It's a lot easier to update the repeatedly for each of those changes, rather than smartly waiting until all changes are done and then updating once, so there's a lot more going on then is strictly necessary. Sounds like you just have a slow system, though...
Why do I get a "fatal error C1060: compiler is out of heap space" when trying to compile the Parsers project? I've Googled it... and I've tried /Zn25 and /Zn200 ... neither have worked. Also, my system is x86 with 4 GB RAM (so 3.5 GB effectively). When I compile, cl.exe will shoot up to 1.5 GB PrivateBytes. Seems to have something to do with template usage (of which Parsers does use...) , but I haven't found a solution yet :(
The parsers are huge due to use of the boost spirit parsing framework. They usually can get compiled for most people, though... Are you using the MSVC project files in SVN and the latest revision? Try building just one .cpp file at a time to isolate the one(s) that cause problem, and ensure there's as much RAM as possible available. It may be possible to split them up as well, as I did recent for the effect parser.
Is there no space-battles UI yet?
Not in any usable sense.
What about ground battles UI?
No, and there isn't one planned at present. There are some brainstorming discussions about ground combat in the last few weeks, I think, which you might want to have a look at...
Are there any plans to make the game more "personable"?
No plans, but I'm not opposed to it. If you have specific suggestions, you should start a brainstorming thread.

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Hi (introduction post)

#3 Post by Vezzra »

yandonman wrote:...Why do I get a "fatal error C1060: compiler is out of heap space" when trying to compile the Parsers project? I've Googled it... and I've tried /Zn25 and /Zn200 ... neither have worked. Also, my system is x86 with 4 GB RAM (so 3.5 GB effectively). When I compile, cl.exe will shoot up to 1.5 GB PrivateBytes. Seems to have something to do with template usage (of which Parsers does use...) , but I haven't found a solution yet...
4GB of RAM are sufficient, I'm able to build FO in a VM with 4GB of RAM. However, you need 64bit Windows, I've been trying to compile FO on 32bit XP for a long time, no success. Finally I decided to install Win7 64bit in a VM and try again, worked on the first try.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Hi (introduction post)

#4 Post by eleazar »

Welcome!
yandonman wrote:I also come from another FO game... FleetOps (http://www.fleetops.net), a Star Trek Armada II mod, where I do commentaries (http://www.youtube.com/user/yandonman). I don't know if commentaries will help a 4X game... but if y'all need something FRAPs-ed, let me know.
Some folks passing through the forums have complained about our lack of youtube content. I don't have much exposure to that branch of game promotion, (i prefer to read or try it myself) and i expect the other developers here don't either. If want to make some "let's play" or video review of FreeOrion, that would be great.
yandonman wrote:...and you had little people you could modify the focus of production/science.
If you mean the little citizens icons that you shifted around between planets or food/production/science-- that's a degree of micromanagement that we intend to avoid.

It's my hope and intention that the different species of your empire will to some degree become like characters each with a distinct "personality". But much of that is not yet implemented, each useful in their own way. There may be other ways to add personality to the game.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: Hi (introduction post)

#5 Post by yandonman »

1>------ Build started: Project: Parsers, Configuration: Release Win32 ------
1>Build started 9/1/2012 6:58:55 PM.
1>ClCompile:
1> ShipPartsParser.cpp
1>../../../Boost/include/boost_1_47/boost/variant/variant.hpp(516): fatal error C1060: compiler is out of heap space
1>
1>Build FAILED.
1>
1>Time Elapsed 00:04:16.98
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========




WRT performance, I'll youtube something (and make it private so as to not give bad publicity) and show you guys.


WRT: youtube promo - Yeah, I can do that :) ... (and I will... gimme a few days)


If you mean the little citizens icons that you shifted around between planets or food/production/science-- that's a degree of micromanagement that we intend to avoid.
Yup, those the ones, though I'm not suggesting that exact implementation (fails the is 5% better than 6% "sliders" rule). Maybe instead of the abstract focus icons, replace them with a scientist guy icon (for science focus), and a worker dude (for production focus).
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi (introduction post)

#6 Post by Geoff the Medio »

I suggest wrapping such text in a code tag...
yandonman wrote:

Code: Select all

1>ClCompile:
1>  ShipPartsParser.cpp
1>../../../Boost/include/boost_1_47/boost/variant/variant.hpp(516): fatal error C1060: compiler is out of heap space
ShipPartsParser is one of the two largest object files I get after compiling the parser, so it's not surprising that that's one of the problematic ones. Strange that you're getting this issue even when compiling just one file... Does ConditionParser1.cpp compile fine for you? (It's the largest object file I get...)

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi (introduction post)

#7 Post by Geoff the Medio »

ShipPartsParser has been split into two smaller source files in the latest commit. Hopefully this makes it easier to compile.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: Hi (introduction post)

#8 Post by yandonman »

Code: Select all

1>------ Build started: Project: Parsers, Configuration: Release Win32 ------
1>Build started 9/5/2012 10:19:03 PM.
1>ClCompile:
1>  ConditionParser1.cpp
1>c:\Program Files\Microsoft Visual Studio 10.0\VC\include\vector(151): fatal error C1060: compiler is out of heap space
1>
1>Build FAILED.
1>
1>Time Elapsed 00:04:08.51
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Unfortunately, it too prevents me from compiling. :(

*think* *think* *think*


http://stackoverflow.com/questions/1388 ... er-crashes

Do we have nested templates? http://social.msdn.microsoft.com/Forums ... a1827f5a5e


Oh... http://freeorion.org/index.php/Compile# ... quirements :(
... wonder if there's a way to reduce the template usage? (yea, I realize that would likely mean some fundamental stuff/changes :shock: )
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi (introduction post)

#9 Post by Geoff the Medio »

I've split ConditionParser1.cpp into two files in the hope of making it, and the new ConditionParser4.cpp, easier to compile.

Edit: Getting rid of (nested) templates would involve rewriting the entire parser.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: Hi (introduction post)

#10 Post by yandonman »

Code: Select all

1>  UniverseObjectTypeValueRefParser.cpp
1>../../../Boost/include/boost_1_47/boost/fusion/container/vector/detail/vector_n.hpp(131): fatal error C1060: compiler is out of heap space
So close! Dah!!

<sane voice> Let me see if I can't find a way to break that file up as well, following your examples to date.
Geoff the Medio wrote:Edit: Getting rid of (nested) templates would involve rewriting the entire parser.
I wasn't suggesting getting rid of, rather reducing....
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi (introduction post)

#11 Post by Geoff the Medio »

yandonman wrote:Let me see if I can't find a way to break that file up as well, following your examples to date.
That's already one of the smallest files, and not likely worth trying to break up, if there's even anything to separate... Try again compiling one file at a time, rather than building the solution or whole project, which will likely try to build several .cpp files at once.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: Hi / Compile Crashes On Parsers

#12 Post by yandonman »

YAY!! I compiled!!!! YAY!
Compiled_Yay.jpg
Compiled_Yay.jpg (78.47 KiB) Viewed 2249 times
Alrighty, let's see if I can't be useful...
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi / Compile Crashes On Parsers

#13 Post by Geoff the Medio »

What did you do differently to get it to compile?

Assuming you're not actually building SVN 5195, the version number is wrong because Version.cpp that's used in the MSVC 2010 build needs to be manually updated.

The missing string for the objects button and that you haven't explored your home system suggests that you game is loading an old version of the stringtable and content files. Changing the version should have caused your old config.xml to be deleted and replaced, but apparently it hasn't, so try deleting it manually. You might also check in freeorion.log and freeoriond.log for ERROR lines about failing to parse things or not being able to find files, which might indicate the cause of that.

yandonman
Creative Contributor
Posts: 699
Joined: Thu Aug 30, 2012 12:32 am

Re: Hi / Compile Crashes On Parsers

#14 Post by yandonman »

I just babied the crap out of the compile - compile, then compile files individually that hit the cl heap space issue, link the Parser project explicitly after all of the .obj files are generated, then compiled the parent projects, resolving the link errors with step 2 & 3 as I ran into them. I also disabled IntelliSense (freeing up to 1 GB memory) and increased the page file, but these didn't stop the cl heap space issue, just helped... I think.

I built and then created this deploy .bat file:

Code: Select all

echo on
xcopy *.exe "C:\Program Files\FreeOrion"
xcopy *.dll "C:\Program Files\FreeOrion"
Based on your comments, it seems I'm missing copying over the latest string tables. I see the "default" folder in the src... but when I start the compiled FreeOrion.exe from the FreeOrion src dir, I still get the same missing strings. Suggestions?
Code released under GPL 2.0. Content released under GPL 2.0 and Creative Commons Attribution-ShareAlike 3.0.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Hi / Compile Crashes On Parsers

#15 Post by Geoff the Medio »

I don't follow why you had to copy the exes and dlls... even if compiling one at at time from in the GUI, they should be generated in the right location in the SDK directory from where the .sln was opened.

Regardless, FreeOrion doesn't care what the current working directory is when you start it up; it will still base it's assumptions about the default resource directory location on where the binary is actually located. To tell it what resources directory to use, go into the options menu and specify the default resources directory in the SDK that you've SVN updated the the same revision as the source code you've compiled.

Post Reply