Config
Log for #coopetition on 6th March 2010:
Times are UTC Toggle Colours
01:14:23  <PeterT> @stage Playing
01:14:23  *** Webster changes topic to "Welcome to #coopetition | Revision: hd71c3768 (r19287M)  | STAGE: Playing | http://www.tt-forums.net/viewtopic.php?t=42572 | Download: http://www.openttd.org/en/download-head-to-head | Source: http://hg.openttd.org/developers/yexo/head-to-head.hg | ladder: http://mz.openttdcoop.org/ladder"
01:58:56  <CooPeter> *** Game unpaused (not enough players)
01:58:56  <CooPeter> *** Peter joined the game
01:59:04  <CooPeter> *** Peter`re joined the game
01:59:49  <PeterT> !players
01:59:54  <CooPeter> Client 26 (Blue) is Peter, in company 1 (Peter Transport)
01:59:54  <CooPeter> Client 27 (Orange) is Peter`re, in company 2 (Peter #1 Transport)
02:00:06  <PeterT> !rcon client_name 27 Peter #1
02:00:06  <CooPeter> - Change the nickname of a connected client. Usage: 'client_name <client-id> <new-name>'
02:00:06  <CooPeter> - For client-id's, see the command 'clients'
02:00:13  <PeterT> !rcon client_name 27 "Peter #1"
02:00:13  <CooPeter> *** Peter`re has changed his/her name to Peter #1
02:03:36  <CooPeter> *** Peter has left the game (desync error)
02:03:40  <CooPeter> *** Peter #1 has left the game (desync error)
02:03:40  <CooPeter> *** Game paused (not enough players)
02:03:52  <CooPeter> *** Game unpaused (not enough players)
02:03:53  <CooPeter> *** Peter joined the game
02:03:55  <PeterT> Yexo: ^
02:03:57  <CooPeter> *** Peter`re joined the game
02:04:12  <CooPeter> *** Peter`re has changed his/her name to Peter #1
02:04:15  <Yexo> that's bad :(
02:04:18  <Yexo> can you reproduce it?
02:04:25  <PeterT> No, I wasn't doing anything
02:04:42  <CooPeter> *** Peter #1 has left the game (desync error)
02:04:46  <CooPeter> *** Game paused (not enough players)
02:04:46  <CooPeter> *** Peter has left the game (desync error)
02:04:54  <PeterT> I wasn't doing thing, again
02:05:11  <CooPeter> *** Peter joined the game
02:05:15  <CooPeter> *** Peter #1 joined the game
02:05:31  <CooPeter> *** Peter has joined company #1
02:05:31  <CooPeter> *** Game unpaused (not enough players)
02:05:35  <CooPeter> *** Peter #1 has joined company #2
02:07:15  <CooPeter> *** Yex0 joined the game
02:07:55  <CooPeter> <Peter> Hello :-)
02:08:39  <CooPeter> *** Yex0 has left the game (leaving)
02:08:55  <Yexo> something to look at later
02:09:03  <CooPeter> *** Peter has left the game (desync error)
02:09:03  <CooPeter> *** Peter #1 has left the game (desync error)
02:09:03  <CooPeter> *** Game paused (not enough players)
02:09:35  <PeterT> I just opened the road build toolbar, if that matters Yexo
02:09:43  <Yexo> it shouldn't
02:10:03  <Yexo> only if you desync every time you open the road build toolbar
02:10:24  <PeterT> How do you fix a desync?
02:10:37  <PeterT> there is no crash dump or anything, is there?
02:10:41  <Yexo> nope
02:10:50  <Yexo> the hard part is finding out where it desyncs
02:11:04  <Yexo> a desync is nothing more then "the server did A, but the client did B"
02:11:24  <PeterT> Oh, so why does that happen?
02:11:33  <Yexo> because I made an error :)
02:11:52  <Yexo> it can happen for example if you call Random() in the gui code
02:12:08  <PeterT> Ok
02:12:15  <Yexo> then the client calls Random() but the server does not, so the next time Random() is called (where the result should be the same) the server gets a different result
02:12:23  <Yexo> ^^ was just an example, not what happens now
02:12:39  <Yexo> it can also be due to a variable that isn't always properly reset
02:13:28  <PeterT> You lost me there
02:13:46  <PeterT> Shouldn't the client desync the first time it calls Random()?
02:13:48  <Yexo> nvm then, point is: debugging desyncs is hard
02:14:07  <PeterT> (And the server does not)
02:14:27  <Yexo> PeterT: yes, shortly after that
02:14:33  <PeterT> Oh
02:14:49  <Yexo> not exactly at the time it calls Random() (then it'd be easy), but at the next time the random-state is compared to the server
02:14:58  <Yexo> which happens every x ticks, depending on a setting
02:15:06  <PeterT> There is a setting which specifies that?
02:15:46  <Yexo> there is also a compile-time option to generate a desync debug build
02:16:15  <Yexo> if you do that for both the server and the client they print every time Random() is called, then you can compare the results and find out where the error is
02:16:36  <PeterT> Oh, if it were just for the client, I could quickly compile it and give you the results
02:16:39  <Yexo> but such a desync debug built is very slow, so it's only useful if you can actually reproduce the desync
02:17:21  <Yexo> it also generates _a lot_ of output (easily 100mb in a minute or so)
02:17:42  <PeterT> Oh, wow
02:17:48  <PeterT> Why?
02:18:03  <Yexo> because Random() is called very often and for each time it's called a line is printed
02:18:41  <Yexo> last time I worked with such a build it was +- 20 calls to Random per tick, there are 32 ticks in a second
02:18:49  <Yexo> take 80 bytes as average line length
02:18:51  <Yexo> that gives
02:19:04  <Yexo> @calc 80*20*32*60
02:19:04  <Webster> Yexo: 3072000
02:19:11  <Yexo> 3mb per minute
02:19:16  <Yexo> not quite 100, but still a lot of text
02:20:19  <PeterT> Oh
02:20:57  <Yexo> anyway, time to sleep
02:20:58  <Yexo> gn
02:21:23  <PeterT> Good night Yexo
02:21:29  <PeterT> I will be heading off soon also
02:46:44  *** Chris_Booth has quit IRC
07:37:43  *** Yexo_ has joined #coopetition
07:37:43  *** ChanServ sets mode: +o Yexo_
07:44:29  *** Yexo has quit IRC
08:15:04  <XeryusTC> Yexo_: isn't it worth it to cache the random number each tick? so that all subsequent calls the same tick just get returned the same number instead of recalculating it
09:30:06  *** Webster has joined #coopetition
09:30:06  *** ChanServ sets mode: +o Webster
13:06:43  *** Yexo_ is now known as Yexo
13:17:09  *** Yexo has quit IRC
13:17:34  *** Yexo has joined #coopetition
13:17:34  *** ChanServ sets mode: +o Yexo
13:26:37  <Yexo> XeryusTC: I'm afraid that would have a lot of unwanted side effects
13:27:03  <Yexo> like on big maps either building 2 industries or building 0 in a tick, that kind of stuff
17:32:27  *** Ammler has quit IRC
17:32:27  *** CooPeter has quit IRC
17:32:27  *** Hirundo has quit IRC
17:41:18  *** Hirundo has joined #coopetition
17:41:34  *** Ammler has joined #coopetition
17:41:35  *** ChanServ sets mode: +o Ammler
19:18:17  *** Mucht has quit IRC
21:27:39  *** Chris_Booth has joined #coopetition

Powered by YARRSTE version: svn-trunk