Crash on world generation - unknown exception

Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.

Moderator: Oberlus

Post Reply
Message
Author
iron_gollum
Krill Swarm
Posts: 14
Joined: Fri Aug 20, 2010 8:04 pm

Crash on world generation - unknown exception

#1 Post by iron_gollum »

I have first mentioned the problem here, but for the sake of staying ontopic, I'll continue it in this subforum. Now I've spent quite a lot of time searching for the problem, but I must admit my failure and need some help. The crash apparently occurs in Empire::Init() in the last queue (ll. 1111-1113)
Geoff the Medio wrote:A new content file was added, alignments.txt, in the default directory. If you're loading content files from a different location than where you updated from SVN, that might cause a crash.
I checked the directory where alignments.txt is being loaded from. It is the correct "default" directory. The file and the directory both exist on my file system.
Regardless, is there an error message or log file that might indicate what the problem is?
I didn't find any. Is there an option to turn on, so that a log is being recorded?

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Crash on world generation - unknown exception

#2 Post by OndrejR »

Logs are in ~/.freeorion and are automatically created. Please also delete config.xml, which may be from some old version and try again and post logs.

iron_gollum
Krill Swarm
Posts: 14
Joined: Fri Aug 20, 2010 8:04 pm

Re: Crash on world generation - unknown exception

#3 Post by iron_gollum »

Uh, I have neither such a directory, nor a config.xml file in the SDK where I am running it from.

User avatar
OndrejR
Space Dragon
Posts: 339
Joined: Thu Oct 02, 2008 11:00 pm
Location: Slovakia

Re: Crash on world generation - unknown exception

#4 Post by OndrejR »

If you are on Windows or Mac, then location is this

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

Re: Crash on world generation - unknown exception

#5 Post by Geoff the Medio »

iron_gollum wrote:The crash apparently occurs in Empire::Init() in the last queue (ll. 1111-1113)
I don't know what you mean by "the last queue", but lines 1109-1114 are:

Code: Select all

const AlignmentManager& alignment_manager = GetAlignmentManager();
const std::vector<Alignment>& alignments = alignment_manager.Alignments();
for (std::vector<Alignment>::const_iterator it = alignments.begin(); it != alignments.end(); ++it) {
    const Alignment& alignment = *it;
    m_meters[alignment.Name()];
}
You might add an std::cout << alignment.Name() << std::endl; line in that loop, to see if anything useful is being done before the crash happens... but there should be some debug output from the code in lines 1050-1063 as well, that might be more useful.
Regardless, is there an error message or log file that might indicate what the problem is?
I didn't find any. Is there an option to turn on, so that a log is being recorded?
See OndrejR's link to the location for config.xml and the log files. It is not in the SDK directory.

iron_gollum
Krill Swarm
Posts: 14
Joined: Fri Aug 20, 2010 8:04 pm

Re: Crash on world generation - unknown exception

#6 Post by iron_gollum »

Oh ok, I found it. Indeed, the last lines of the log (the whole log is about 90k lines long, so I don't post it and I can't attach it since it's 1MB) say:
Error: XML start/end tag mismatch - m_meters
2010-11-25 18:23:54,375 DEBUG Client : (HumanClientFSM) ~WaitingForTurnDataIdle
2010-11-25 18:23:54,375 DEBUG Client : (HumanClientFSM) ~WaitingForTurnData
2010-11-25 18:23:54,375 DEBUG Client : (HumanClientFSM) ~PlayingGame
2010-11-25 18:23:54,375 DEBUG Client : ClientNetworking::NetworkingThread() : Networking thread will be terminated due to disconnect exception "Der E/A-Vorgang wurde wegen eines Threadendes oder einer Anwendungsanforderung abgebrochen"
2010-11-25 18:23:55,468 ERROR Client : main() caught exception(std::exception): Unknown exception
And there is no tag called m_meters in the config. However, the funny thing is that deleting config.xml has absolutely no effect: the log file still says the same, although there is no config file in this directory any more, and no new config file is being created.

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

Re: Crash on world generation - unknown exception

#7 Post by Geoff the Medio »

It's not expected that there would be a m_meters tag in config.xml. Rather, m_meters is data in the Empire class. The only place such a tag would be present to cause such an error is in the serialization of the Empire class. Can you make sure you've rebuilt Empire.cpp before linking the server and human clients? It might help to do a full clean and rebuild. Also, is there a freeoriond.log ? Perhaps something crashed while serializing on the server, which might explain the missing close tag?

iron_gollum
Krill Swarm
Posts: 14
Joined: Fri Aug 20, 2010 8:04 pm

Re: Crash on world generation - unknown exception

#8 Post by iron_gollum »

I deleted config, rebuilt the project, now everything is running. Thanks!

Post Reply