Bug Tracker – Bug 560

Scythe 2 Coop Overflows

Last modified: 2010-08-06 04:33:20 UTC
Bug 560 - Scythe 2 Coop Overflows
Summary: Scythe 2 Coop Overflows
Alias: None
Product: Odamex
Classification: Unclassified
Component: Server & Client (show other bugs)
Version: (old) 0.4
Hardware: All Windows (Any)
: P2 critical
Assignee: Odamex Bug Reporter
Depends on:
Blocks: 424 567
  Show dependency tree
Reported: 2010-01-09 18:29 UTC by Ralph Vickers
Modified: 2010-08-06 04:33 UTC (History)
5 users (show)

See Also:


Add server cvar to control maximum rate (2.82 KB, patch)
2010-07-03 04:23 UTC, Kyle
Details | Diff
Stale Flags patch (17.51 KB, patch)
2010-07-06 05:18 UTC, GhostlyDeath
Details | Diff
Stale Flags (19.78 KB, patch)
2010-07-09 00:38 UTC, GhostlyDeath
Details | Diff
Stale Flags 3 (19.95 KB, patch)
2010-07-09 23:10 UTC, GhostlyDeath
Details | Diff
Stale Flags 4 (19.97 KB, patch)
2010-07-12 15:10 UTC, GhostlyDeath
Details | Diff
Stale Flags 5 (20.26 KB, patch)
2010-07-14 22:23 UTC, GhostlyDeath
Details | Diff
Show Obsolete (4) Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Vickers 2010-01-09 18:29:56 UTC
When running a Scythe 2 coop server, maps with large amounts of monsters cause problems when it comes to connecting to the server. The server will output the following when a player attempts to connect:

DZ_GetSpace: overflow
need full update

The player will then be disconnected. It appears that this problem affects a client connecting from the same machine as the server even moreso as another player was able to connect to my server despite him claiming it was very buggy.

It appears that monsters are the main cause of this problem as running the server with 'nomonsters 1' allows for normal connect.

To reproduce:

Run scythe2.wad on map25 coop and try to connect with a client on the same machine.
Comment 1 Kyle 2010-07-03 04:23:25 UTC
Created attachment 185 [details]
Add server cvar to control maximum rate
Comment 2 Kyle 2010-07-03 04:24:27 UTC
On behalf of Spleen:

The overflows occur due to the client's rate variable defaulting to a low 10000
- this variable prevents more than that amount of bytes in the regular buffer
from being sent to a client every second.  However, there's a hard-coded
server-side cap of 8000 on the rate, probably to prevent bandwidth issues. 
This patch turns the hardcoded limit into a server variable called maxrate,
allowing rate to be raised high enough for any WAD.

Apologies for Code::Blocks deciding it needs to silently clean up the
whitespace without asking.  Hopefully that doesn't bloat the patch up too much.
Comment 3 Kyle 2010-07-03 06:45:23 UTC
This is still not resolved. While it doesn't disconnect clients, ping becomes gradually worse until it freezes. This also appears to crash the server. Spleen said he'd look into it further.
Comment 4 Kyle 2010-07-03 17:42:08 UTC
Further info, the server appears to disconnect clients upon connect sometimes:

[10:23:15] is trying to connect...
[10:23:16] tm512:45 has connected.
[10:23:17] SZ_GetSpace: overflow
[10:23:17] need full update
[10:23:17] tm512:45 disconnected. (SPECTATOR, 0 KILLS, 0 DEATHS)

Once in-game there are still serious issues with client's ping and a "rubber-band" effect, as well as projectile issues. See the following video for a description of what's happening (excuse the low framerate): http://www.youtube.com/watch?v=Ej2Qqm_lW4c
Comment 5 GhostlyDeath 2010-07-06 05:18:03 UTC
Created attachment 191 [details]
Stale Flags patch

This patch sends updates to clients when things need updating.

saves alot of bandwidth!
Comment 6 GhostlyDeath 2010-07-07 20:19:34 UTC
(In reply to comment #5)
> Created an attachment (id=191) [details]
> Stale Flags patch
> This patch sends updates to clients when things need updating.
> saves alot of bandwidth!

if (cl->netbuf.cursize >= (maxrate / 2))

should be 

if (cl->netbuf.cursize >= 1024)

as previously

This was pointed out by Spleen-
Comment 7 GhostlyDeath 2010-07-09 00:38:38 UTC
Created attachment 192 [details]
Stale Flags


 * sv_staleflags (default: 1) -- Enabled patch changes
 * Fixed multiple logical errors (which caused most of the problems)
 * Made code for efficient.
Comment 8 GhostlyDeath 2010-07-09 23:10:03 UTC
Created attachment 194 [details]
Stale Flags 3


 * Fixes players jittering when turning
 * Fixed projectiles exploding too early.
Comment 9 GhostlyDeath 2010-07-12 15:10:54 UTC
Created attachment 195 [details]
Stale Flags 4

No changes, update to r1651.
Comment 10 GhostlyDeath 2010-07-14 22:23:14 UTC
Created attachment 196 [details]
Stale Flags 5

Update to r1652:

 * Uncomment a single line of code and add if not sv_staleflags
Comment 11 Spleen 2010-07-23 23:01:17 UTC
I think this is mostly fixed except for the packet size issue described in http://odamex.net/bugs/show_bug.cgi?id=594

The remaining desyncs seem to be unrelated to overflows.
Comment 12 Mike Lightner 2010-08-06 02:23:10 UTC
r1699 may complete this.  Can anyone confirm?
Comment 13 Mike Lightner 2010-08-06 04:33:20 UTC
Everyone says the solutions have been implemented to solve this.  Marking fixed.  Follow bug 604 for more information about improved netcode.