• Welcome to SC4 Devotion Forum Archives.

[Solved] Lots cause SC4 to hang - why?

Started by woodb3kmaster, July 23, 2016, 10:19:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

woodb3kmaster

A few months ago, I made some 30° exit taxiway lots, using the original RMIP2 lots as a starting point. When I try to select them from the airports menu, SC4 hangs and my CPU shoots up to 100% usage; I have to force-quit the game from Task Manager just to regain control of my computer.

This problem doesn't exist when I select these lots from the LotPlop list of lots, so I'd expect the cause of this annoying behavior to involve something the game only accesses when it displays a lot in a menu. Another possibility is my use of one of the RMIP custom cohorts; I didn't mod my lots extensively, so they just have the same parent cohort as the original RMIP lots. I'd appreciate any advice anyone has on how to fix this issue.

Feel brand new. Be inspired.
NYHAVEN - VIEWS FROM WITHIN
Nuclear City - 5/8

mgb204

Often this could be related to corrupted files, which could be the icons themselves, the DIR index or something else entirely. If you are able to open the files with Reader, try copying all the entries within to a new open instance of Reader, then saving it as a new file. Don't copy any DIR files, allow the new file to make a new one for you if required.

Otherwise it's probably a modding error somewhere within them. It's probably quicker if I could have a peek at the files to track down the problem.

twalsh102

Almost every time I have run into this, it has been the icon files.  Open the lot in Reader and check the PNG subfiles.  If they appear to be blank, or as I have often seen it, as a bunch of gibberish text, the PNG files are corrupt.  As you created the lot, that may mean you need to recreate the icon PNGs if you don't have another saved copy that you can just copy into the SC4lot file. If this is indeed the problem, it most often manifests itself by an actual missing icon in the menu, and all the other lots in the current menu view shifting descriptions.

Pretty much every other time I've run into corrupt PNGs, it's been after I have made a change to the lot file in Reader, and then re-saved the file.

The only other times I've run into this has been (as near as I can tell) when any or all of the following properties (Lot Exemplar Name, Building Exemplar Name, Building Item Name, Building Item Description) include foreign language characters (for me other than standard English language characters, but could possibly be any character that is not standard for the version of SC4 installed) in the data for the property.  I've resolved the problem (i.e. the lot would now plop from the menu) after I've removed (or Anglicized) the property data.

woodb3kmaster

I already shared my solution to this problem with Robin via PM, but for everyone else's benefit, here it is:

The icon for one lot was, in fact, corrupted - a consequence of my adding it with a newer version of Reader. Using Reader 0.9.3 to add custom lot icons produced no corruption at all. Oddly enough, though, the icon wasn't the real issue. It turns out that my use of the degree symbol (°) in the item names is what caused SC4 to hang; removing it from all their names got rid of the problem. It wasn't until I remembered someone having a similar problem due to their use of the § symbol in item descriptions that I got the idea of all non-ASCII characters posing a problem for English-language versions of SC4 (as was pointed out in that person's thread, the font used in SC4 actually puts that symbol in the dollar sign's usual codepoint).

Feel brand new. Be inspired.
NYHAVEN - VIEWS FROM WITHIN
Nuclear City - 5/8

mgb204

Re: the corrupted Icon, might be an idea to post a bug for that here, that way it can hopefully be fixed.

Whilst the latest reader version still has some issues, they are slowly being resolved, but we'll never get there if such bugs are not reported.

APSMS

This is interesting. I have some Japanese BATs in my plugins that cause this too, whenever I hover over them (however breifly) in the parks menu. Obviously this makes them difficult to pinpoint, since the game doesn't properly display Japanese BAT descriptions until plopped (I do have the requisite DLL, but it only works on queries).

But if such a fix exists, it will be worth sorting through the chaff to find the offender.
Experience is something you don't get until just after you need it.

My Mayor Diary San Diego: A Reinterpretation

Andreas

#6
The game will freeze whenever a non-US character is used indeed, I found that out many years ago when using German umlauts. There are two ways around it: Use an unicode "conversion" (I think the Maxis PIM actually does that when you enter a foreign character as building name, for instance), or use LTEXT files for any text that shows up in the game (menu description, hover query etc.) instead of Item Name and Item Description properties.

The LTEXT files were designed specifically for supporting foreign characters in plain text as well (and you can add multiple translations with the same set of properties). You can convert Item Name and Item Description easily with PIM-X and pick the desired language(s) via right-click; PIM-X will create LTEXT files and change the other properties to User Visible Name Key and Item Description Key.
Andreas