Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch settings save errors [iconv, codeset conversion] #389

Closed
DorpsGek opened this issue Nov 7, 2006 · 8 comments
Closed

Patch settings save errors [iconv, codeset conversion] #389

DorpsGek opened this issue Nov 7, 2006 · 8 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Nov 7, 2006

PandaMojo opened the ticket and wrote:

R7086 trunk:

Something is massively screwy. Changes made to patch settings in the UI are never seem to be committed to openttd.cfg after exiting through the in game menus (although reopening the menus after making a game and returning to the main menu, for example, will reflect them until application exit, and I think it may have changed some settings in the past - nothing I can reproduce though). openttd.cfg settings are sometimes - but not always - reflected in the main menu configuration list.

In the openttd.cfg file I have attached, I have under [patch] vehicle_speed = false -- this will cause the main menu patch list to display Realistic Acceleration as disabled, but creating a new game and opening the patch menu there will list it as Enabled instead. Switching this to vehicle_speed = true will make both menus display the patch as disabled. (This seems to be the opposite of all the other patches -- what gives?)

Making changes, creating a game, and then saving it seems to change the global settings sometimes, but not every time, and not necessairly all the options changed. I can't seem to get consistent behavior here. I also get diagnostic messages on the console... here's a fairly typical run:

michael-rickerts-ibook-g4:~/openttd-trunk panda$ ./openttd
Your sample.cat file is corrupted or missing!
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'UTF-8-MAC' to 'ISO-8859-15' unsupported
dbg: [iconv] Conversion from codeset 'ISO-8859-15' to 'UTF-8-MAC' unsupported

The exact number and combination of messages depends on the patch settings, so I'm pretty sure this is related. Relevant file information:

michael-rickerts-ibook-g4:~/openttd-trunk panda$ ls -l openttd.cfg OpenTTD.app/Contents/Data/sample.cat
-rw-r--r-- 1 panda panda 1608618 Nov 6 15:57 OpenTTD.app/Contents/Data/sample.cat
-rw-r--r-- 1 panda panda 4519 Nov 6 16:18 openttd.cfg

(I guess I have an invalid sample.cat file?!? Not a fatal error...)

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/389
@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 7, 2006

PandaMojo wrote:

Conversion messages actually seem to be triggered by opening the file dialog, for the most part -- appologies for that miscorrelation earlier. That ISO to UTF one is fishy, though.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment589

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 8, 2006

Darkvater wrote:

Your ICONV problems have already been solved I believe. If you have filenames in there in ISO-8859-15 format (as you said on IRC because you have compiled without iconv support at first) it cannot convert them because they are not in UTF-8 format.

ISO-UTF is fishy yes, you get this when you either try to save a file or make a screenshot. Since this is exactly a user-action, you can check what string caused it; perhaps even check if it even works with the iconv application.

Regarding patches: Several of these settings are saved with the savegame so someone playing your game (or multiplayer) will play with the same settings. However not all are saved. For example GUI stuff (show vehicle speed), etc. Changing these ingame will also change them globally. Changing settings ingame of those that are saved will only change it for the current game. To change it for NEW games either do it from the main menu or in openttd.cfg.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment598

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 9, 2006

PandaMojo wrote:

RE: ICONV - could've sworn the ISO->UTF conversion wasn't being consistently triggered with saving games, but I'll double check this - updated and recompiling as we speak.

As for the patch settings, the problem I'm facing is that changes from the main menu are not being reflected after restarting OpenTTD at all - for new games or in the patch menu itself. That is, changes made from the main menu only persist for that session, unlike on windows where these changes from the main menu will be reflected in openttd.cfg and not reset after restarting the program. My notes on in-game/savegame patch settings were to clarify that the functionality of that menu were unaffected (that is, that this problem is main menu specific).

-----

Rebulit - ICONV messages still persist if I bring up the load dialogs or similar, but I can reproduce my problems without generating any of those messages currently.

As is, I disabled the various AI handicaps under "Competitors" via in game menu, but have since apparently lost the ability to re-enable (in a manner that persists after restart) them since disabling "Allow constructing raw material producing industries" under "Economy" - I cannot re-enable it either (such that it's saved).

Here's a pattern:
I'm not having trouble disabling options (such that they're saved).
I am having trouble enabling options (such that they're saved) - they revert to disabled.

This seems to be occuring in all tabs currently.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment608

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 9, 2006

PandaMojo wrote:

Note: Previous post was on OS X with R7120. Windows R7120 does not seem to suffer this behavior. openttd.cfg manually checked - line continues to state "patch_name = false" for the relevant patches, so it's definately a saving issue (instead of misparsing "= true" at load time or similar).


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment609

@DorpsGek
Copy link
Member Author

Darkvater wrote:

As I have no OSX to test on, I will have to forward you to Bjarni. It would be helpful if you could pinpoint a revision which caused this problem if it has worked in the recent past.

Does changing patch settings from the console work? eg 'patch vehicle_speed true'? You can check if the value is correctly set by querying it, eg 'patch vehicle_speed'


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment613

@DorpsGek
Copy link
Member Author

Bjarni wrote:

I already know about this one and I got this to say to it:

1: it appears to work anyway (don't ask me how though)
2: it's not present in the UTF-8 branch and a merge will kill this issue

I can't see how this can be related to the config file or anything inside a savegame. The conversion is only done on the savegamename typed in the game (ISO) and the filesystem (wide-UTF-8) and back when reading a directory. Because of this, it should either fail completely or find the file and any other issues will be related to something else.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment617

@DorpsGek
Copy link
Member Author

PandaMojo wrote:

RE: Revision - I was around the 6200s before upgrading to the 7000s, so I don't have a nice ballpark even. I can try working backwards.
RE: Console - It works the same as with the patch menu (changes are not reloaded next OpenTTD session)
RE: UTF-8 - Yes, this seems independant of the UTF-8 issue.

Disabling one option and enabling another at the same time will only cause the first change after restart.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389#comment619

@DorpsGek
Copy link
Member Author

DorpsGek commented Dec 5, 2006

Bjarni closed the ticket.

Reason for closing: Fixed

I found the problem for this issue. It picked the wrong iconv to link against and then UTF-8-MAC was not supported. Since it turned out to be a setup issue on my computer, no commit was needed to fix this.

The wiki page on how to compile on mac has been updated to tell about this issue and how to avoid it.


This comment was imported from FlySpray: https://bugs.openttd.org/task/389

@DorpsGek DorpsGek closed this as completed Dec 5, 2006
@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant