Friday, August 8, 2008

Visual Studio 2008

Most Visual Studio 2008 problems have now been sorted. I'd switched DirectInput to unbuffered some time back, which has completely resolved the threading issues. What's remaining is a PF_VarString crash. I've definitely confirmed that this is coming from the entered/left the game (with frags) broadcast messages, originating in CL_Disconnect, going through Host_ShutdownServer and SV_DropClient, which calls into QC to generate a signoff message (the only case where this call path doesn't apply seems to be a "changelevel" command, but that ends up in PF_VarString with the same crash anyway). It doesn't appear to be a buffer overrun, as even doing strlen on the G_STRING result crashes. There's definitely call stack corruption though; one other symptom is a jump into a random section of code elsewhere.

My current theory is that my new memory management system is at fault. Progs.dat is being loaded on the hunk (it's not really a hunk anymore, but I'll use the familiar terminology for convenience and legibility), and going astray somewhere at disconnect time. I'm going to put it into main memory and hopefully that should resolve things once and for all.

0 comments: