RE: [GD-Windows] Finding routine that's crashing
Brought to you by:
vexxed72
From: Andrew G. <ag...@cl...> - 2002-08-01 21:45:57
|
Err yeah. It was late that night ok! :) I think the two extra FF's are a typo as that buffer is just used to = store the current working directory, why it's not on the stack is probably a result of me not tidying things up properly. I had all sorts of nightmares trying to get that stack trace stuff = working reliably on versions of Win9x so as a result that whole file which = deals with retrieving the callstack and symbol names ended up being quite = messy as I tried various things, and at the end I just ran over the file quickly = to tidy things up. Thanks, I might clean it up and bung it on flipcode or something. I = still use that DLL as a drop for projects as it's very handy, but haven't = looked at the source since last year when I wrote it. Andrew Grant- Climax Brighton=20 > -----Original Message----- > From: Ignacio Casta=F1o [mailto:cas...@ya...] > Sent: 01 August 2002 21:27 > To: gam...@li... > Subject: Re: [GD-Windows] Finding routine that's crashing=20 >=20 >=20 > Hey, thanks! what a nice code! >=20 > by the way, there's a little leak in line 96 in file=20 > ExceptionHandler.cpp: >=20 > tt =3D new char[TTBUFLEN]; >=20 > is never freed, just replace it by: >=20 > char tt[TTBUFLEN]; >=20 > and should be fine, or add the appropiate delete at the end=20 > of the function. >=20 > And there's no need to have TTBUFLEN =3D 0xFFFF, that's too big=20 > I think... >=20 >=20 >=20 > Ignacio Casta=F1o > cas...@ya... >=20 >=20 > Andrew Grant wrote: > > This would be very handy, if you're willing to share! > > > > I can find SymGetSymFromAddr in MSDN, but I'm fuzzy on how=20 > you get the > > stack trace. >=20 > (Second sending, apparently the mail list has an attatchment=20 > limit which I > went over by more than I thought it'd be). Files are at > <http://www.b0rked.clara.co.uk/assert.zip> >=20 > Attatched is the source for something similar (and a drop in=20 > module for > people who don't really want to worry about how it works).=20 > Sorry for the > attatchment, it's fairly small and I don't have anywhere at=20 > hand to upload > it to. >=20 > I wrote this a while ago for tracking down some rare crashes=20 > we had in art > tools, it's basically a drop in that replaces the standard=20 > MSVC runtime > assert but provides more info. You place the dll in your=20 > working folder and > add the two files to your project so when an assert triggers=20 > you get the > below dialog. If the DLL doesn't exist then it defaults back=20 > to the standard > version. >=20 > use ASSERT(x) or one of the macros in stdassert.h and you should get = a > dialog like the image below. >=20 > Hopefully it might be of some use to someone. It's very old=20 > code that I > wrote in one evening so be kind, also some of the stack trace=20 > code is ripped > from an MSDN sample but tidied up. >=20 >=20 > Andrew Grant- > Climax Brighton >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 >=20 > _______________________________________________________________ > Yahoo! Messenger > Nueva versi=F3n: Webcam, voz, y mucho m=E1s =A1Gratis!=20 > Desc=E1rgalo ya desde http://messenger.yahoo.es >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=3D555 >=20 |