I could have sworn that we used to do a better job at handling run time errors (although I may be thinking of GAE; it's been a while).
By run time error, I'm referring particularly to errors in validating tech trees. Right now, they crash the program
and don't print to the log. The error log has not been touched. The regular log just cuts off at the unit where the error was thrown. In order to retrieve the error message, you must run the game from the console (so that the console won't close when the program closes).
And even then, the error messages are heavily overcomplicated (for whatever reason) and the simple message is concealed within two dozen lines of "stack traces" (and I put this in quotes because it's not a stack trace I've seen before and doesn't seem to be useful in any way). This may be related to the other issues that I pointed out today, namely that
Windows won't compile unless an exception handling line is commented out and that
the debugging files are output in the wrong name.
Below is the error of the simple mistake of using an invalid armor type on a single unit.
$ megaglest.exe
megaglest.exe v3.10.0-dev
Compiled using: VC++: 1600 [DEBUG] on: Jul 19 2014 07:40:38 platform: Windows endianness: little
GIT: [$Rev$] - using STREFLOP [SSE] - [no-denormals]
*ERROR* [2014-07-19 10:06:38] In [unit_type.cpp::Glest::Game::UnitType::loaddd Line: 727] Error [Arm
or Type not found: asd
Stack Trace:
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
]
*ERROR* [2014-07-19 10:06:38] In [faction_type.cpp::Glest::Game::FactionType::load Line: 185] Error
[Error loading UnitType: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game\techs/mega
pack/factions/indian/units/stickfighter/stickfighter.xml
Message: Armor Type not found: asd
Stack Trace:
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
]
*ERROR* [2014-07-19 10:06:38] In [tech_tree.cpp::Glest::Game::TechTree::load Line: 357] Error [Error
loading units: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game\techs/megapack/fact
ions/indian/
Message: Error loading UnitType: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game\te
chs/megapack/factions/indian/units/stickfighter/stickfighter.xml
Message: Armor Type not found: asd
Stack Trace:
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809ae0d NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809ae0d NtGetContextThread!ntdll (null)(0) +18
]
*ERROR* [2014-07-19 10:06:39] In [program.cpp::Glest::Game::Program::setState Line: 683]
Error [Error loading Faction Types: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game
\techs/megapack/
Message: Error loading units: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game\techs
/megapack/factions/indian/
Message: Error loading UnitType: f:\Documents\Projects\MegaGlest\megaglest-source\data\glest_game\te
chs/megapack/factions/indian/units/stickfighter/stickfighter.xml
Message: Armor Type not found: asd
Stack Trace:
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c8099fdd NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809a7e5 NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809ae0d NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809ae0d NtGetContextThread!ntdll (null)(0) +18
Stack Trace:
00000000 00000000 00000000 c809b615 NtGetContextThread!ntdll (null)(0) +18
00000000 00000000 00000000 c809b615 NtGetContextThread!ntdll (null)(0) +18
]
AL lib: ReleaseALC: 1 device not closed