Ya, it's not a crash 'as such'. It's a User Breakpoint which I can continue through in Debug but in run mode it crashes straight out. I hadn't yet tested it with GCC. It gets to a "User Breakpoint" in free.c::101 HeapFree when I run it in debug in MSVC 2003 on the PurgeAndDeleteElements line.
I got the same "User Breakpoint" on the same line in Free.c when I used Q_ functions on a new character array. It happened on the delete line, worked fine without delete but then its leaking memory.. char *sName = new char[100]; /* Perform some Q_ functions here, actually Q_StrSubst was one of them */ delete [] sName; I'll compile it in GCC and test today. - Jay > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:hlcoders- > [EMAIL PROTECTED] On Behalf Of Jay Stelly > Sent: 06 May 2006 23:52 > To: [email protected] > Subject: RE: [hlcoders] VSTDLIB Whoes. > > I just cut & pasted this into my code (without the META_LOG statement > however) and it works without crashing. Is the code below supposed to > be a repro case out of context? > > Jay > > > > I had to remove dependance on the standard STL library, > > otherwise server > > admins were getting a cannot find libstd error. > > I cant believe the code got so muddled in the original mails, > > no line breaks > > :\ > > > > But yeah, I re-wrote it removing Valve's functions and its > > working but I > > thought the reason for these functions was to help us. Most > > of them aren't > > used in the SDK at all, so what are they there for? > > > > --------------------------------------------- > > CUtlVector<char*, CUtlMemory<char*> > outStrings; > > const char *sToDo = "gren, pans, heli"; > > Q_SplitString( sToDo, ",", outStrings ); > > char sTmp[25] = ""; > > int x = 0; > > for ( x = 0; x < outStrings.Count(); x++ ) > > { > > Q_StrSubst( outStrings[x], " ", "", sTmp, 25, true ); > > META_LOG( g_PLAPI, "String:'%s'", sTmp ); > > } > > Q_strcpy( sTmp, "" ); > > outStrings.PurgeAndDeleteElements(); > > return; > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

