Single Player bugs and crashes - After the 16th of May

The characters at 0xFF and 0xFD are ÿ and ý which likely should not be in a text right after each other, especially not in an English text.

But to get 0xFFFD you don't need an FF and an FD character in the input stream. It is the replacement character that you should get for any invalid UTF-8 character.

UTF-8 is somewhat misnamed since it is not an 8-bit encoding. It is a variable byte count encoding. All valid 1-byte UTF-8 characters are actually 7-bit characters that match the 7-bit ASCII characters. Any other character is encoded with more than 1 byte. All valid 2 byte UTF-8 encoded characters start with a byte that is theoretically in the range from 192 to 223 (decimal; C0 through DF hex; in the format of 110xxxxx in binary where any combination of 0s and 1s for the xxxxx part is valid, except that decimal 192 and 193, where the binary values would be 00000 and 00001, are not valid bytes because the bits encoded can be done as a 1 byte character instead and therefore would be a 1 byte character) - note that these are, of course, all valid Latin-1 characters (mostly capital letters with accents). In order to be a valid UTF-8 encoding, the next byte must be of the form 10xxxxxx (binary). If a UTF-8 parser hits a 2 byte sequence where the first byte is in the valid range but the second byte is not in the valid format you will end up with the Unicode character 0xFFFD since that is what it is for (although some parsers use different values to represent "invalid character" values). So you can get the 0xFFFD character when none of the bytes in the incoming data stream is 0xFF or 0xFD.

It is also important that any single byte that is in the 245 to 255 (decimal) range is invalid in UTF-8. There is no way to encode anything in UTF-8 that will produce them so there is no way for a UTF-8 parser to parse them into a valid character. So if you try to parse some Latin-1 encoded data as UTF-8 and it includes a character in this range you will get the 0xFFFD character instead. One relatively common character in that range is "ö", which sometimes appears in English text in words taken from other languages.

There are also 3 and 4 byte encodings for characters in UTF-8. These also have specific values for what range each byte can be in and will also result in the same 0xFFFD character if the first byte in the sequence indicates it is in one of these two types but one or more of the following bytes is not the a valid range. The 3-byte values all have a first byte starting (high order) with 3 1s and a 0 (binary; 1110xxxx) and the 4 byte encodings with 4 1s and a 0 (11110xxx).

The extension bytes for all 2, 3, and 4 byte encodings are all in the 10xxxxxx (binary) format (if they are valid) except the 4th byte in a 4 byte encoding which has an upper limit to the value.

(UTF-8 as originally proposed also had 5 and 6 byte character encodings with the first byte having 5 and 6, respectively, 1 bits then a 0 bit followed by the data bits in the first byte, but they were done away with along with part of the 4-byte range. The original format could encode 31 bits of Unicode character, to match the original range of the Unicode character set, but it ended up being limited to covering the UTF-16 encoding's character set instead.)
 
There is a bug in the world builder where the game crashes if you adjust the culture rating of a city, i've started a new game, played frederick, went to the world builder, adjust the culture to something to hit legendary, typed in 9999999, end up CTDing after it taken affect.

Explained in the WB thread itself.
 
I think I found a little bug related to city ruins.

If you raze a city, a city ruins feature will give +15% defense to the tile, for example adjusting a +25% hill to +40% with ruins on top.

However, once you build a city on it, the ruins bonus isn't gone, I think the city still receives it as extra (bombardable) city defense, not as terrain defense (but maybe this as well).

I saw this when several new cities near me got very high values which I couldn't explain. I dont know if even the ruins stack upon city founding, meaning if a city is build on a site where 2 cities had been destroyed before it would receive +15% +15% = +30% (bombardable) city defense asap.

One enemy city had like 65% defense just 1 turn after being founded...

I don't know how excactly the ruins bug works but I think it's there - something's fishy in the ruins compartment ;-)
 
Another CTD, no minidump, just poof CTD SVN 5582

Here is what i did for the last one, i changed it to this
Code:
	<Define>
		<DefineName>NUM_CITY_PIPELINE_THREADS</DefineName>
		<iDefineIntVal>[B]0[/B]</iDefineIntVal>
	</Define>
and i didnt have any problems what so ever for over 450 turns. i then changed it to
Code:
	<Define>
		<DefineName>NUM_CITY_PIPELINE_THREADS</DefineName>
		<iDefineIntVal>[B]2[/B]</iDefineIntVal>
	</Define>
and after 25-50 turns this is what happened, poof CTD and its repeatable i cant get it back to work now??

I tried using the debug dll to all my savedgames and "poof ctd" on each didnt even load.

It keeps given me that DH modules error on subdue missions file didnt load and after that nothing.

If you get it to the next turn, please place it here, so i can go further in this game thx.

This save is playing fine for me (with 4 threads and viewports). I don't have the latest assets though, so I cannot be sure there isn't an issue in relation to some recent asset changes (since Saturday), and I cannot post a save fro you without destroying a bunch of buildings that are not defined in my assets. I'm hoping to push my changes later today, at which point I'll update everything (before a final test), and at that point (assuming it still plays through ok for me) I'll be able to post a next-turn save for you.

Edit - can you confirm that you do have viewports on?
 
No i never play with viewports on, i should not have to with a rig like i have. Also i am just confirming, i am NOT getting an CTD's with the threading at 0, but as soon as i change it there i get the CTD, this has happened now on three different games i was playing:crazyeye:
If i can get the next 2 turns later with it at 0 it will NOT crash. But like i posted above, around 50-100 turns in, when set at 2 or above it CTD's.

Your rig is irrelevant to whether you need viewports - it is precisely (in that respect) equivalent to ANY machine that has a 64-bit OS and at least 4G RAM. The multi-threading makes things slightly more memory hungry, so it could easily be that you are just running out of memory due to not using viewports. The rate we've been adding new buildings and such like at lately, the memory footprint has gone up substantially since even V30, so it may not take much to push it over the edge. Try with viewports just to see if it makes a difference please. At the very least it will eliminate memory use as the core of the reason for your CTDs.
 
I was just looking over my rig (see attached) i have 2 GB of memory just for playing?? That needs viewports?? I am just asking?

btw I just enabled VP and it still crashes?? I also did a cache deletion.

Yes, in my experience every map from Huge onwards needs viewports. The bigger the map the earlier.
 
But to get 0xFFFD you don't need an FF and an FD character in the input stream. It is the replacement character that you should get for any invalid UTF-8 character.
You are right. The conversion function was silently adding the replacement character instead of just dropping bad characters as the documentation claimed.
It will fail now and add a message and I have fixed some XML text files that were declaring a bad encoding and changed the default assumption from UTF-8 to Latin-1.

@SO: Have you made sure yet that you (and especially the BtS exe) can write to the BtS exe folder ?
 
You are correct, isn't that the place (starting btn)? for BtS? If not what do i do??:dunno: Never had to do this stuff with Win 7?
With which user do you usually start it? Take that user and make sure you give it writing rights to the folder in which the BtS exe is (if he gets writing rights to the exe itself does not matter).
 
With which user do you usually start it? Take that user and make sure you give it writing rights to the folder in which the BtS exe is (if he gets writing rights to the exe itself does not matter).

If you don't have those rights that would also explain why you don't get minidumps.
 
So after upgrading to win7 I get this error. I had it both GEM map and the 2 play by e-mails I have been playing. Is there a way to fix it?
Who are you and what have you done with Hydro? :p
It can't be that you have not seen this problem yet that comes up very regularly on this forum.
 
Back
Top Bottom