Can anyone recommend me a good free bug tracer type program that works with
SDL apps?
What I’m looking for is something that might report memory leaks, array
overruns and other little bits and pieces so I can see if I’ve done (hmmm…
quite possibly) anything really silly in Metal Blob Solid.
HTH,
JPOn Saturday 13 December 2003 01:39 am, Stephen Sweeney wrote:
Can anyone recommend me a good free bug tracer type program that works with
SDL apps?
What I’m looking for is something that might report memory leaks, array
overruns and other little bits and pieces so I can see if I’ve done
(hmmm… quite possibly) anything really silly in Metal Blob Solid.
Remember, bug-tracking shouldn’t depend on the libraries you use – and I’ve
never seen one depending on a library. In all honesty, just use a bug
tracker you like, and go from there.
I’ve currently got a few probs like one of my project seg faulting so I’m
trying to find out why. I’ll look into all these recommendations and see what
comes up trumps
you probly already know this technique but just in case (or for other people
listening) here it is anyways.
whenever my code has problems crashing, i use a log function to log info to
a file at regular intervals like this:
int main (void)
{
Log(“starting main”);
//some code here
Log(“did some code”);
//some other code here
Log(“did some other code”);
}
and then i run it and if it says “did some code” in the file but not “did
some other code”, i know the problem lies in that last block of code so then
i do the same thing as above but inside the function(s) in there. i keep
doing this, going deeper in until i find the line thats causing the problem
then have it output the values of variables to the log file to better
understand whats going on etc.
this technique has worked great for me every time in finding crashes. i
guess it wouldnt be real helpful in finding memory corruption or memory
leaks though.
anyways, hope it helps although you probly already tried this.> ----- Original Message -----
I’ve currently got a few probs like one of my project seg faulting so I’m
trying to find out why. I’ll look into all these recommendations and see
what
comes up trumps
whenever my code has problems crashing, i use a log function to log info to
a file at regular intervals like this:
int main (void)
{
Log(“starting main”);
Make sure your Log function does a fflush() before returning, else not all
the log entries will be written if the program crashes.
i keep doing this, going deeper in until i find the line thats causing the
problem then have it output the values of variables to the log file to
better understand whats going on etc.
Do a binary search for the bug, rather than a linear search
this technique has worked great for me every time in finding crashes. i
guess it wouldnt be real helpful in finding memory corruption or memory
leaks though.
Yep, doesn’t do much for finding memory leaks (use wrappers for malloc() and
free() to check for leaks or corrupted pointers), but it does help greatly in
finding some types of crashes.
JPOn Sunday 14 December 2003 01:51 pm, Alan Wolfe wrote: