News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Reproducible crash when a mismatched server is selected

Started by Matthew, December 13, 2020, 08:23:26 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

Steps to reproduce

1. Update Simutrans-Extended using the Nightly Updater (build #9499 from 13 Dec 2020)
(Note the build number: simu.log now seems to be recording Standard revision numbers, not Extended commit numbers EDIT: I will break this into a separate bug report)
2. Run Simutrans-Extended [EDIT: in Windows 10]
3. Click 'Play Online'
4. Tick "Show mismatched servers"
5. Select "Pak192 Extended Testrunde"
6. The client will crash

Expected action: the server will be selected.

Most recent simu.log entries:
Message: server_frame_t::update_serverlist: CSV_t: Pak192 Extended Testrunde,fr09.simutrans.ovh:13353,145734606,Pak192.Comic 2021 [V 0.6 RC 1],1
Bridgewater-Brunel,bridgewater-brunel.me.uk:13353,38041,Pak128.Britain-Ex-0.9.3,1
Stephenson-Siemens,list.extended.simutrans.org:13353,28549892,Pak128.Britain-Ex-0.9.3,0
Server at 240d:1:7900:c00:78ff:379d:37d6:6e58,182.171.96.40:13353,38041,Pak128.Britain-Ex-0.9.3,0

Message: server_frame_t::update_serverlist: servername: Pak192 Extended Testrunde
Message: server_frame_t::update_serverlist: serverdns: fr09.simutrans.ovh:13353
Message: server_frame_t::update_serverlist: stripping default port from entry fr09.simutrans.ovh:13353
Message: server_frame_t::update_serverlist: serverrevision: 145734606
Message: server_frame_t::update_serverlist: serverpakset: Pak192.Comic 2021 [V 0.6 RC 1]
Message: server_frame_t::update_serverlist: serverstatus: 1
Message: server_frame_t::update_serverlist: Appended Pak192 Extended Testrunde (fr09.simutrans.ovh) to list
Message: server_frame_t::update_serverlist: servername: Bridgewater-Brunel
Message: server_frame_t::update_serverlist: serverdns: bridgewater-brunel.me.uk:13353
Message: server_frame_t::update_serverlist: stripping default port from entry bridgewater-brunel.me.uk:13353
Message: server_frame_t::update_serverlist: serverrevision: 38041
Message: server_frame_t::update_serverlist: serverpakset: Pak128.Britain-Ex-0.9.3
Message: server_frame_t::update_serverlist: serverstatus: 1
Message: server_frame_t::update_serverlist: Appended Bridgewater-Brunel (bridgewater-brunel.me.uk) to list
Message: server_frame_t::update_serverlist: servername: Stephenson-Siemens
Message: server_frame_t::update_serverlist: serverdns: list.extended.simutrans.org:13353
Message: server_frame_t::update_serverlist: stripping default port from entry list.extended.simutrans.org:13353
Message: server_frame_t::update_serverlist: serverrevision: 28549892
Message: server_frame_t::update_serverlist: serverpakset: Pak128.Britain-Ex-0.9.3
Message: server_frame_t::update_serverlist: serverstatus: 0
Message: server_frame_t::update_serverlist: servername: Server at 240d:1:7900:c00:78ff:379d:37d6:6e58
Message: server_frame_t::update_serverlist: serverdns: 182.171.96.40:13353
Message: server_frame_t::update_serverlist: stripping default port from entry 182.171.96.40:13353
Message: server_frame_t::update_serverlist: serverrevision: 38041
Message: server_frame_t::update_serverlist: serverpakset: Pak128.Britain-Ex-0.9.3
Message: server_frame_t::update_serverlist: serverstatus: 0
Message: server_frame_t::update_serverlist: servername:
Warning: gui_aligned_container_t::set_size: new size (400,323) smaller than min size (318,334)
Message: socket_list_t::add_client: add client socket[2596] at address 0d
Message: network_command_t::rdwr: write packet_id=1, client_id=2
Message: packet_t::send: sent 14 bytes to socket[2596]; id=1, size=14
Message: network_command_t::rdwr: read packet_id=1, client_id=0
Warning: network_check_activity(): received cmd id=1 nwc_gameinfo_t from socket[2596]
FATAL ERROR: loadsave_t::rdwr_xml_number() - expected "<i16>", got "<i8>>"
Aborting program execution ...

For help with this error or to file a bug report please see the Simutrans forum at
http://forum.simutrans.com


I believe this is the key part of the backtrace:

EXIT_PROCESS PID=2068 TID=7548 dwExitCode=0x3
AddrPC           Params
00007FFC5866C344 0000000000000003 00000000000000E6 0000000000D9ED09  ntdll.dll!NtTerminateProcess
00007FFC58633B68 0000000000000003 00000000000000E6 00000000019CD470  ntdll.dll!RtlExitUserProcess
00007FFC5677E04B 0000000000000000 0000000000000000 FFFFFFFFFFFFFFFE  KERNEL32.DLL!ExitProcessImplementation
00007FFC56D4A155 0000000000000001 00007FFC532F6E8D 0000000000000001  msvcrt.dll!__crtExitProcess
00007FFC56D4A7C5 000001C600000000 00000000000000E6 0000000000000000  msvcrt.dll!doexit
00007FFC56D3F26D 00000000021C8AB0 00007FFC00000000 0000000000000000  msvcrt.dll!abort
00000000007849FA 00000000019CDB60 0000000000000001 00000000019CDB5E  Simutrans-Extended-64.exe!log_t::fatal
0000000000481B9F 0000000000000000 0000000000000070 0000000000000064  Simutrans-Extended-64.exe!loadsave_t::rdwr_xml_number
0000000000482431 0000000000000002 00007FFC585E6E2C 00000000020A0000  Simutrans-Extended-64.exe!loadsave_t::rdwr_short
000000000047F223 0000000000000000 0000000000000118 00000000006140A6  Simutrans-Extended-64.exe!gameinfo_t::rdwr
000000000047F737 000000005C260C20 00000000019CDEA8 0000000000000954  Simutrans-Extended-64.exe!gameinfo_t::gameinfo_t
00000000006144F8 0000000000000000 00000000019CE190 0000000700000006  Simutrans-Extended-64.exe!network_gameinfo
00000000005C6416 00007FFC56FEE040 00007FFC56FEEB96 0000000000000000  Simutrans-Extended-64.exe!server_frame_t::action_triggered
000000000050EDE8 00000000019CE3E8 0000002C00000050 00007FFC563C1064  Simutrans-Extended-64.exe!gui_scrolled_list_t::infowin_event
00000000004FF1EC 0000000000003DFF 0000000000860A10 0000000000050352  Simutrans-Extended-64.exe!gui_container_t::infowin_event
000000000055CE8D 0000000000860A10 00000000019CE550 0000000000295F7D  Simutrans-Extended-64.exe!gui_frame_t::infowin_event
00000000005E3CBA 0000000000D9AA00 0000000000000000 000000007FFFFFFF  Simutrans-Extended-64.exe!check_pos_win
00000000006FA1D7 00000002428949F5 0000000000000001 00000002428949F5  Simutrans-Extended-64.exe!interaction_t::process_event
00000000006FA8AB 0000000100000000 FFFFFFFF00000000 0000000000000000  Simutrans-Extended-64.exe!interaction_t::check_events
000000000077FFC3 0000000000D631A0 0000000000000100 0000000000000100  Simutrans-Extended-64.exe!karte_t::interactive
0000000000706C54 0000000000000008 000000000000001D 0000000000EAC958  Simutrans-Extended-64.exe!simu_main
00000000004013B4 0000000000000000 0000000000000000 0000000000000000  Simutrans-Extended-64.exe!__tmainCRTStartup  [./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crtexe.c @ 339]
00000000004014DB 0000000000000000 0000000000000000 0000000000000000  Simutrans-Extended-64.exe!WinMainCRTStartup  [./build/x86_64-w64-mingw32-x86_64-w64-mingw32-crt/./mingw-w64-crt/crt/crtexe.c @ 195]
00007FFC56776FD4 0000000000000000 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk
00007FFC5861CEC1 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart


However, the backtrace is much longer, possibly because of multithreading(??); the full file is here.
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

jamespetts

I have been able to reproduce this, but I am not familiar enough with the code for fixing this to be straightforward. This seems to have been introduced with the merge - I wonder whether Ranran might know anything about this?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

RESTRICTED ACCOUNT

That pak192.comic server looks like still an old spec.
If you use an older client, it won't crash on checking that pak192.comic server, but it will crash if you check the Bridge water server. In other words, I think that the crash is caused by the fact that the data cannot be read due to the difference in the saved format.
It seems that an error occurs when reading xml, but I am not familiar with the specifications around here.
I suspect that the order or size of the recorded data has changed.

EDIT:
I think there is an error in the if statement that switches the reading process by version. I will investigate it.

EDIT2:
I think that the cause is that the color indicating the pixel of the minimap has been expanded from 8bit to 16bit, and map (MINIMAP_SIZE, MINIMAP_SIZE) is divided into map_idx (MINIMAP_SIZE, MINIMAP_SIZE) and map_rgb (MINIMAP_SIZE, MINIMAP_SIZE).
But it seems that there is no difference in the code between standard and extended in this part. .. .. Does the standard have code to get around this, or am I missing it?
Anyway it currently can't read minimaps across different versions before and after mass merging.

jamespetts

Thank you for investigating this: this is helpful. Can anyone confirm whether this is also an issue in Standard?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

RESTRICTED ACCOUNT

I've added a code that might work around it. I don't think it will affect at least the existing version.

jamespetts

Quote from: Ranran on December 21, 2020, 11:41:07 AM
I've added a code that might work around it. I don't think it will affect at least the existing version.

Thank you - now incorporated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.