Re: MING and gif2mask

David Marceau <[email protected]> Tue, 13 Jan 2004 06:56:43 -0500
Newsgroups gmane.comp.web.ming.general
Message-ID <[email protected]>
Kelvin Luck wrote:
> 
> Hi,
> I'm back to trying to get gif2mask working on my hosts. I can "make" it
> from the util directory of the source distribution like so:
> 
> [admin@... util]$ make gif2mask
> 
> and it outputs this:
> 
> gcc -g -Wall gif2mask.c -o gif2mask -lungif -lm -lz
> 
> seems ok - no errors. Then when I try and run it with ./gif2mask I get:
> 
> Segmentation fault
Question:
What os and version are you using?
What version of gcc are you using?
1)gdb gif2mask
2)from within gdb 
run
If it craps out then it usually shows what line number it craps out at because
you built it with -g (debug info included)
3)if not from within gdb 
info stack

Then what does it say? 

4)The other suggestion is after it craps, quit from gdb, then
gdb gif2mask
list
step
step
step
until it craps out.  At least you will know what line craps out the program.
The other suggestion is to use breakpoints
i.e.
break gif2mask.c:35
The other suggestion is to use
next
...instead of step...if you are familiar with vc/vb ....step means step into. 
Next means step over.  There is the equivalent of step over but I don't recall
right now because I don't use it often.
Another couple of useful commands:
info locals
info globals

That should help you figure out where the problem is for you.

Good luck.

Don't stop asking questions because that's the only way you're going to succeed.