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

OpenTTD Crash Report #4778

Closed
DorpsGek opened this issue Sep 18, 2011 · 11 comments
Closed

OpenTTD Crash Report #4778

DorpsGek opened this issue Sep 18, 2011 · 11 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

aleksandrkomi opened the ticket and wrote:

have saved the file version 1.0.1
I want to open it in version 1.1.3
is the error

Attachments

Reported version: 1.1.3
Operating system: Windows


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

planetmaker wrote:

can you please attach the savegame which you tried to load, which caused the crash?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10378

@DorpsGek
Copy link
Member Author

monoid wrote:

This crash appears to be due to a discrepancy between the English and Russian language strings, namely STR_SAVELOAD_DETAIL_COMPANY_INDEX:
http://hg.openttd.org/openttd/branches/1.1.hg/file/b81203d3886e/src/lang/english.txt# l2309
http://hg.openttd.org/openttd/branches/1.1.hg/file/b81203d3886e/src/lang/russian.txt# l2483

This string is used in the fios GUI here: http://hg.openttd.org/openttd/branches/1.1.hg/file/b81203d3886e/src/fios_gui.cpp# l451

Note that the English string uses a STRING1 parameter, since c.name_1 can use c.name_2 as a parameter. However, the Russian string only uses a STRING parameter, and there is a warning explicitly against this: http://hg.openttd.org/openttd/branches/1.1.hg/file/b81203d3886e/src/strings.cpp# l998


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10387

@DorpsGek
Copy link
Member Author

monoid wrote:

(Also, STR_JUST_RAW_STRING obviously uses c.name as a parameter in the other if-case.)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10388

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Regarding STRINGn/RAW_STRING vs STRING. The tool that compiles the languages replaces STRING with STRINGn/RAW_STRING depending on the value in english.txt. As such all languages are using the same STRINGn/RAW_STRING. It also makes changing STRINGn to STRINGm much easier.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10389

@DorpsGek
Copy link
Member Author

Rubidium wrote:

Without the savegame I've got the following hypothesis:
- with 1.0.1, the Russian modified 1.0.1 is meant which adds a Russian town name.
- the Russian town name generator is chosen.

However, 1.1.3 does not have the Russian town name generator, and thus it does not reach "$town_name Transport" case it should have reached.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10390

@DorpsGek
Copy link
Member Author

monoid wrote:

Your hypothesis appears correct: it is setting the string parameters using c.name_1 and c.name_2, which are 0x70FF and 0 respectively. The 0x70FF indicates a string with tab = 14, and index = 0xFF. Therefore it's a special name string with ind = 0xFF - 0xE4 = 0x1B, which is just past the end of the town name range.

RE: {STRING} vs {STRING1}: oops, you're right.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10391

@DorpsGek
Copy link
Member Author

aleksandrkomi wrote:

saved game

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10392

@DorpsGek
Copy link
Member Author

monoid wrote:

Yup, that is the case. (Except c.name_2 is 0xc389694c and not 0 - not that this relates to the problem)


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10393

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Fixed

In r22958


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

@DorpsGek
Copy link
Member Author

aleksandrkomi wrote:

You fix a bug?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10408

@DorpsGek
Copy link
Member Author

Alberth wrote:

This one is not fixable in 1.1.3, as it does not have the Russian name generator of your modified 1.0.1 version.
The only thing that can be done (and has been done) is to prevent 1.1.3 from crashing on your modified save game.

You can continue your game with the modified 1.0.1 version, or
apply your modifications to a 1.1.3 version yourself before loading your modified save game into it.

A much better alternative to this whole mess is to find a russian town-name grf and use that, instead of changing the program code.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4778#comment10409

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant