On Monday 20 September 2004 16:43, Robert Rozman wrote:
Hi, [...] One particular error is (I get this when run in ddd):
Program received signal SIGSEGV, Segmentation fault. 0x400b90af in fflush() from /lib/libc.so.6
fflush flushes out any open streams you may have. It must be trying to write to a stream that you somehow closed (never did anything too complicated with streams, so don't know for sure what the failure modes are, sorry...). Try eliminating any buffered io, just as a test. Your debugging will probably yield something more useful then. BTW, I assume you know how to trace the stack in ddd (or in gdb) right? 'back', in the gdb prompt (works in ddd too). Valgrind is a pretty cool utility for debugging memory accesses. It's easy to use, too. You may want to look into it. It's in the SuSE cds/dvd. Hope this helps! Adalberto
---------------- My C knowledge is rusty (I checked up this code long time ago) so I'd kindly ask for some quick guidance, how to deal with such segfaults. If I remember right there were some tools that could help in debugging memory accesses (efence or something like that) - I guess tools are now much more advanced - but I don't know which one to use...
Also any advice on this particular error would be appreciated.
Thanks in advance,
regards,
Robert.