News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Simutrans freezes when server list is not reachabe via IPv6

Started by ceeac, July 06, 2019, 09:28:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

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.

DrSuperGood

Quote from: ceeac on July 06, 2019, 09:28:32 PMIf 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.

Ters

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.

DrSuperGood

Quote from: Ters on July 07, 2019, 08:20:04 AMEven 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.

Flemmbrav

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

Ters

I missed the fact that this was about the listing server, not the game server.

Quote from: Flemmbrav 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
I think it would be best to have a button to manually fetch the list.

DrSuperGood

Quote from: Flemmbrav on July 07, 2019, 02:17:41 PMPlease 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...

Vladki


prissi

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

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!)