you probably trashed memory somewhere else before that line was executed. Most likely cause is writing beyone the bounds of a buffer, but there could be lots of other reasons too.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
I'm guessing this isn't the first new call in your program, which probably means that some prior allocation has been trashed.
If you have a small, AND COMPLETE program which crashes you can show us, that may be of some use.
Otherwise finding the root cause gets pretty tricky.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953