Unknown malus vanishing infrastructure and happiness
Moderator: Oberlus
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.
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.
Unknown malus vanishing infrastructure and happiness
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
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
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Unknown malus vanishing infrastructure and happiness
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
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: 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
thanks for the fast answer. I started a new game today. I targzipped all the files in that directory that were created today: 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
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Unknown malus vanishing infrastructure and happiness
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
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?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Unknown malus vanishing infrastructure and happiness
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.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?
Re: Unknown malus vanishing infrastructure and happiness
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 ...
Thanks for your patience ...
- Attachments
-
- FreeOrionLogRaflesia.tar.gz
- (787.16 KiB) Downloaded 61 times
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Unknown malus vanishing infrastructure and happiness
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.
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
Ok, I do not know what a cast is, but I think I got the idea
Thank you for your help.
I would like to try the new version, what test build will it be?
Thank you for your help.
I would like to try the new version, what test build will it be?
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Unknown malus vanishing infrastructure and happiness
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.Raflesia wrote:Ok, I do not know what a cast is...
The next release, but not the current one, should have the change in it.
Re: Unknown malus vanishing infrastructure and happiness
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.
Thanks again.
Re: Unknown malus vanishing infrastructure and happiness
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
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