Page 1 of 1

Unknown malus vanishing infrastructure and happiness

Posted: Tue May 03, 2016 4:17 pm
by Raflesia
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

Re: Unknown malus vanishing infrastructure and happiness

Posted: Tue May 03, 2016 5:23 pm
by Geoff the Medio
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).

Re: Unknown malus vanishing infrastructure and happiness

Posted: Sat May 07, 2016 9:32 am
by Raflesia
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:
FreeOrionLogsRaflesia.tar.gz
(65.49 KiB) Downloaded 55 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

Re: Unknown malus vanishing infrastructure and happiness

Posted: Sat May 07, 2016 4:04 pm
by Geoff the Medio
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...

Re: Unknown malus vanishing infrastructure and happiness

Posted: Sun May 08, 2016 8:56 am
by Raflesia
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?

Re: Unknown malus vanishing infrastructure and happiness

Posted: Mon May 09, 2016 1:49 am
by Geoff the Medio
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.

Re: Unknown malus vanishing infrastructure and happiness

Posted: Fri May 13, 2016 12:09 pm
by Raflesia
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 ...

Re: Unknown malus vanishing infrastructure and happiness

Posted: Tue Jun 14, 2016 7:21 pm
by Geoff the Medio
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.

Re: Unknown malus vanishing infrastructure and happiness

Posted: Sat Jun 18, 2016 6:43 pm
by Raflesia
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?

Re: Unknown malus vanishing infrastructure and happiness

Posted: Sat Jun 18, 2016 6:55 pm
by Geoff the Medio
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.

Re: Unknown malus vanishing infrastructure and happiness

Posted: Mon Jun 20, 2016 11:45 am
by Raflesia
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.

Re: Unknown malus vanishing infrastructure and happiness

Posted: Tue Jul 05, 2016 8:51 pm
by Raflesia
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