BUG: netchan queue is not properly initialized

dyn dynborg at vogonhq.com
Sat Nov 17 17:00:50 EST 2007


Alternative patch or workaround, immune to potential errors which
occur when clients or bots join too fast when queue is not properly
initialized:

--- sv_net_chan.c-1207     2007-11-07 06:45:00.000000000 -0600
+++ sv_net_chan.c       2007-11-17 15:45:04.944709246 -0600
@@ -137,7 +137,8 @@
        {
                // make sure the netchan queue has been properly
initialized (you never know)
                if (!client->netchan_end_queue) {
-                       Com_Error(ERR_DROP, "netchan queue is not
properly initialized in SV_Netchan_TransmitNextFragment\n");
+            SV_DropClient( client, "net_chan disconnect" );
+            return;
                }
                // the last fragment was transmitted, check wether we
have queued messages
                if (client->netchan_start_queue) {


On 11/11/07, dyn <dynborg at vogonhq.com> wrote:
> OK, i think i found a solution after exploring what it does... Problem
> is, checking if  "netchan queue has been properly initialized" should
> not be performed on zombies which all recently disconnected clients
> are, until engine sets them free in next few seconds after disconnect.
>
> Also there is simpler way to reproduce this bug -- just add 20+ bots
> and then issue 'kick allbots' or 'kick all' from the server console or
> rcon. Server should crash with message:
>
> "ERROR: netchan queue is not properly initialized in
> SV_Netchan_TransmitNextFragment"
> ..."Server Shutdown (Server crashed: netchan queue is not properly
> initialized in SV_Netchan_TransmitNextFragment"
>
> Original code:
>         // make sure the netchan queue has been properly initialized
> (you never know)
>         if (!client->netchan_end_queue) {
>             Com_Error(ERR_DROP, "netchan queue is not properly
> initialized in SV_Netchan_TransmitNextFragment\n");
>         }
>
> Fixed:
>         // make sure the netchan queue has been properly initialized
> (you never know)
>         // DD - skip just disconnected and zombies (CS_ZOMBIE)
>         if (!client->netchan_end_queue && client->state != CS_ZOMBIE) {
>             Com_Error(ERR_DROP, "netchan queue is not properly
> initialized in SV_Netchan_TransmitNextFragment\n");
>         }
>
> Credit goes to: DD
>
> Note: you may use 'client->state >= CS_CONNECTED' instead of
> 'client->state != CS_ZOMBIE', if you want to skip CS_FREE clients too.
> I used != CS_ZOMBIE because recently kicked players get zombie state
> for a few seconds and error occurred after kicking a lot of players at
> once.
>
> I tested it few times with 20-24 bots and it kicked them all without an error.
>
>
> On 11/7/07, dyn <dynborg at vogonhq.com> wrote:
> > This is present in original q3 also, not only in ioq3 and apparently
> > it's not fixed yet.
> >
> > It may happen when you add multiple bots and then issue 'kick allbots'
> > command. I was only player left on server. After few tests it seems to
> > occur more likely if you add 15-20 bots, issue /nextmap (or  load next
> > map) and then add 1-2 more bots and then 'kick all'.
> >
> > There was some discussion about it, but all solutions mentioned are
> > non-working and not very logical either:
> > http://www.quake3world.com/forum/viewtopic.php?f=16&t=9220
> >
> >
> > --
> > dyn
> >
>
>
> --
> dyn
>


-- 
dyn
http://vogonhq.com/



More information about the quake3 mailing list