LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

under array bounds

Hi,

what does "under array bounds" means ?. I've got that fatal runtime and can reproduce it but I don't understand what happend. I use a char pointer with 2 dll's.

Thank's for any pointer.
0 Kudos
Message 1 of 4
(3,873 Views)
Can you tell me what the full error message is? Sounds like you're running into a case where you performing some operation not within the allowed array bounds. You could be writing part the end of the string or dong something before it.
Bilal Durrani
NI
0 Kudos
Message 2 of 4
(3,857 Views)
it's concerning a char pointer.

void Test( char *psFile )
{
char sPath[MAX_PATHNAME_LEN],
sTest[50];

it's for psFile pointer but I don't understand . My pointer is good and points to sPath that have a goog path value.
After some functions I see that psFile is declared as 'under array bounds' in debug mode.

I've found only a solution : to declare bigger string variables after my pointer !. For example sTest[50] become sTest[150];

I've used Watch Variables possibility to catch modifications of my pointer but nothing seems to corrupt my pointer.
0 Kudos
Message 3 of 4
(3,846 Views)
Could you post a sample that lets me replicate what you are seeing? Some functions require a buffer of a specific size, which is why you might be running into this. But I'll be able to get a better idea if I could look at some code.

Thanks
Bilal Durrani
NI
0 Kudos
Message 4 of 4
(3,836 Views)