PDA

View Full Version : ZoneDebug.exe crash when I build


Zuesrooster
08-06-2006, 02:52 PM
I set up a test server, when i use the precompiled .exe I get no errors and everything seems to work fine. When I download the source and compile my own .exe, I can't get the world server to run, it always throws an "stack around variable "queries" corrupt. Also when I use my compiled Zonedebug.exe the .exe crashes when I hail an NPC. It seems to be at this method:

int Parser::numtok(string text, const char * character) {
string::iterator iterator = text.begin();
int returnvalue=0;
while(*iterator) {
if (*iterator == *character) returnvalue++;
iterator++;
}
return returnvalue;
}

I changed the while(*iterator) to while(i < text.length()) and replaced *iterator in the loop with text[i]. This seemed to fix the hailing crash (NPC's still don't respond to quest's) but now i get an exception when it does a CastToClient(), seems to be when it is trying to add me into the aggro list. Everything works perfect including quests when I used a precompiled .exe so I am ruling out everything except for either my Visual Studio's Express Edition is screwed up, or something I am missing in the source. Does anyone have any idea's what i could be doing wrong?

fireclav
08-07-2006, 10:54 AM
y would u post that in this section?

Zuesrooster
08-07-2006, 12:12 PM
Sorry If I posted this in the wrong area, I should have read the descriptions better.

If anyone is interested, I managed to fix the crashing on hailing NPC's by defining
#define _HAS_ITERATOR_DEBUGGING 0
#define _SECURE_SCL 0

Apparently VS 2005 added some additional Iterator checking and defining those two as false leaves out the extra checks. This fixed my problem in Express Edition, I don

CrabClaw
09-07-2006, 04:53 AM
Are the above fixes in the newest version? I still get off and on crashes when I hail the roaming NPCc in the PoK.

Aramid
09-07-2006, 06:36 AM
Crabclaw,

It seems that this is only effected if you compile with VS2005 Pro or Express and Standard as well, I would think. The compiled version from here doesn't do it according to Zeusrooster's ealier post in this thread.

With that said, what compiler is being used to make the release version?

fathernitwit
09-07-2006, 02:35 PM
the fix listed above should be in, as well as a rewritten set of parser routines to fix the iterator problems.

VC.net toolkit 2003 is being used to build released (MS got rid of this when express came out though).

Thristam
09-08-2006, 05:26 AM
Im a bit confused. Does this mean the above corrections have been already added to .845 or will be in the next iteration? if so i can test the VS2k5 Pro and be able to tell if the NPC hailing crash and aggro issue are resolved with that product.

Oh, and if that fixes it, your my hero Zeusrooster

Zuesrooster
09-11-2006, 07:54 AM
I believe I saw the fix in the last post of the code on 8-22-06.