Opened 6 years ago

Closed 6 years ago

#5163 closed defect (fixed)

Prevent players from dropping during the loading screen

Reported by: Bill Owned by: elexis
Priority: Release Blocker Milestone: Alpha 23
Component: Network Keywords:
Cc: Patch: Phab:D1513

Description

Attempting to host game for 1-4 other players; As soon as game starts, says other players have left the game, and on their end, says connection to host lost. All players on local lan; worked in 0.0.22

Attachments (9)

interestinglog.html (420 bytes ) - added by Bill 6 years ago.
interestinglog from server
mainlog.html (996.8 KB ) - added by Bill 6 years ago.
mainlog from server
mainlog.2.html (150.7 KB ) - added by Bill 6 years ago.
mainlog from client 1
mainlog.3.html (616.1 KB ) - added by Bill 6 years ago.
mainlog from client 2
mainlog.4.html (250.2 KB ) - added by Bill 6 years ago.
mainlog from client 3
mainlog_server.html (989.5 KB ) - added by Bill 6 years ago.
take 2 - server mainlog
mainlog_1.html (391.8 KB ) - added by Bill 6 years ago.
take 2 - client 1
mainlog_2.html (256.0 KB ) - added by Bill 6 years ago.
take 2 - client 2
mainlog_3.html (536.0 KB ) - added by Bill 6 years ago.
take 2 - client 3

Change History (22)

by Bill, 6 years ago

Attachment: interestinglog.html added

interestinglog from server

comment:1 by Bill, 6 years ago

using deb http://ppa.launchpad.net/wfg/0ad.dev/ubuntu xenial main;

navigo@ezekiel:~$ dpkg -l |grep 0ad

ii  0ad                                             0.0.23~rc3-0ubuntu1~16.04~wfg0                           amd64        Real-time strategy game of ancient warfare

ii  0ad-data                                        0.0.23~rc3-0ubuntu1~16.04~wfg0                           all          Real-time strategy game of ancient warfare (data files)

ii  0ad-data-common                                 0.0.23~rc3-0ubuntu1~16.04~wfg0                           all          Real-time strategy game of ancient warfare (common data files)

comment:2 by Bill, 6 years ago

Server and all clients are linux (ubuntu 16.04)

comment:3 by Imarok, 6 years ago

Could you upload the servers and the clients mainlogs of after it happened? (Be aware, that they are overwritten each time the 0ad application is started)

comment:4 by elexis, 6 years ago

I'll sing the #3700 song.

by Bill, 6 years ago

Attachment: mainlog.html added

mainlog from server

by Bill, 6 years ago

Attachment: mainlog.2.html added

mainlog from client 1

by Bill, 6 years ago

Attachment: mainlog.3.html added

mainlog from client 2

by Bill, 6 years ago

Attachment: mainlog.4.html added

mainlog from client 3

comment:5 by elexis, 6 years ago

Keywords: multiplayer removed

Creating shadow texture (size 4096x4096) (format = DEPTH_COMPONENT) might be another trigger.

One may consider setting a minimum timeout during the loading screen until threading is implemented.

http://enet.bespin.org/group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b

in reply to:  5 comment:6 by Imarok, 6 years ago

Replying to elexis:

`Creating shadow texture (size 40 One may consider setting a minimum timeout during the loading screen until threading is implemented.

http://enet.bespin.org/group__peer.html#gac48f35cdd39a89318a7b4fc19920b21b

You mean Phab:D1513?

comment:7 by Imarok, 6 years ago

Tried disabling shadows on all computers? We will rerelease soon and that should hopefully fix the issue.

@elexis: all the client have warntype:"server-timeout", that looks to me, like the server is timing out. Can this still be explained with #3700?

comment:8 by Bill, 6 years ago

will give that a shot and follow up.

comment:9 by Bill, 6 years ago

I tried disabling shadows, and it failed to load on client computers. As soon as server was ready, and game screen appeared, it showed all clients had disconnected. Adding mainlog files from this attempt.

by Bill, 6 years ago

Attachment: mainlog_server.html added

take 2 - server mainlog

by Bill, 6 years ago

Attachment: mainlog_1.html added

take 2 - client 1

by Bill, 6 years ago

Attachment: mainlog_2.html added

take 2 - client 2

by Bill, 6 years ago

Attachment: mainlog_3.html added

take 2 - client 3

comment:10 by elexis, 6 years ago

Patch: Phab:D1513
Priority: Should HaveRelease Blocker
Summary: multiplayer with 1-4 other players fails for other playersPrevent players from dropping during the loading screen

Hotfix at Phab:D1513 (that would be better fixed with threading #3700)

comment:11 by elexis, 6 years ago

In 21840:

Support parsing config values as u32 in preparation of D1513, refs #5163.

Differential Revision: https://code.wildfiregames.com/D1566
Reviewed By: Vladislav

comment:12 by elexis, 6 years ago

In 21841:

In preparation of D1513, allow the NetClientSession to find out if it's the "Local Client", refs #5163.

For good practice, mention all members in the affected member initializer list:
Add booelan m_IsLocalClient and u32 m_HostID to the member initializer list (to not have them undefined, even though they are not read from until they are set).
Add the strings m_GUID and m_UserName for completeness (even though the default constructor is already called for strings).
Use nullptr instead of NULL for pointers.

Comments By: Vladislav

comment:13 by elexis, 6 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 21842:

Prevent players from disconnecting during the loading screen by increasing the timeout tolerance to 60 seconds for that period, fixes #5163.

The NetClient runs in the main thread, so any part of the loading screen consuming several seconds makes that client timeout.
This is a workaround because threading the NetClient would have prevent these timeouts, refs #3700.
Coutnerintuitively, since enet timeout tolerance is proportional to the latency, the better the connection of the player, the more likely it was to drop on gamestart.

This problem became very frequent in Alpha 23, at least due to the Aura bugfix rP21785, AIInterface being particularly slow and that not having been disabled yet in the loading screen resulting in additional 10 second freezes during the loading screen, even on empty maps, refs #5200, rP21838.

Differential Revision: https://code.wildfiregames.com/D1513
Based on patch by: causative

Note: See TracTickets for help on using tickets.