FreeOrion

Forums for the FreeOrion project
It is currently Sun Oct 22, 2017 10:39 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: AI state errors
PostPosted: Sun Jun 18, 2017 2:50 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3245
Recompiled and started a new game earlier, got a weird crash that I think was caused by a different app so loaded the autosave
Code:
AI_3: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_10: AI_Error: AI script error in "generateOrders": "Unable to find key in unordered_map."
AI_7: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
Waiting for Other Players
Executing Orders
Colonization, Invasion, and Scrapping
Fleet Movement
Downloading and Unpacking New Game-state
Resolving Combat
Production and Growth
Downloading and Unpacking New Game-state
Begin Turn 161
Saving...
Saved 3687791 bytes to file: /home/matgb/.local/share/freeorion/save/auto/FreeOrion_Mat_Aardvark_0161_20170618_034154.sav
AI_10: AI_Error: AI script error in "generateOrders": "Unable to find key in unordered_map."
AI_10: AI_Error: AI script error: "foAIstate unable to pickle save-state string; the save file should be playable but the AI may have a different aggression."
All the AIs were giving the first/AI_3 error except AI 10, and then after I hit end turn AI 10 gives the same error unique to it followed by everyone getting the same.

I'm playing with Pull Request #1587 ยท freeorion/freeorion rebased onto Master with some minor script tweaks I'm testing, none of which should be making a difference to the AI but this might be unique to me in some way hence posting here not opening an issue. Anyone seen similar?

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Sun Jun 18, 2017 3:41 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3245
OK, not a problem my end, game unplayable due to the error messages in the other thread, so I compiled master, started a game, saved it on turn 2, quit and loaded again. Same error messages
Code:
AI_11: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_3: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_5: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_7: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_6: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_10: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_1: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_2: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_8: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_9: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"
AI_4: AI_Error: AI script error: "Fail to load aiState from saved game: 'set' object has no attribute 'keys'"

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Sun Jun 18, 2017 10:01 am 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 222
Please post the full AI logs.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Sun Jun 18, 2017 11:44 am 
Offline
AI Contributor

Joined: Tue Feb 17, 2015 11:54 am
Posts: 222
Can you try if https://github.com/freeorion/freeorion/pull/1609 fixes the problem?

It will only work for new games.
Please start a new game, save it, then try to load it and report back.

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Mon Jun 19, 2017 1:49 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3245
Working fine as far as I can see, have saved and reloaded twice now, rebooting entire game once to be sure. Hasn't fixed the other message though:
Code:
 /home/matgb/.local/share/freeorion/save/auto/FreeOrion_Mat_Wotsits_0087_20170619_024423.sav
AI_11: AI_Error: AI script error in "calculate_priorities": "Unable to find key in unordered_map."
AI_11: AI_Error: AI script error in "assign_military_fleets_to_systems": "Unable to find key in unordered_map."
Probably unrelated, but it started appearing immediately I captured that AI homeworld. Almost certainly unrelated to save problem, log attached, can't see anything, LMK if a higher log level helps (still not sure how to use that new option)


Attachments:
AI_11-lost-homeworld.log.zip [997.93 KiB]
Downloaded 7 times

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Tue Jun 20, 2017 11:24 pm 
Offline
Programmer

Joined: Sun Feb 14, 2016 12:08 am
Posts: 333
For general use, the original command line option --log-level trace works much like original and will set all of the configured loggers to trace level.

_________________
Any content posted should be considered licensed GNU GPL 2.0 and/or CC-BY-SA 3.0 as appropriate.


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Sun Jun 25, 2017 11:33 pm 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
Hi i got this error when there were only ships left from a conquered ai it's ships just hung around the ai was giving move orderkey errors.


Top
 Profile  
 
 Post subject: Re: AI state errors
PostPosted: Thu Jul 13, 2017 1:42 am 
Offline
AI Lead, Programmer
User avatar

Joined: Sat Sep 22, 2012 6:25 pm
Posts: 4371
I've been unable to replicate this ""Unable to find key in unordered_map."" error -- has anyone seen it appear lately? If so, by any chance might you still have a savegame with that error happening?

_________________
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group