>>int sz_NC_WriteField[13];
>>crash happens in the free() !!
<slams_on_brakes>
Your not freeing that array are you?
>>int sz_NC_WriteField[13];
>>crash happens in the free() !!
<slams_on_brakes>
Your not freeing that array are you?
When your code falls off the end of an array (and trying to squeeze 20 values into an array of 13 elements counts) you generally overwrite some area of memory you didn't intend. If that memory happens to be used by free() to manage things internally (for example, keeping track of memory blocks that can be legitimately free()d) then you get a crash in free().
That is another common symptom of pointer molestation. There are many variants. Look for another instance where your code molests a pointer.
No need unless you find a section of code that is contributing to the crash, and don't understand how it might be contributing.
There are many types of programming errors that can contribute to program crashes, unfortunately.
Last edited by grumpy; 08-08-2011 at 06:56 AM. Reason: Fixed typo