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

Crash in VehicleGroupWindow::GroupNameSorter #7838

Open
timmeh87 opened this issue Nov 18, 2019 · 15 comments
Open

Crash in VehicleGroupWindow::GroupNameSorter #7838

timmeh87 opened this issue Nov 18, 2019 · 15 comments

Comments

@timmeh87
Copy link

@timmeh87 timmeh87 commented Nov 18, 2019

I got a random crash and it took me here

Expected result

game plays normally

Actual result

*** OpenTTD Crash Report ***

Crash at: Mon Nov 18 07:33:28 2019
In game date: 1952-08-27 (10)

Crash reason:
 Exception: C0000005
 Location:  00007FF7230C2594
 Message:   <none>

OpenTTD version:
 Version:    1.10.0-beta1 (0)
 NewGRF ver: 1a006d64
 Bits:       64
 Endian:     little
 Dedicated:  no
 Build date: Oct 30 2019 17:50:49

Registers:
 RAX: 88002900F1AE0BED RBX: 00000191E8A5A5C8 RCX: 0000004F1E7FEAD0 RDX: 00000191E8A5A5C8
 RSI: 00000191E8A5A5D0 RDI: 0000004F1E7FEAD0 RBP: 00000191E8A5A5E8 RSP: 0000004F1E7FEA50
 R8:  00007FF7230C252C R9:  0000000000001202 R10: 0000000000000001 R11: 0000000000000000
 R12: 00000191E8A5A5D8 R13: 00000191E8A5A5D0 R14: 00000191E8A5A5C8 R15: 0000000000000010
 RIP: 00007FF7230C2594 EFLAGS: 00010206

 Bytes at instruction pointer:
 0F B7 08 48 89 05 DA FC 52 01 76 74 48 8B 05 81 FC 38 00 4C 8D 05 C1 FC

Stack trace:
 E8A5A5D0 00000191 E8A5A5D0 00000191 1E7FEAD0 0000004F E8A5A5D8 00000191
 E8A5A5E0 00000191 230B00F2 00007FF7 1E7FEB50 0000004F E8A5A820 00000191
 000000E1 00000000 1E7FEC00 0000004F E5ACF9A0 00000191 E8A5A5E8 00000191
 000000E1 00000000 00000001 00000000 E8A5A5D0 00000191 230AFD21 00007FF7
 E8E7E700 00000191 1E7FEB50 0000004F 1E7FEB60 0000004F 00000003 00000000
 E8A5A5D0 00000191 00000000 00007FF7 FFFFFFFE FFFFFFFF 00000009 00000000
 E5ACF9A0 00000191 E5ACF800 00000191 00000007 00000000 230AF9FE 00007FF7
 E65BFC60 00000191 E8A5A5D0 00000191 1E7FEB60 0000004F 0000000A 00000000
 1E7FEB70 0000004F 1E7FEB78 0000004F 1E7FEBD0 0000004F 230C2743 00007FF7
 E5ACF900 00000191 230C252C 00007FF7 1E7FEB50 0000004F E5ACF870 00000191
 FFFFFFFE FFFFFFFF E8A5A5D0 00000191 E8A5A5E8 00000191 E8A5A5E8 00000191
 00000000 00000000 00000000 00000000 00000000 02E40000 1E7FEC08 0000004F
 000004D5 00000000 E5ACF870 00000191 00000017 00000000 00000017 00000000
 00000415 00000000 230C3AD1 00007FF7 E8E7E700 00000191 E5ACF870 00000191
 00000000 00000000 00000001 00000000 00000258 00000000 C172F1F0 00000191
 000004D5 00000000 C172F1F0 00000191 00000017 00000000 230983B8 00007FF7
 1E7FECE0 0000004F 00000017 00000000 00000415 00000000 00000258 00000000
 000000F8 00000191 00000001 00000000 234A0B80 00007FF7 00000017 00000000
 000004D5 00000000 00000421 00000000 00000280 00000000 23098482 00007FF7
 E5ACF870 00000191 00000000 00000000 000000F8 00000000 00000258 00000100
 000000F8 00000000 23027BE1 00007FF7 C32F78DC 00000191 00000000 00000000
 00000258 000000E1 000006E1 00007F00 0000001C 00000000 00000000 00000000
 00000280 00000000 23027EC7 00007FF7 000000F8 00000000 00000000 00000000
 00000017 00000000 00000280 00000000 E5A004B0 00000191 230D2B10 00007FF7

Operating system:
 Name:     Windows
 Release:  10.0.17763 ()
 Compiler: MSVC 1916

Configuration:
 Blitter:      32bpp-optimized
 Graphics set: OpenGFX (7019)
 Language:     C:\Program Files\OpenTTD\lang\english_US.lng
 Music driver: dmusic
 Music set:    OpenMSX (96)
 Network:      no
 Sound driver: xaudio2
 Sound set:    OpenSFX (87)
 Video driver: win32

Fonts:
 Small:  sprite
 Medium: sprite
 Large:  sprite
 Mono:   sprite

AI Configuration (local: 0) (current: 0):
  0: Human
  1: CivilAI (v19)

Libraries:
 LZMA:       5.2.4
 LZO:        2.10
 PNG:        1.6.37
 Zlib:       1.2.11

Module information:
 C:\Program Files\OpenTTD\openttd.exe handle: 00007FF722F70000 size: 5650944 crc: BABD580D date: 2019-10-30 17:57:10
 C:\WINDOWS\SYSTEM32\ntdll.dll handle: 00007FFBBC280000 size: 1994768 crc: 08EE02F6 date: 2019-10-11 01:36:55
 C:\WINDOWS\System32\KERNEL32.DLL handle: 00007FFBBC090000 size: 725696 crc: 0DA323EF date: 2019-07-16 00:53:32
 C:\WINDOWS\System32\KERNELBASE.dll handle: 00007FFBB8BE0000 size: 2700784 crc: 7E158668 date: 2019-10-11 01:36:55
 C:\WINDOWS\System32\WS2_32.dll handle: 00007FFBBBB60000 size: 434952 crc: 4E8BE6D1 date: 2018-09-15 07:28:45
 C:\WINDOWS\System32\RPCRT4.dll handle: 00007FFBBBBD0000 size: 1180248 crc: 393021C8 date: 2019-10-11 01:36:55
 C:\WINDOWS\SYSTEM32\WINMM.dll handle: 00007FFBB3960000 size: 129160 crc: 4526F9B0 date: 2018-09-15 07:28:22
 C:\WINDOWS\System32\msvcrt.dll handle: 00007FFBBC1B0000 size: 638376 crc: EBE43E7F date: 2019-07-16 00:53:33
 C:\WINDOWS\System32\IMM32.dll handle: 00007FFBBB530000 size: 177176 crc: F8F327BF date: 2019-10-11 01:36:55
 C:\WINDOWS\System32\USER32.dll handle: 00007FFBB9A60000 size: 1664904 crc: D11E9020 date: 2019-01-12 12:08:06
 C:\WINDOWS\System32\win32u.dll handle: 00007FFBB8BC0000 size: 125704 crc: 31F6ED6A date: 2018-09-15 07:28:38
 C:\WINDOWS\System32\GDI32.dll handle: 00007FFBBB500000 size: 157024 crc: 79C12AE2 date: 2019-08-08 22:15:26
 C:\WINDOWS\SYSTEM32\winmmbase.dll handle: 00007FFBB3930000 size: 170960 crc: 5129F96A date: 2018-09-15 07:28:22
 C:\WINDOWS\System32\gdi32full.dll handle: 00007FFBB9300000 size: 1668752 crc: 02FCF797 date: 2019-10-11 01:36:57
 C:\WINDOWS\System32\msvcp_win.dll handle: 00007FFBB90B0000 size: 646632 crc: 43B54E95 date: 2019-04-11 17:54:02
 C:\WINDOWS\System32\cfgmgr32.dll handle: 00007FFBB8AF0000 size: 293344 crc: B8CFBC8B date: 2018-09-15 07:28:46
 C:\WINDOWS\System32\ucrtbase.dll handle: 00007FFBB9150000 size: 1022824 crc: 8323E864 date: 2019-10-11 01:36:40
 C:\WINDOWS\System32\ADVAPI32.dll handle: 00007FFBB9860000 size: 659720 crc: DC66B12C date: 2018-09-15 07:28:26
 C:\WINDOWS\System32\sechost.dll handle: 00007FFBBBD00000 size: 641480 crc: 4FDB238B date: 2018-09-15 07:28:45
 C:\WINDOWS\System32\SHELL32.dll handle: 00007FFBB9C00000 size: 22124760 crc: 0F4D1C08 date: 2019-10-11 01:36:51
 C:\WINDOWS\System32\shcore.dll handle: 00007FFBB9910000 size: 680728 crc: 2B0BFC53 date: 2018-09-15 07:28:38
 C:\WINDOWS\System32\combase.dll handle: 00007FFBBB100000 size: 3333984 crc: 9EACFBA4 date: 2019-10-11 01:36:41
 C:\WINDOWS\System32\bcryptPrimitives.dll handle: 00007FFBB8B40000 size: 515440 crc: 945D5B93 date: 2019-09-13 01:35:33
 C:\WINDOWS\System32\windows.storage.dll handle: 00007FFBB8340000 size: 7690648 crc: 4A9E71C0 date: 2019-10-11 01:36:40
 C:\WINDOWS\System32\profapi.dll handle: 00007FFBB8290000 size: 132464 crc: 039158DD date: 2018-09-15 07:28:46
 C:\WINDOWS\System32\powrprof.dll handle: 00007FFBB82C0000 size: 369808 crc: 207CF850 date: 2018-09-15 07:28:45
 C:\WINDOWS\System32\shlwapi.dll handle: 00007FFBBBED0000 size: 329512 crc: AFA611E8 date: 2018-09-15 07:28:59
 C:\WINDOWS\System32\kernel.appcore.dll handle: 00007FFBB8270000 size: 58880 crc: AF6F50AA date: 2018-09-15 07:28:34
 C:\WINDOWS\System32\cryptsp.dll handle: 00007FFBB8E80000 size: 80112 crc: 1AB1461D date: 2018-09-15 07:28:46
 C:\WINDOWS\System32\ole32.dll handle: 00007FFBBBF30000 size: 1395264 crc: 6366EE65 date: 2019-07-16 00:53:31
 C:\WINDOWS\SYSTEM32\USP10.dll handle: 00007FFBAEE40000 size: 79360 crc: F61DBE29 date: 2018-09-15 07:28:46
 C:\WINDOWS\system32\uxtheme.dll handle: 00007FFBB63F0000 size: 613376 crc: D7A94054 date: 2018-09-15 07:28:44
 C:\WINDOWS\System32\MSCTF.dll handle: 00007FFBBB9F0000 size: 1484592 crc: B33275DA date: 2019-10-11 01:36:54
 C:\WINDOWS\System32\OLEAUT32.dll handle: 00007FFBBB430000 size: 793824 crc: 1D794172 date: 2019-10-11 01:36:40
 C:\WINDOWS\system32\dwmapi.dll handle: 00007FFBB64E0000 size: 168248 crc: 0BB1EB9C date: 2019-10-11 01:36:54
 C:\WINDOWS\System32\CRYPT32.dll handle: 00007FFBB8EA0000 size: 1933200 crc: D30FE47C date: 2018-09-15 07:28:45
 C:\WINDOWS\System32\MSASN1.dll handle: 00007FFBB8320000 size: 63552 crc: 4B8328E4 date: 2018-09-15 07:28:46
 C:\WINDOWS\SYSTEM32\TextInputFramework.dll handle: 00007FFB85610000 size: 603992 crc: 4876E1E9 date: 2018-09-15 07:28:32
 C:\WINDOWS\SYSTEM32\CoreUIComponents.dll handle: 00007FFBB2080000 size: 3292352 crc: DB3B23AA date: 2018-09-15 07:28:32
 C:\WINDOWS\SYSTEM32\CoreMessaging.dll handle: 00007FFBB5B80000 size: 918304 crc: D3437FC3 date: 2019-01-12 12:07:58
 C:\WINDOWS\SYSTEM32\ntmarta.dll handle: 00007FFBB72A0000 size: 185440 crc: F65EB8CD date: 2018-09-15 07:28:46
 C:\WINDOWS\SYSTEM32\wintypes.dll handle: 00007FFBB3F90000 size: 1387512 crc: 797174E4 date: 2019-10-11 01:36:40
 C:\WINDOWS\system32\mswsock.dll handle: 00007FFBB7A90000 size: 408800 crc: EB1734A7 date: 2019-03-14 22:43:20
 C:\WINDOWS\SYSTEM32\xaudio2_8.dll handle: 00000191C15A0000 size: 3584 crc: F46DA0FB date: 2018-09-15 07:28:22
 C:\WINDOWS\SYSTEM32\xaudio2_9.DLL handle: 00007FFB903F0000 size: 589312 crc: 2A0856D2 date: 2018-09-15 07:28:22
 C:\WINDOWS\SYSTEM32\MMDevAPI.DLL handle: 00007FFBB1C30000 size: 443352 crc: F1D46F13 date: 2018-09-15 07:28:20
 C:\WINDOWS\SYSTEM32\AVRT.dll handle: 00007FFBB2680000 size: 30664 crc: 6016FB30 date: 2018-09-15 07:28:20
 C:\WINDOWS\SYSTEM32\DEVOBJ.dll handle: 00007FFBB8080000 size: 156000 crc: EB1D6C5E date: 2018-09-15 07:28:46
 C:\WINDOWS\SYSTEM32\PROPSYS.dll handle: 00007FFBB6CA0000 size: 1743168 crc: 354B011A date: 2019-10-11 01:36:40
 C:\WINDOWS\System32\clbcatq.dll handle: 00007FFBB97B0000 size: 644568 crc: 2FA3FC29 date: 2018-09-15 07:28:43
 C:\WINDOWS\SYSTEM32\AUDIOSES.DLL handle: 00007FFBB1D50000 size: 1331536 crc: 042034B2 date: 2019-10-11 01:36:44
 C:\WINDOWS\SYSTEM32\resourcepolicyclient.dll handle: 00007FFBB6780000 size: 71280 crc: 55A0C43D date: 2018-09-15 07:28:30
 C:\WINDOWS\System32\dmusic.dll handle: 00007FFBAED20000 size: 133120 crc: 84A62FB4 date: 2018-09-15 07:29:16
 C:\WINDOWS\System32\DSOUND.dll handle: 00007FFBADDE0000 size: 593920 crc: 0281E80E date: 2019-04-11 17:54:06
 C:\WINDOWS\System32\MSACM32.dll handle: 00007FFBA8510000 size: 107408 crc: 7FC74D75 date: 2018-09-15 07:28:20
 C:\WINDOWS\System32\ksuser.dll handle: 00007FFBAE130000 size: 23264 crc: 2170E905 date: 2018-09-15 07:28:22
 C:\WINDOWS\System32\bcrypt.dll handle: 00007FFBB9080000 size: 143632 crc: D0C21563 date: 2018-09-15 07:28:45
 C:\WINDOWS\SYSTEM32\wdmaud.drv handle: 00007FFB8EE70000 size: 254976 crc: EE14B1C7 date: 2018-09-15 07:28:20
 C:\WINDOWS\SYSTEM32\msacm32.drv handle: 00007FFBA8530000 size: 29184 crc: 73ADC987 date: 2018-09-15 07:28:22
 C:\WINDOWS\SYSTEM32\midimap.dll handle: 00007FFBA8500000 size: 25600 crc: 818DB366 date: 2018-09-15 07:28:22
 C:\WINDOWS\System32\dmsynth.dll handle: 00007FFBA89C0000 size: 123392 crc: ED06CAB9 date: 2018-09-15 07:29:16
 C:\Windows\System32\Windows.UI.dll handle: 00007FFB82D20000 size: 1287776 crc: 7BAE162D date: 2019-01-12 12:08:04
 C:\Windows\System32\InputHost.dll handle: 00007FFB84D00000 size: 833064 crc: ECCA9BD5 date: 2019-04-11 17:54:11
 C:\Windows\System32\twinapi.appcore.dll handle: 00007FFBB6510000 size: 2149368 crc: 0E13DAA1 date: 2019-03-14 22:43:20
 C:\Windows\System32\d2d1.dll handle: 00007FFBB5090000 size: 6058232 crc: 880010A4 date: 2018-09-15 07:28:34
 C:\Windows\System32\d3d11.dll handle: 00007FFBB4E10000 size: 2611944 crc: 539E0231 date: 2018-09-15 07:28:32
 C:\Windows\System32\dxgi.dll handle: 00007FFBB6F60000 size: 780608 crc: F33B581B date: 2018-09-15 07:28:32
 C:\Windows\System32\RMCLIENT.dll handle: 00007FFBB6720000 size: 152080 crc: BC3F9F5B date: 2019-09-13 01:35:27
 C:\WINDOWS\SYSTEM32\DNSAPI.dll handle: 00007FFBB7800000 size: 799784 crc: 7C7FE832 date: 2019-09-13 01:35:20
 C:\WINDOWS\System32\NSI.dll handle: 00007FFBB95F0000 size: 24792 crc: 34E33EDE date: 2018-09-15 07:28:45
 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL handle: 00007FFBB77C0000 size: 241944 crc: F4D04330 date: 2019-08-08 22:15:15
 C:\Windows\System32\rasadhlp.dll handle: 00007FFBA7AD0000 size: 16896 crc: EE315E02 date: 2018-09-15 07:28:57
 C:\WINDOWS\System32\fwpuclnt.dll handle: 00007FFBA8480000 size: 469504 crc: 5572A1E2 date: 2018-09-15 07:28:36
 C:\WINDOWS\System32\psapi.dll handle: 00007FFBB94A0000 size: 18816 crc: 26FAD1C6 date: 2018-09-15 07:28:42

---- gamelog start ----
Tick 0: new game started
Revision text changed to g9f50c754ffee5, savegame version 217, not modified, _openttd_newgrf_version = 0x1a006d64
New game mode: 1 landscape: 0
---- gamelog end ----

Recent news messages:
(1952-08-21) StringID: 639, Type: 1, Ref1: 2, 257, Ref2: 3, 8
(1952-08-09) StringID: 639, Type: 0, Ref1: 2, 250, Ref2: 3, 5
(1952-08-01) StringID: 709, Type: 13, Ref1: 5, 397, Ref2: 5, 396
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 1204, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 1147, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 1146, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 1047, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 1019, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 963, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 954, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 916, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 874, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 856, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 852, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 773, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 754, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 741, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 720, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 706, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 705, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 577, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 534, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 510, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 440, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 439, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 398, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 396, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 359, Ref2: 0, 4294967295
(1952-08-01) StringID: 680, Type: 9, Ref1: 4, 354, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 327, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 322, Ref2: 0, 4294967295
(1952-08-01) StringID: 683, Type: 9, Ref1: 4, 274, Ref2: 0, 4294967295

*** End of OpenTTD Crash Report ***

Decoded stack trace:
[00] openttd              0x00007FF7230C2594
[01] openttd              0x00007FF7230B00F2
[02] openttd              0x00007FF7230AFD21
[03] openttd              0x00007FF7230AF9FE
[04] openttd              0x00007FF7230C2743
[05] openttd              0x00007FF7230C3AD1
[06] openttd              0x00007FF7230983B8
[07] openttd              0x00007FF723098482
[08] openttd              0x00007FF723027EC7
[09] openttd              0x00007FF7230280DB
[10] openttd              0x00007FF72309C00A
[11] openttd              0x00007FF723299F5B
[12] openttd              0x00007FF723056E6A
[13] openttd              0x00007FF7232A86B6
[14] openttd              0x00007FF7232DE0A2
[15] KERNEL32             0x00007FFBBC0A7974 BaseThreadInitThunk + 20
[16] ntdll                0x00007FFBBC2EA271 RtlUserThreadStart + 33

*** End of additional info ***

Steps to reproduce

was just plaing the game normally

@glx22
Copy link
Contributor

@glx22 glx22 commented Nov 18, 2019

Please attach other crash files, at least crash.dmp.

@timmeh87
Copy link
Author

@timmeh87 timmeh87 commented Nov 18, 2019

sorry I thought the message just asked for the text in the box. I played for a few more hrs but It never crashed again, these are the files that were still sitting there in my user folder. I opened this save file to resume playing, not sure if that affects it.

OpenTTD.zip

@glx22
Copy link
Contributor

@glx22 glx22 commented Nov 18, 2019

>	openttd.exe!VehicleGroupWindow::GroupNameSorter(const Group * const & a, const Group * const & b) Ligne 160	C++
 	[Code externe]	
 	[Cadre en ligne] openttd.exe!std::sort(const std::_Vector_iterator<std::_Vector_val<std::_Simple_types<Group const *>>>) Ligne 4034	C++
 	openttd.exe!GUIList<Group const *,char const *>::Sort(bool(*)(const Group * const &, const Group * const &) compare) Ligne 278	C++
 	openttd.exe!VehicleGroupWindow::BuildGroupList(Owner owner) Ligne 193	C++
 	openttd.exe!VehicleGroupWindow::OnPaint() Ligne 517	C++
 	openttd.exe!DrawOverlappedWindow(Window * w, int left, int top, int right, int bottom) Ligne 933	C++
 	openttd.exe!DrawOverlappedWindowForAll(int left, int top, int right, int bottom) Ligne 951	C++
 	openttd.exe!RedrawScreenRect(int left, int top, int right, int bottom) Ligne 1293	C++
 	openttd.exe!DrawDirtyBlocks() Ligne 1387	C++
 	openttd.exe!UpdateWindows() Ligne 3185	C++
 	openttd.exe!VideoDriver_Win32::MainLoop() Ligne 1284	C++
 	openttd.exe!openttd_main(int argc, char * * argv) Ligne 862	C++
 	openttd.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Ligne 444	C++
 	[Code externe]	
@timmeh87
Copy link
Author

@timmeh87 timmeh87 commented Nov 19, 2019

hm, someone mentioned vehicle grouping in #7831. I did have the vehicle group window open IIRC

@LordAro LordAro changed the title random crash Crash in SelectCompanyLiveryWindow::GroupNameSorter Apr 10, 2020
@LordAro LordAro changed the title Crash in SelectCompanyLiveryWindow::GroupNameSorter Crash in VehicleGroupWindow::GroupNameSorter Apr 10, 2020
@ConnCraft
Copy link

@ConnCraft ConnCraft commented Jun 14, 2020

Game crash while attempting to create a new group. Created plenty of groups and a couple subgroups before with no issues.

crash.log
crash

Github won't let me upload dmp and sav files.

@James103
Copy link
Contributor

@James103 James103 commented Jun 14, 2020

Github won't let me upload dmp and sav files.

You have to zip them first before you upload them.

@ConnCraft
Copy link

@ConnCraft ConnCraft commented Jun 14, 2020

crash.zip
OK thanks

@ConnCraft
Copy link

@ConnCraft ConnCraft commented Jun 14, 2020

After some more testing, it appears to be an issue with creating subgroups.

@LordAro
Copy link
Member

@LordAro LordAro commented Jun 15, 2020

Additional code weirdness - there are 2 GroupNameSorters - company_gui.cpp & group_gui.cpp, which are identical . Not sure why...

@JGRennison
Copy link
Contributor

@JGRennison JGRennison commented Jun 15, 2020

This could be related to this issue: JGRennison/OpenTTD-patches@4338541

The odd resolved string caching mechanism in GroupNameSorter can violate strict weak ordering.

@LordAro
Copy link
Member

@LordAro LordAro commented Jun 15, 2020

Seems plausible? But "Line 160" is this:

SetDParam(0, b->index);

So it must be crashing because b is null - but I can't see how that could be happening - there should be no null elements in that list, and it would've crashed earlier in BuildGroupList if that was the case.

@JGRennison
Copy link
Contributor

@JGRennison JGRennison commented Jun 15, 2020

Seems plausible? But "Line 160" is this:

SetDParam(0, b->index);

So it must be crashing because b is null - but I can't see how that could be happening - there should be no null elements in that list, and it would've crashed earlier in BuildGroupList if that was the case.

If the sort comparator does not meet the sort invariants then the behaviour is undefined, and std::sort implementations are entitled to run over either bound of the input.

e.g. https://stackoverflow.com/questions/18291620/why-will-stdsort-crash-if-the-comparison-function-is-not-as-operator https://stackoverflow.com/questions/24048022/what-causes-stdsort-to-access-address-out-of-range

@LordAro
Copy link
Member

@LordAro LordAro commented Jun 15, 2020

Aha. Yes, that would do it. By all means PR that, though it'd be nice if the global variables could be removed entirely (perhaps with variable capture?)

@JGRennison
Copy link
Contributor

@JGRennison JGRennison commented Jun 15, 2020

Inlining the comparator at the call site would allow the globals to be removed. I'll see what I can do later today.

JGRennison added a commit to JGRennison/Upstream-OpenTTD that referenced this issue Jun 15, 2020
This could be caused by an engine being renamed, and the old
name being cached from a previous sort.

See: OpenTTD#7838
JGRennison added a commit to JGRennison/Upstream-OpenTTD that referenced this issue Jun 15, 2020
This could be caused by a group being renamed, and the old
name being cached from a previous sort.

See: OpenTTD#7838
@ConnCraft
Copy link

@ConnCraft ConnCraft commented Jun 16, 2020

Did it again. This time trying to make a new group while having Ungrouped Trains selected.
crash (2).zip

nielsmh added a commit that referenced this issue Jun 18, 2020
This could be caused by an engine being renamed, and the old
name being cached from a previous sort.

See: #7838
nielsmh added a commit that referenced this issue Jun 18, 2020
This could be caused by a group being renamed, and the old
name being cached from a previous sort.

See: #7838
freprec added a commit to freprec/OpenTTD that referenced this issue Jun 19, 2020
This could be caused by an engine being renamed, and the old
name being cached from a previous sort.

See: OpenTTD#7838
freprec added a commit to freprec/OpenTTD that referenced this issue Jun 19, 2020
This could be caused by a group being renamed, and the old
name being cached from a previous sort.

See: OpenTTD#7838
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.