I have a program which used to work fine until I added some new set of routines. The segmentation fault occurs at a place where I have not touced the code. It happens in places like reading a file (which it reads ok and error happens in somewhere in the middle of the data set. The input data is a time vaying input file). I checked the new code several times by printing the code and reviewing it thoroughly. But the error still happens.
So, I got into debugging and captured the error location.
I go the following error during debugging
Signalled SIGSEGV at 0x3E5D472DBA, function _IO_un_link_internal, file interp.c
0x3E5D472DBA: 48 8B 40 68 movq 104(%rax),%rax
#1 _IO_fclose@@GLIBC_2.2.5 address: 0x3E5D46611D
=> #0 _IO_un_link_internal file: interp.c address: 0x3E5D472DBA
Does this relate to closing a file?
This happens afer running the model for 3 months of simulation time. Ihave to run onr more month of simulation to complete a successful run.
Please let me know as how I can fix this problem.