FreeOrion

Forums for the FreeOrion project
It is currently Sat Dec 16, 2017 5:27 am

All times are UTC


Forum rules


Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.



Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Tue May 03, 2016 4:17 pm 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
0.4.5+ (build 2016-04-26.81bf313) or FreeOrion_2016-04-26.81bf313_MacOSX_10.7.dmg

I have been playing the game for a few months now, and I tried today the build above for the first time.

I have started a handful of games with this build and in all cases both my infrastructure and my happiness meters are vanquished by an unknown malus that equals all the bonuses. This persists after the first few turns. As soon as I add a new bonus, the malus grows consistently keeping both meters stuck at zero.

Other meters like production, science, etc. are unaffected and appear to show no unknown malus.

I am not familiar with the new supply system, so I might be misunderstanding something.

Thanks for the help,
Elena


Top
 Profile  
 
PostPosted: Tue May 03, 2016 5:23 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
It would probably be helpful if you attached a save game, of as small a universe / few players / few planets / etc. as possible, that demonstrates the issue. But before that, start up a game that has this problem, play a turn or two, then locate the .log files in this directory, and then attach them to a reply (zipping if necessary).


Top
 Profile  
 
PostPosted: Sat May 07, 2016 9:32 am 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
Hello again,

thanks for the fast answer. I started a new game today. I targzipped all the files in that directory that were created today:
Attachment:
FreeOrionLogsRaflesia.tar.gz [65.49 KiB]
Downloaded 16 times


If that is not what you wanted, please let me know.

I noticed that not only happiness and infrastructure, but also detection have unknown malus equal to all the bonuses. But the other meters, like production and science, also have small unknown malus - contrary to what I said previously - not enough to zero the meter. This last bit was also reported elsewhere in the forum, but I add the info here as well in case it can be useful.

Thanks,
Elena


Top
 Profile  
 
PostPosted: Sat May 07, 2016 4:04 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
Did you actually end turn at least once after loading the save? It doesn't appear so from the log, but a log with that would be much more useful...


Top
 Profile  
 
PostPosted: Sun May 08, 2016 8:56 am 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
Sorry I do not understand ... I just played a few tens of turns, then saved, then extied, then collected the files. Do you mean that I should first end turn and then save without doing anything else?


Top
 Profile  
 
PostPosted: Mon May 09, 2016 1:49 am 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
Raflesia wrote:
Sorry I do not understand ... I just played a few tens of turns, then saved, then extied, then collected the files. Do you mean that I should first end turn and then save without doing anything else?
The logs you attached appear to be from a game where you loaded a saved game then immediately quit, without ending turn at least once. I need a log file from after you've ended turn at least once while the problem is happening.


Top
 Profile  
 
PostPosted: Fri May 13, 2016 12:09 pm 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
Ah now I see what you mean. I had to create a much smaller game to fit in the uploads limits. Here it is.
Thanks for your patience ...


Attachments:
FreeOrionLogRaflesia.tar.gz [787.16 KiB]
Downloaded 12 times
Top
 Profile  
 
PostPosted: Tue Jun 14, 2016 7:21 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
I don't know why, but a cast is failing repeatedly in the log you posted. That cast should only be attempted it it would succeed, based on safety checks done right before.

I added some fallback methods to execute in the event of a failed cast, which should hopefully resolve the issue for you, though you won't get the (possible?) slight speedup that this code was intended to achieve.


Top
 Profile  
 
PostPosted: Sat Jun 18, 2016 6:43 pm 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
Ok, I do not know what a cast is, but I think I got the idea :D
Thank you for your help.
I would like to try the new version, what test build will it be?


Top
 Profile  
 
PostPosted: Sat Jun 18, 2016 6:55 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12042
Location: Munich
Raflesia wrote:
Ok, I do not know what a cast is...
I have a memory address stored in a variable, and that memory address points to some information about how to calculate how much to add to a planet's happiness each turn. The variable has a type, which means it knows it's a calculation that can be done, but not exactly what kind of calculation. However one can find out what kind of calculation it is by looking at the pointed-to-memory. In the code, I call a function that looks at the memory and returns true if it's a particular kind of calculation, and false otherwise. If it returns true, I try to store the memory address in another variable that has a different type, which does indicate how the calculation is done. This storing-in-another-type-of-variable is a cast. However, in your log, it says that this storing the memory address in another variable casting step is failing, even though it should only attempt to do the cast after checking that it should work by looking at the pointed-to memory.

The next release, but not the current one, should have the change in it.


Top
 Profile  
 
PostPosted: Mon Jun 20, 2016 11:45 am 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
Very clear explanation, thanks! Ok I'll wait for the next release, I tried the 14th of June release but it's too early.
Thanks again.


Top
 Profile  
 
PostPosted: Tue Jul 05, 2016 8:51 pm 
Offline
Space Krill

Joined: Tue May 03, 2016 4:02 pm
Posts: 9
FreeOrion_2016-06-21.94bf367_MacOSX_10.7.dmg

This is just to let you know that:
1. the problem with the malus has indeed disappeared
2. the performances, compared to the 2015 builds I was using, are much much much much better

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 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