M
manu
Hi all,
Im trying to populate structure from csv files. Each csv file is of
3MB and there are 24 files in total.A function will populate the
structure from these files. The same function when called twice, the
second cycle fails on a particular file that to on a fixed line.
While debugging we could find that the function which reads a line
from the file is not reading the entire line. The function uses fgetc
() for getting the characters from the line and this fuction returns
-1 before the End of line.
Please give your valuable inputs on this issue.
This is the call stack
NTDLL! 7c9100e8()
_heap_alloc_base(unsigned int 4144) line 161
_heap_alloc_dbg(unsigned int 4096, int 2, const char * 0x0047075c
`string', int 59) line 367 + 9 bytes
_nh_malloc_dbg(unsigned int 4096, int 1768161280, int 2, const char *
0x0047075c `string', int 59) line 242 + 21 bytes
_malloc_dbg(unsigned int 4096, int 2, const char * 0x0047075c
`string', int 59) line 163 + 27 bytes
_getbuf(_iobuf * 0x00477750) line 59 + 19 bytes
_flsbuf(int 69, _iobuf * 0x00477750) line 153 + 9 bytes
write_char(int 69, _iobuf * 0x00477750, int * 0x00136da0) line 1083 +
75 bytes
_output(_iobuf * 0x00477750, const char * 0x00465461, char *
0x00137004) line 393 + 21 bytes
printf(const char * 0x00465460 `string') line 60 + 18 bytes
FhReadLineFromFile(_iobuf * 0x004777f0, unsigned char * 0x001370e8)
line 306 + 15 bytes
Is it anything related to heap allocation?
Im trying to populate structure from csv files. Each csv file is of
3MB and there are 24 files in total.A function will populate the
structure from these files. The same function when called twice, the
second cycle fails on a particular file that to on a fixed line.
While debugging we could find that the function which reads a line
from the file is not reading the entire line. The function uses fgetc
() for getting the characters from the line and this fuction returns
-1 before the End of line.
Please give your valuable inputs on this issue.
This is the call stack
NTDLL! 7c9100e8()
_heap_alloc_base(unsigned int 4144) line 161
_heap_alloc_dbg(unsigned int 4096, int 2, const char * 0x0047075c
`string', int 59) line 367 + 9 bytes
_nh_malloc_dbg(unsigned int 4096, int 1768161280, int 2, const char *
0x0047075c `string', int 59) line 242 + 21 bytes
_malloc_dbg(unsigned int 4096, int 2, const char * 0x0047075c
`string', int 59) line 163 + 27 bytes
_getbuf(_iobuf * 0x00477750) line 59 + 19 bytes
_flsbuf(int 69, _iobuf * 0x00477750) line 153 + 9 bytes
write_char(int 69, _iobuf * 0x00477750, int * 0x00136da0) line 1083 +
75 bytes
_output(_iobuf * 0x00477750, const char * 0x00465461, char *
0x00137004) line 393 + 21 bytes
printf(const char * 0x00465460 `string') line 60 + 18 bytes
FhReadLineFromFile(_iobuf * 0x004777f0, unsigned char * 0x001370e8)
line 306 + 15 bytes
Is it anything related to heap allocation?