The International Simutrans Forum

 

Author Topic: Simutrans freezes when server list is not reachabe via IPv6  (Read 741 times)

0 Members and 1 Guest are viewing this topic.

Offline ceeac

  • *
  • Posts: 48
If the listing server is not available via IPv6 (like currently), Simutrans freezes when trying to open the server list.
However, when compiling with USE_IP4_ONLY, the freeze does not occur.
As far as I can tell, the server list is retrieved via a call to network_http_get, which in my case does a synchronous request via IPv6.
If the listing server is not reachable, the call will block until reaching the timeout, and only then will do a request via IPv4.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #1 on: July 07, 2019, 02:28:48 AM »
If the listing server is not reachable, the call will block until reaching the timeout, and only then will do a request via IPv4.
So is the bug that the IPv6 request never times out? As otherwise it would seem that it is working as intended.

And yes we know that either separate threads or asynchronous network calls should be used to prevent this kind of temporary freeze. Just implementing this behaviour is not trivial, especially when multi threading is entirely optional.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #2 on: July 07, 2019, 08:20:04 AM »
Even if this didn't block up Simutrans while it waits, what is the player supposed to do with Simutrans in the meantime? I can't see much else to do but click a cancel button, but that will take you nowhere. Trying both IPv6 and IPv4 in parallell just means it will be random which one it picks if both work. (And one needs to deal with the slowest one and shut it down gracefully somehow.)

If the time it takes to connect is so long that the user notices it, the lag is probably too high for playing a game anyway. The timeout must be too high, if indeed there is any at all. Another possibility is to let the user force IPv4 only at runtime.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #3 on: July 07, 2019, 10:48:11 AM »
Even if this didn't block up Simutrans while it waits, what is the player supposed to do with Simutrans in the meantime?
Stare at the lovely fully and smoothly animated background. Instead of what happens currently where if they press too much Microsoft Windows reports the application as not responding and so suggests it be closed.

Offline Flemmbrav

  • *
  • Posts: 124
  • Languages: DE, EN
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #4 on: July 07, 2019, 02:17:41 PM »
Please give us the window to just fill in an IP adress, so i won#t have to wait for the server to reply if i don't want to use it anyways.
Would also be nice if i wouldn't have to refresh the list with every box i check

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5543
  • Languages: EN, NO
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #5 on: July 07, 2019, 06:37:04 PM »
I missed the fact that this was about the listing server, not the game server.

Please give us the window to just fill in an IP adress, so i won#t have to wait for the server to reply if i don't want to use it anyways.
Would also be nice if i wouldn't have to refresh the list with every box i check
I think it would be best to have a button to manually fetch the list.

Offline DrSuperGood

  • Dev Team
  • Devotee
  • *
  • Posts: 2727
  • Languages: EN
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #6 on: July 08, 2019, 02:01:50 AM »
Please give us the window to just fill in an IP adress, so i won#t have to wait for the server to reply if i don't want to use it anyways.
As unintuitive as it is, one can use the Load Game window to connect directly with a server by inputting the domain or IP (and port) in the file name field. Why this functionality is located there or why it is hidden in plain sight I do not know...

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2715
    • My addons, mostly roadsigns
  • Languages: EN, CS
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #7 on: July 08, 2019, 06:35:37 AM »
Iirc you have to type net:ipadress:port

Online prissi

  • Developer
  • Administrator
  • *
  • Posts: 9568
  • Languages: De,EN,JP
Re: Simutrans freezes when server list is not reachabe via IPv6
« Reply #8 on: July 15, 2019, 02:28:15 PM »
Why it is hidden: You can connect regardsless if the pakset matches, or you are even using the same pakset. You can easily dno by asking per commandline several times the same server game.

So it is for power users testing stuff.

Syntax

Code: [Select]
net:192.180.1.1:13353 (One can leave :13353 out, since it is the default port. All other ports need to be specified here.)
net:[ff80::1]:13353 (For IPv6, you need the brackets!)