Error about missed stringtable files in ai log.

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
Cjkjvfnby
AI Contributor
Posts: 539
Joined: Tue Jun 24, 2014 9:55 pm

Error about missed stringtable files in ai log.

#1 Post by Cjkjvfnby »

I got next error in my log AI_1.log

Code: Select all

DEBUG AI : v0.4.4+ [SVN 8050] MSVC 2010
...
DEBUG AI : Python stdout and stderr redirected
ERROR AI : StringTable_::Load failed to read file at path: f:\Games\FreeOrion\default\python\turn_events\default\stringtables\en.txt
DEBUG AI : Initialized FreeOrion Python AI with ai_config string ''
My config:

Code: Select all

 <resource-dir>f:\games\FreeOrion\default\</resource-dir>
<stringtable-filename>f:\games\FreeOrion\default\stringtables\en.txt</stringtable-filename>
Game look OK.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Error about missed stringtable files in ai log.

#2 Post by Dilvish »

Yes, I think that's been appearing since Vezzra put in the basic turn events handling. We've had so much else going on that I had wanted to let things settle down before nagging him about it, but I suppose it's good to go ahead and get it on the record.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Error about missed stringtable files in ai log.

#3 Post by Vezzra »

Oops??? How did that happen? I didn't touch the AI code at all.

Please feel free to bug me about it once things have settled down, I might easily forget as things are just piling up at the moment...

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Error about missed stringtable files in ai log.

#4 Post by Dilvish »

I'm now noticing this same error message in my server log, around line 40 just after "Initializing PredefinedShipDesignManager", and the AI executable is not finding the content directories at all (the AI log files list all kinds of content problems and the AIs do nothing ingame). I guess all my testing for a while had been just with the human client and my own empire, is the only reason I can figure out that I hadn't noticed this yet. Though at the time I first posted above, the AI was just getting the stringtable error but not the content errors and was still functioning ok.

I have found that if I comment-out the couple of "safeguard" python directory changes done in PythonServerFramework.cpp PythonInit(), then the AI no longer has these error messages in the log and works fine (at least seems to in brief testing so far), but I am still getting the server error about the stringtable. The lines I commented out for this were at lines 147-148:

Code: Select all

//     if (!PythonSetCurrentDir(GetPythonUniverseGeneratorDir()))
//         return false;
and at lines 165-166

Code: Select all

//     if (!PythonSetCurrentDir(GetPythonTurnEventsDir()))
//         return false;
could someone else who compiles please double check if they are getting these problems with the current repository code, and if the above stopgap fix/hack solves the problem for the AI for you as well? A better fix would probably be to save the current directory before these changes and then restore it, or possibly just check the validity of the directories in some other way than chdir'ing to them. But I don't want to sink more time into fiddling with this without a confirmation that someone else is seeing the same problem and that this initial hack also fixes at least the main AI problem for them. Please be sure to mention your platform also (I'm on linux).
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Error about missed stringtable files in ai log.

#5 Post by Geoff the Medio »

Dilvish wrote:...could someone else who compiles please double check if they are getting these problems with the current repository code, and if the above stopgap fix/hack solves the problem for the AI for you as well?
I only see that error in the AI log after starting a game a playing a turn, not the server or client. After commenting out those lines and recompiling, the error in the AI log is gone.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Error about missed stringtable files in ai log.

#6 Post by Dilvish »

ok, thanks for confirming that. Before commenting out those lines (or if you restore them), did your AI log file also report a lot of errors with content (SpeciesManager reporting it can't find species, some other manager (shipdesign maybe) not finding hulls or something?
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

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

Re: Error about missed stringtable files in ai log.

#7 Post by Geoff the Medio »

Dilvish wrote:...did your AI log file also report a lot of errors with content (SpeciesManager reporting it can't find species, some other manager (shipdesign maybe) not finding hulls or something?
No.

I had one error in the client (only) about a ValueRef<double> being unable to evaluate LocalCandidate.MaxStructure where the log reported that LocalCandidate was a ship, which should have a MaxStructure, but this has since disappeared and doesn't seem to depend on the lines discussed in this thread. Maybe there was a quirky serialization error?

Post Reply