My program crashes on fflush because of seg fault, ... but not always?
What possible reasons do you know for the situation, described in the title? Here's what my bt looks like:
<pre>#0  0x00a40089 in ?? ()
#1  0x09e3fac0 in ?? ()
#2  0x09e34f30 in ?? ()
#3  0xb7ef9074 in ?? ()
#4  0xb7ef9200 in ?? ()
#5  0xb7ef9028 in ?? ()
#6  0x081d45a0 in LogFile::Flush ()
#7  0x081d45a0 in LogFile::Flush ()
#8  0x081d46e0 in LogFile::Close ()
#9  0x081d4dbf in LogFile::OpenLogFile ()
#10 0x081d4eb9 in LogFile::PerformPeriodicalFlush ()
#11 0x081d4fca in LogFile::StoreRecord ()
#12 0x081d50c2 in LogFile::StoreRecord ()</pre>

and it gives me `Program terminated with signal 11, Segmentation fault.`

The wrapper around fflush() is simple, does nothing, just calls `fflash` and check for errors (if the returned code is <0 ). So, I guess the seg fault is caused by `fflash`. Or it's possible to be somewhere else, because of the `??` at the top of the stack?

OS: RHEL5; gcc version 3.4.6 20060404 (Red Hat 3.4.6-3); debugged with gdb, with the original exe with max debug information in it.

I know about seg fault on no space on the disk, but this is not this case (as I have a watch-dog for the application, that restarts the program again and everything keeps working just fine). 

Any ideas would be helpful.
Thanks.
My program crashes on fflush because of seg fault, ... but not always?
===

What possible reasons do you know for the situation, described in the title? Here's what my bt looks like:
<pre>#0  0x00a40089 in ?? ()
#1  0x09e3fac0 in ?? ()
#2  0x09e34f30 in ?? ()
#3  0xb7ef9074 in ?? ()
#4  0xb7ef9200 in ?? ()
#5  0xb7ef9028 in ?? ()
#6  0x081d45a0 in LogFile::Flush ()
#7  0x081d45a0 in LogFile::Flush ()
#8  0x081d46e0 in LogFile::Close ()
#9  0x081d4dbf in LogFile::OpenLogFile ()
#10 0x081d4eb9 in LogFile::PerformPeriodicalFlush ()
#11 0x081d4fca in LogFile::StoreRecord ()
#12 0x081d50c2 in LogFile::StoreRecord ()</pre>

and it gives me `Program terminated with signal 11, Segmentation fault.`

The wrapper around fflush() is simple, does nothing, just calls `fflash` and check for errors (if the returned code is <0 ). So, I guess the seg fault is caused by `fflash`. Or it's possible to be somewhere else, because of the `??` at the top of the stack?

OS: RHEL5; gcc version 3.4.6 20060404 (Red Hat 3.4.6-3); debugged with gdb, with the original exe with max debug information in it.

I know about seg fault on no space on the disk, but this is not this case (as I have a watch-dog for the application, that restarts the program again and everything keeps working just fine). 

Any ideas would be helpful.
Thanks.