Forum

What is SZ_GetSpace:overflow

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

What is SZ_GetSpace:overflow

Postby Jukki » Wed Jun 22, 2011 8:19 pm

Hey. I am trying to get my games psp multiplayer working.however there is bug when another psp joins the game.

While the psp (a) is connecting and precachign in halfway about the psp (b) (server) gets this error. As far as i know it basicaly shut downs the server. and stucks the psp (a)'s connecting to signon 1.

How ever if psp (a) has loaded another map (precached most of the models and sounds) the server psp (b) doesnt get the error and second psp (a) can join.

Is there any way to fix this? For what i have SZ_ thingy happens in keepalive message.
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby Jukki » Sat Jul 02, 2011 7:59 pm

anyone?

I am still a noob. :P
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby revelator » Sat Jul 02, 2011 8:17 pm

true evil :) even shub fears it.

darkplaces had it removed (id actually favor a tut on doing that myself).

give it a little it seems peeps have been busy lately an answer will come ;)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Sat Jul 02, 2011 8:25 pm

sz_getspace failures happen when something tries to write too much information into a sizebuf_t object (ie: a network message buffer). Typically this applies only to reliable buffers as unreliable ones will be purged and dropped if they overflow.

you'd need a stack trace to figure out exactly where its overflowing, but in all such situations, if the server can crash because of a client, its a server or qc bug.

chances are, the server is constantly trying to add data to the client's reliable buffer. if the client is stalling trying to load content (sounds or whatever) and not replying to the server, the server won't be able to send out its data and get confirmation that it was received. if the server continues to try adding to the pending data which it can't flush yet, then it'll crash. Either don't generate more data, or check available sapce and cache the fact that that you couldn't send the current state yet, and do that when you can.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Jukki » Sun Jul 03, 2011 3:59 pm

heh just asking, what is sizebuf?
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby Spike » Sun Jul 03, 2011 4:10 pm

Code: Select all
typedef struct sizebuf_s
{
   qboolean   allowoverflow;   // if false, do a Sys_Error
   qboolean   overflowed;      // set to true if the buffer size failed
   byte   *data;
   int      maxsize;
   int      cursize;
} sizebuf_t;


that is.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Jukki » Sun Jul 03, 2011 4:36 pm

ok yeah, more like whaty it is used for etc. Still prety new with engine.
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby Jukki » Wed Aug 03, 2011 5:50 am

Hmm just thinking, is there a way to like increse the max size?
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am

Postby qbism » Thu Aug 04, 2011 12:31 am

possible overflow location:
Code: Select all
void CL_KeepaliveMessage (void)
{
    float       time;
    static float lastmsg;
    int          ret;
    sizebuf_t   old;
    byte      olddata[16384]; //qbism- was 8192, could overrun as discovered by mh
.
.
.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby Jukki » Thu Aug 04, 2011 5:36 am

Well, i actualy did comment CL_KeepaliveMessage(); calls away,(saw kurok doing that)
Jukki
 
Posts: 214
Joined: Wed Apr 07, 2010 4:59 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest