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 (lang file error) #3053

Closed
DorpsGek opened this issue Jul 23, 2009 · 7 comments
Closed

OpenTTD crash (lang file error) #3053

DorpsGek opened this issue Jul 23, 2009 · 7 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

cmoiromain opened the ticket and wrote:

Hi all

Using r16928, I had started the game some time ago (the game was in 1975 when it crashed, I started in 1970). I wanted to build a station, and got the following message: "String 0x494C is invalid. Probably because an old version of the .lng file." (btw, isn't that sentence grammatically incorrect?)

Here is the crash report:

*** OpenTTD Crash Report ***
Date: 2009-07-23 23:05:26
Build: r16928 (0) built on Jul 23 2009 18:24:53
Reason: String 0x494C is invalid. Probably because an old version of the .lng file.

Language: french.lng
Exception C0000005 at 0044B464
Registers:
EAX: 00000001 EBX: 0012F101 ECX: 000078BC EDX: 00110002
ESI: 0012EDC8 EDI: 0000014C EBP: 0012EFC8 ESP: 0012EDB4
EIP: 0044B464 EFLAGS: 00210202

Bytes at CS:EIP:
C6 05 00 00 00 00 00 5B C2 04 00 55 8B EC 81 EC 14 04 00 00 56 57 8B 7D

Stack trace:
0012F11B 0042CD48 00000001 0012F0E4 0012F054 69727453 3020676E 34393478
73692043 766E6920 64696C61 7250202E 6261626F 6220796C 75616365 61206573
6C6F206E 65762064 6F697372 666F206E 65687420 6E6C2E20 69662067 0A2E656C
005B2600 005B355A 0012F0A7 FFFFFFFF 0012F0B4 005B4066 00000000 0012F30A
0012F30A 005B40F2 FFFFFFFF 00000000 00000000 00000007 00000000 00000000
00000000 006A2D80 00CC2D90 00CC1E90 00000001 0012F0D8 00000000 00000000
00000000 00662EEE 00000000 00000000 00000000 00000000 00000001 0012F14C
00000001 0012F0A7 FFFFFFFF 00000000 00000040 0012EEF0 005B260B 005B355A
0012F13F FFFFFFFF 0012F14C 005B4066 00000000 0012F38F 0012F38F 005B40F2
005B260B 005B355A 00000000 00000007 0012F174 005B4066 00000000 006A2D80
00CC2D90 00CC1E90 00000001 0012F170 00000000 00000000 00000000 00662EEE
00000000 00000000 00000000 00CC1E90 00000001 0012F1E4 00000001 0012F13F
FFFFFFFF 00662EEE 00000040 00000000 00000000 00000000 00000001 0012F20C
00000001 0012F167 FFFFFFFF 00000000 00000040 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 0012EFE8 0043953F 00674238
0000494C 00000000 0012F0E4 00000000 0012F11B 0012F0DC 0043A417 006BB0A8
0012F917 0000026F 02121878 0012F118 0012F11B 00DDF706 00000000 00439398
006BB0A0 021217A0 00000000 0012F10C 0043AFFF 00000000 021217A0 0012F148
0012F15B 00DE75FB 00000000 00662EEC 006BB0A0 0012F0C8 0012F371 1CDF7762
0012F098 005AD019 0012F078 00662EEC 00000000 0012F0E8 0012F38D 000007F3
0012FB7F 0012F38E 000007F1 0012F38D 00000042 00662EEC 00000000 0012F0C8
0012F0F8 0012F0B4 005AD059 0012F38D 380007F3 00662EEC 00000000 1CDF7782

Module information:
C:\Program Files\OpenTTD\openttd.exe handle: 00400000 size: 2879488 crc: 025EED08 date: 2009-07-23 16:29:06
C:\WINDOWS\system32\ntdll.dll handle: 7C910000 size: 739840 crc: C0C23ACC date: 2009-02-09 10:53:55
C:\WINDOWS\system32\kernel32.dll handle: 7C800000 size: 1054720 crc: 1BDA556E date: 2009-03-21 14:07:58
C:\WINDOWS\system32\WINMM.dll handle: 76AE0000 size: 180736 crc: 3086C5C7 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\ADVAPI32.dll handle: 77DA0000 size: 685568 crc: CC544FBF date: 2009-02-09 10:53:55
C:\WINDOWS\system32\RPCRT4.dll handle: 77E50000 size: 585216 crc: 4B5B0E7C date: 2009-04-15 14:53:29
C:\WINDOWS\system32\Secur32.dll handle: 77FC0000 size: 56832 crc: 15DB9A7E date: 2009-02-03 19:58:06
C:\WINDOWS\system32\GDI32.dll handle: 77EF0000 size: 286720 crc: C8F25A13 date: 2008-10-23 12:36:51
C:\WINDOWS\system32\USER32.dll handle: 7E390000 size: 579584 crc: 6877A193 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\WS2_32.dll handle: 719F0000 size: 82432 crc: 05371B19 date: 2008-04-14 02:33:49
C:\WINDOWS\system32\msvcrt.dll handle: 77BE0000 size: 343040 crc: 2C173E38 date: 2008-04-14 02:33:33
C:\WINDOWS\system32\WS2HELP.dll handle: 719E0000 size: 19968 crc: 913FE327 date: 2008-04-14 02:33:49
C:\WINDOWS\system32\SHELL32.dll handle: 7C9D0000 size: 8517632 crc: 8F311D6A date: 2008-06-17 19:02:15
C:\WINDOWS\system32\SHLWAPI.dll handle: 77F40000 size: 474624 crc: C3E6539D date: 2008-04-14 02:33:41
C:\WINDOWS\system32\IMM32.DLL handle: 76320000 size: 110080 crc: ADE108FB date: 2008-04-14 02:33:26
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll handle: 77390000 size: 1054208 crc: B69132A6 date: 2008-04-14 02:30:54
C:\WINDOWS\system32\comctl32.dll handle: 58B50000 size: 617472 crc: E3E4D549 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\SHFolder.dll handle: 76720000 size: 25088 crc: E3F69657 date: 2008-04-14 02:33:41
C:\WINDOWS\system32\WINTRUST.dll handle: 76BE0000 size: 176640 crc: D3A1D304 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\CRYPT32.dll handle: 779E0000 size: 606208 crc: 5358E850 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\MSASN1.dll handle: 77A80000 size: 57344 crc: 08CF5CC7 date: 2008-04-14 02:33:30
C:\WINDOWS\system32\IMAGEHLP.dll handle: 76C40000 size: 144384 crc: B79C410C date: 2008-04-14 02:33:26
C:\WINDOWS\system32\wdmaud.drv handle: 72C70000 size: 23552 crc: 37C3D64B date: 2008-04-14 02:34:34
C:\WINDOWS\system32\msacm32.drv handle: 72C60000 size: 20992 crc: 34944160 date: 2006-11-03 14:15:21
C:\WINDOWS\system32\MSACM32.dll handle: 77BB0000 size: 72192 crc: C2923BE1 date: 2008-04-14 02:33:30
C:\WINDOWS\system32\midimap.dll handle: 77BA0000 size: 18944 crc: 0395B0D6 date: 2008-04-14 02:33:29
C:\WINDOWS\system32\ole32.dll handle: 774A0000 size: 1287168 crc: D69678E8 date: 2008-04-14 02:33:38
C:\WINDOWS\system32\uxtheme.dll handle: 5B090000 size: 219648 crc: 5135A37E date: 2008-04-14 02:33:48
C:\WINDOWS\system32\MSCTF.dll handle: 74690000 size: 297984 crc: 0E37D08F date: 2008-04-14 02:33:30
C:\WINDOWS\system32\CLBCATQ.DLL handle: 76F80000 size: 498688 crc: F623E1C4 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\COMRes.dll handle: 77000000 size: 851968 crc: 49A7A790 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\OLEAUT32.dll handle: 770E0000 size: 551936 crc: 3776E8B0 date: 2008-04-14 02:33:38
C:\WINDOWS\system32\VERSION.dll handle: 77BD0000 size: 18944 crc: 31D02D04 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\dmime.dll handle: 5C8A0000 size: 181248 crc: 6ECBB9D7 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\DSOUND.dll handle: 73E60000 size: 367616 crc: B245D2ED date: 2008-04-14 02:33:23
C:\WINDOWS\system32\dmusic.dll handle: 6CE40000 size: 104448 crc: 2CF734A4 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\KsUser.dll handle: 73E30000 size: 4096 crc: 7CF5A2DD date: 2008-04-14 02:33:28
C:\WINDOWS\system32\dmsynth.dll handle: 6CE60000 size: 103424 crc: 9C6A49C2 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\dmloader.dll handle: 6CED0000 size: 35840 crc: 083C1655 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\msctfime.ime handle: 75140000 size: 177152 crc: 69E19576 date: 2009-02-27 04:57:11
C:\WINDOWS\system32\mswsock.dll handle: 71990000 size: 247808 crc: D077BDB1 date: 2008-06-20 17:47:22
C:\WINDOWS\system32\hnetcfg.dll handle: 62E40000 size: 347136 crc: 1E38DDE0 date: 2008-04-14 02:33:26
C:\WINDOWS\System32\wshtcpip.dll handle: 719D0000 size: 19456 crc: F12C4BEC date: 2008-04-14 02:33:50
C:\WINDOWS\system32\SETUPAPI.dll handle: 778E0000 size: 1005056 crc: B175FBB6 date: 2008-04-13 18:33:42
C:\WINDOWS\system32\psapi.dll handle: 76BA0000 size: 23040 crc: 881F2E30 date: 2008-04-14 02:33:38

System information:
Windows version 5.1 2600 Service Pack 3

Attached is the last autosave from before the crash (which was the 20th may 1975).
Several grfs are needed (see attached png file)

Attachments

Reported version: trunk
Operating system: All


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

cmoiromain wrote:

oh, something else, when loading the autosave, I can continue playing without a crash as if nothing had happened, the crash does not occur anymore.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6367

@DorpsGek
Copy link
Member Author

cmoiromain wrote:

Some more:

on the same game, exactly same place as the previous crash (Linborough Bois station), clicking on the "build station" button (so the same as before), but this time the error message is different: "NOT_REACHED triggered at line 141 of ..\src\strings.cpp".

the crash report that goes with it:

*** OpenTTD Crash Report ***
Date: 2009-07-23 23:34:24
Build: r16928 (0) built on Jul 23 2009 18:24:53
Reason: NOT_REACHED triggered at line 141 of ..\src\strings.cpp
Language: french.lng
Exception C0000005 at 0044B464
Registers:
EAX: 00000001 EBX: 0012F101 ECX: 00008C0D EDX: 00120000
ESI: 0012EDC0 EDI: 000003A2 EBP: 0012EFC4 ESP: 0012EDAC
EIP: 0044B464 EFLAGS: 00210202

Bytes at CS:EIP:
C6 05 00 00 00 00 00 5B C2 04 00 55 8B EC 81 EC 14 04 00 00 56 57 8B 7D

Stack trace:
0012F11B 0042CD48 00000001 0012F0E4 0012F047 5F544F4E 43414552 20444548
67697274 65726567 74612064 6E696C20 34312065 666F2031 5C2E2E20 5C637273
69727473 2E73676E 00707063 006A2D80 00CC2D90 00CC1E90 00000001 0012F078
00000000 00000000 00000000 00662EEE 00000000 00000000 00000000 005B4066
00000001 0012F0EC 00000001 0012F047 FFFFFFFF 0012EED0 00000040 00000007
0003A38C 0001FFFF 00000000 006A2D80 00CC2D90 00CC1E90 0012EE01 0012F0D8
00000000 00000000 00000000 00662EEE 00000000 00000000 00000000 000000FF
0012EEBC 005B2424 0000000B 0012EEBC 005B25FE 00000000 0012F1E0 0012EEF0
005B260B 005B355A 0012F13F FFFFFFFF 0012F14C 005B4066 00000000 0012F38F
0012F38F 005B40F2 00000000 00000000 00000000 00000007 0012EF20 004B357E
00000000 006A2D80 00CC2D90 00CC1E90 00000001 0012F170 00000000 00000000
00000000 00662EEE 00000000 00000000 00000000 0012FB60 00000001 0012F1E4
00000001 0012F13F FFFFFFFF 00000003 00000040 0297A900 7E04C4FA 00000000
000C92EE 006CF4CC 00000000 00000010 00000008 00000010 00000010 00000010
00000010 00000010 00000010 00000002 00000010 00000010 00000010 00000010
00000030 00000010 00000010 00000010 00000008 00000010 00000010 00000008
00000010 00000010 00000008 00000010 00000002 00000010 0012EFE8 00439568
00662584 0000008D 006741EC 00000000 0012F0E4 00000000 0012F11B 0012F0DC
0043A417 006BB0A8 0012F917 0000026F 01EE5990 0012F118 0012F11B 00DDF7AE
00000000 00439398 006BB0A0 01EE59E8 00000000 0012F10C 0043AFFF 00000000
01EE59E8 0012F148 0012F15B 00DE76A3 00000000 00662EEC 006BB0A0 0012F0C8
0012F372 87E14E90 0012F098 005AD019 0012F078 00662EEC 00000000 0012F0E8
0012F38F 000007F1 0012FB7F 0012F390 000007EF 0012F38F 00000042 00662EEC
00000000 0012F0C8 0012F0F8 0012F0B4 005AD059 0012F38F 000007F1 00662EEC

Module information:
C:\Program Files\OpenTTD\openttd.exe handle: 00400000 size: 2879488 crc: 025EED08 date: 2009-07-23 16:29:06
C:\WINDOWS\system32\ntdll.dll handle: 7C910000 size: 739840 crc: C0C23ACC date: 2009-02-09 10:53:55
C:\WINDOWS\system32\kernel32.dll handle: 7C800000 size: 1054720 crc: 1BDA556E date: 2009-03-21 14:07:58
C:\WINDOWS\system32\WINMM.dll handle: 76AE0000 size: 180736 crc: 3086C5C7 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\ADVAPI32.dll handle: 77DA0000 size: 685568 crc: CC544FBF date: 2009-02-09 10:53:55
C:\WINDOWS\system32\RPCRT4.dll handle: 77E50000 size: 585216 crc: 4B5B0E7C date: 2009-04-15 14:53:29
C:\WINDOWS\system32\Secur32.dll handle: 77FC0000 size: 56832 crc: 15DB9A7E date: 2009-02-03 19:58:06
C:\WINDOWS\system32\GDI32.dll handle: 77EF0000 size: 286720 crc: C8F25A13 date: 2008-10-23 12:36:51
C:\WINDOWS\system32\USER32.dll handle: 7E390000 size: 579584 crc: 6877A193 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\WS2_32.dll handle: 719F0000 size: 82432 crc: 05371B19 date: 2008-04-14 02:33:49
C:\WINDOWS\system32\msvcrt.dll handle: 77BE0000 size: 343040 crc: 2C173E38 date: 2008-04-14 02:33:33
C:\WINDOWS\system32\WS2HELP.dll handle: 719E0000 size: 19968 crc: 913FE327 date: 2008-04-14 02:33:49
C:\WINDOWS\system32\SHELL32.dll handle: 7C9D0000 size: 8517632 crc: 8F311D6A date: 2008-06-17 19:02:15
C:\WINDOWS\system32\SHLWAPI.dll handle: 77F40000 size: 474624 crc: C3E6539D date: 2008-04-14 02:33:41
C:\WINDOWS\system32\IMM32.DLL handle: 76320000 size: 110080 crc: ADE108FB date: 2008-04-14 02:33:26
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll handle: 77390000 size: 1054208 crc: B69132A6 date: 2008-04-14 02:30:54
C:\WINDOWS\system32\comctl32.dll handle: 58B50000 size: 617472 crc: E3E4D549 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\SHFolder.dll handle: 76720000 size: 25088 crc: E3F69657 date: 2008-04-14 02:33:41
C:\WINDOWS\system32\WINTRUST.dll handle: 76BE0000 size: 176640 crc: D3A1D304 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\CRYPT32.dll handle: 779E0000 size: 606208 crc: 5358E850 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\MSASN1.dll handle: 77A80000 size: 57344 crc: 08CF5CC7 date: 2008-04-14 02:33:30
C:\WINDOWS\system32\IMAGEHLP.dll handle: 76C40000 size: 144384 crc: B79C410C date: 2008-04-14 02:33:26
C:\WINDOWS\system32\wdmaud.drv handle: 72C70000 size: 23552 crc: 37C3D64B date: 2008-04-14 02:34:34
C:\WINDOWS\system32\msacm32.drv handle: 72C60000 size: 20992 crc: 34944160 date: 2006-11-03 14:15:21
C:\WINDOWS\system32\MSACM32.dll handle: 77BB0000 size: 72192 crc: C2923BE1 date: 2008-04-14 02:33:30
C:\WINDOWS\system32\midimap.dll handle: 77BA0000 size: 18944 crc: 0395B0D6 date: 2008-04-14 02:33:29
C:\WINDOWS\system32\ole32.dll handle: 774A0000 size: 1287168 crc: D69678E8 date: 2008-04-14 02:33:38
C:\WINDOWS\system32\uxtheme.dll handle: 5B090000 size: 219648 crc: 5135A37E date: 2008-04-14 02:33:48
C:\WINDOWS\system32\MSCTF.dll handle: 74690000 size: 297984 crc: 0E37D08F date: 2008-04-14 02:33:30
C:\WINDOWS\system32\CLBCATQ.DLL handle: 76F80000 size: 498688 crc: F623E1C4 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\COMRes.dll handle: 77000000 size: 851968 crc: 49A7A790 date: 2008-04-14 02:33:21
C:\WINDOWS\system32\OLEAUT32.dll handle: 770E0000 size: 551936 crc: 3776E8B0 date: 2008-04-14 02:33:38
C:\WINDOWS\system32\VERSION.dll handle: 77BD0000 size: 18944 crc: 31D02D04 date: 2008-04-14 02:33:48
C:\WINDOWS\system32\dmime.dll handle: 5C8A0000 size: 181248 crc: 6ECBB9D7 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\DSOUND.dll handle: 73E60000 size: 367616 crc: B245D2ED date: 2008-04-14 02:33:23
C:\WINDOWS\system32\dmusic.dll handle: 6CE40000 size: 104448 crc: 2CF734A4 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\KsUser.dll handle: 73E30000 size: 4096 crc: 7CF5A2DD date: 2008-04-14 02:33:28
C:\WINDOWS\system32\dmsynth.dll handle: 6CE60000 size: 103424 crc: 9C6A49C2 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\dmloader.dll handle: 6CED0000 size: 35840 crc: 083C1655 date: 2008-04-14 02:33:22
C:\WINDOWS\system32\msctfime.ime handle: 75140000 size: 177152 crc: 69E19576 date: 2009-02-27 04:57:11
C:\WINDOWS\system32\mswsock.dll handle: 71990000 size: 247808 crc: D077BDB1 date: 2008-06-20 17:47:22
C:\WINDOWS\system32\hnetcfg.dll handle: 62E40000 size: 347136 crc: 1E38DDE0 date: 2008-04-14 02:33:26
C:\WINDOWS\System32\wshtcpip.dll handle: 719D0000 size: 19456 crc: F12C4BEC date: 2008-04-14 02:33:50
C:\WINDOWS\system32\psapi.dll handle: 76BA0000 size: 23040 crc: 881F2E30 date: 2008-04-14 02:33:38

System information:
Windows version 5.1 2600 Service Pack 3

and the more recent save is attached.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6368

@DorpsGek
Copy link
Member Author

cmoiromain wrote:

oops, wrong button. Sorry!

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6369

@DorpsGek
Copy link
Member Author

glx wrote:

Attach crash.dmp and crash.log


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6371

@DorpsGek
Copy link
Member Author

cmoiromain wrote:

Here you go.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6373

@DorpsGek
Copy link
Member Author

erikjanp wrote:

The crash is caused by the dropdown list for the newstations list in the station build window.

The station build window was recently modified (r16898) to use nested widgets. In the new code, it uses a SetDParam to set the name of the selected newgrf (line 1053 in rail_gui.cpp in current trunk).
But this SetDParam is done in OnPaint. But long before OnPaint is called, the window gets initialized and the sizes of the widgets are calculated. In the calculation of the size of the dropdown list, the size of the string is taken into account. But at that initilizing stage, the DParam isn't set yet.

There are (at least) two possible solutions:
1- in rail_gui.cpp, add a line
SetDParam(0, NULL);
just before the call to InitNested in BuildRailStationWindow.
This solves the problem where it was caused: rail_gui uses DParams and shouldn't call anything that uses DParams with DParams uninitialized.

2- in widget.cpp, in NWidgetLeaf::SetupSmallestSize, add a line
if (init_array) SetDParam(0, NULL);
just before call to GetStringBoundingBox in the WWT_DROPDOWN case around line 2010.
This solves the problem by making it possible to call SetupSmallestSize without having to think about unitialized DParams. But I don't know if that is a good idea, with maybe future windows using dropdown lists and DParams in more exotic ways.


This comment was imported from FlySpray: https://bugs.openttd.org/task/3053#comment6375

@DorpsGek
Copy link
Member Author

Alberth closed the ticket.

Reason for closing: Fixed

in r16936


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

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 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