Air polution bug

Athmos

Warlord
Joined
Jan 2, 2006
Messages
242
Hello, in my (v32) game, I have a very strange thing happening to air pollution. In some cities I see wild variation of air pollution ( +5000, -5000, that kind of amount), with no apparent corelation to the amout displayed in the city UI (e.g, i can see -120 population + decay, -60 natural sources, + 5000 as a result ?).

I don't know if it's a bug (Like a value being stored in a wrongly typed variable or with too small a bottom cap, that can't handle the number being too negative ?), an event (there was a "harsh storm" event warning a few turns ago, but if it's the cause it's quite cryptic), or a save corruptionn but it is VERY annoying.

I also have an error message when the hypersonic reconaissance planes are spawning (next turn from the one in the save), and the plane spawn with no experience (should spawn with a lot).

Are the events and their effects listed somewhere ?
 

Attachments

  • air polution bug.rar
    4.9 MB · Views: 38
No one knows ? Or no one cares ?

Is anything else than the savegame required ?
 
There was a point where integers were not big enough to store values. I think this causes that sort of error. I can't remember if someone fixed that for properties in the v33 release or if it was done after and is waiting for the next release.
 
No one knows ? Or no one cares ?

Is anything else than the savegame required ?

A word Athmos, it's not that no one cares but you are playing an older version that probably has that fixed. Also the main bug squasher is involved in RL for the next couple of months and Bug squashing will be slowed accordingly.

So have some patience and Please update to a newer version.

Thank you.

JosEPh :)
 
Yeah, the property mechanism is sort of a complex specialty issue and not something even those of us with some, but not mastery level, dll skill can tinker with enough to resolve bugs of this nature. It MIGHT be possible but we're better off waiting for the pros to resolve something of this magnitude.
 
There was a point where integers were not big enough to store values. I think this causes that sort of error. I can't remember if someone fixed that for properties in the v33 release or if it was done after and is waiting for the next release.

I can't find it in either changelog (v33 or v34). I know it has been worked on, so unless I missed it (which is entirely possible), it could do with being added to the appropriate changelog.
 
A word Athmos, it's not that no one cares but you are playing an older version that probably has that fixed. Also the main bug squasher is involved in RL for the next couple of months and Bug squashing will be slowed accordingly.

So have some patience and Please update to a newer version.

Thank you.

JosEPh :)

I have patience. The whole matter of the question is in the "probably" word. I'm not making reproach at the bug fixers, and the answer saying that it's been fixed in version N is perfectly acceptable. I understand perfectly that if is is fixed or will be, it will necessarily be in a later version.

But making sure the bug is acknowledged is the whole point of bug reporting isn't it ?

And before updating to a newer version (after all, there's only ONE version ahead released right now), I'd like to know if it fixed or not : I don't plan on relearning half the game in the middle of my first game just for the sake of updating; and I'm not sure I will enjoy some of the additions of v34, so knowing if v33 has the bug fixed is important to me.

You have to concede that some mechanisms in the game are quite obscure, and even if they may work fine (I quite enjoy the diffusion mechanisms of pollution and crime actually), it is sometimes hard to differentiate a bug from a misunderstood event or effect if you didn't code it yourself.

DH is apparently hinting that the variable used couldn't handle some values when they get large, which is what I was guessing at when pointing at possible overflows.



I don't want to irritate anyone by reporting a bug, I thought that this sub forum existed for that purpose...
And somehow, one expects to get a reply, at least something like "we know about it. We don't know how to handle it" or "it's been solved in v..." or "I never saw something quite like this, we'll have to look into it".

I get that bugs can't always be solved quickly (I'm an programmer myself, although I don't know anything pertaining to CIV modding), no worries about that.
 
I updated to v33, and the bug is still in. It does seems to be particularily virulent with air pollution, I don't know why but water pollution looks to be unnafected? Disease behaves strangely too, but I have not seen any +- 6000 variations between turns yet, only ~200 swings that looks to be inconsistent with the displayed sources.

If anyone is interested in a screenshot pack with a selection of these strange happenings, I can provide one; the screens are very large (I play in 1920x1200) so I didn't want to include any directly in the forum.
 
I updated to v33, and the bug is still in. It does seems to be particularily virulent with air pollution, I don't know why but water pollution looks to be unnafected? Disease behaves strangely too, but I have not seen any +- 6000 variations between turns yet, only ~200 swings that looks to be inconsistent with the displayed sources.

If anyone is interested in a screenshot pack with a selection of these strange happenings, I can provide one; the screens are very large (I play in 1920x1200) so I didn't want to include any directly in the forum.

If you put them (screen shots) in jpeg format they take up less space with sufficient quality for us to see. A compressed save showing the variation with notes on what to do between turns will also help identify what is happening.
 
OK, i have jpegs, they are not monstrously heavy (around 300k), but i was more worried about the size, which will probably break the display in the forum for most people. I'll do a bit of cropping and show some shots of the properties in successive turns in the same cities.
 
If you do a "post reply" or "go advanced" on a quick reply you can "manage attachments" which allows you to load up files. If you load your screen shots that way they are displayed as thumbnails in the post. Clicking on the thumbnail brings up the full sized screen shot.
 
I updated to v33, and the bug is still in. It does seems to be particularily virulent with air pollution, I don't know why but water pollution looks to be unnafected? Disease behaves strangely too, but I have not seen any +- 6000 variations between turns yet, only ~200 swings that looks to be inconsistent with the displayed sources.

If anyone is interested in a screenshot pack with a selection of these strange happenings, I can provide one; the screens are very large (I play in 1920x1200) so I didn't want to include any directly in the forum.

If we're talking about an overloading integer I could probably fix that even if it IS in the property mechanism so please post for me a savegame so that I can take a look and prove or disprove that theory.
 
Ok, well I looked into this and it simply digs into stuff I don't want to be tweaking. Property value numbers interact in SO many places that it becomes rather difficult to figure out where to draw the line between long long and int and go ahead and convert the value. Where I got stuck was in the Read/Write wrappers... they are NOT prepared to work with long long values at all so I'm going to need some help in getting that resolved before I can move too far forward here or I feel I could really cause a big mess here. I just spent hours on the project only to revert everything because I ran up against some walls I couldn't figure out my way around in the core data management portions of the mod.

What this means is that we currently can't record in the save game files a larger number than the Int limit which is obviously what is being surpassed. While we could probably make it so the system doesn't wig out when it hits those numbers, it's not quite right to make it so that saving the game and reloading would reset numbers to their maximum.

Probably a better approach would be to simply LIMIT the numbers in play to the MAX_INT values but I'm again not entirely sure where to enforce such limits - a save game might help. THIS approach would keep property values from exceeding the limit and thus would keep it from drawing up a nearly random number once the limits are exceeded. It'd also have the side benefit of not increasing the memory demands to run the mod which conversions to long long to extend the operable range would do.

I'll figure something out...

For reference, the web is telling me that Int limits us between the values of 2,147,483,647 (roughly 2 billion) and -2147483647.

When exceeded it tends to return a random number within that range so what you're experiencing here could well be this problem.
 
Top Bottom