Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5353

Error Out-of-bounds pointer argument (before start of array)

$
0
0

Hello everyone,

I'm getting a fatal run-time error, Out-of-bounds pointer argument (before start of array). I have looked at previous post and haven't found a solution. I know there is a post asking about the same exact problem but I still don't understand what is going wrong. The gist of the program is it basically parses data files and populates an excel file. I can run this program with zero errors on a different batch of data files. The error occurs in the for loop and is repeatable and occurs on the same iteration, index = 15. Any ideas? 

 

FileListArray = (char **)malloc(count_files * sizeof(char *));

for(index =0; index < count_files; index++)
{
FileListArray[index] = (char *)malloc(40*sizeof(char));
}

 

... 

 for (index = 0; index < count_files; index++)
{
Fmt(data_file_name, "%s<%s", FileListArray[index]);

in_file = OpenFile(data_file_name, VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII);

...

 

Thanks.


Viewing all articles
Browse latest Browse all 5353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>