LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Sudden "File access permission denied."

Hi all!

I use the .ini-Toolbox to save measurement data together with the related settings. To limit the size of the files, every hour a new file is generated. Everything works very well, BUT, after 30-35 hours, the Ini_WriteToFile function returns me an -95 "File access permission denied." error. The file seems not to be opened, because I can open him with a editor.

Any ideas out there?

It's pretty hard to figure out what's wrong because I always have to wait 30-35 hours until the error occurs.

0 Kudos
Message 1 of 5
(4,487 Views)

Hi Thosch,

 

could you try to create new folders for the files let's say every day and watch, if this happens again.

 

Best regards,

Melanie

Best regards,
Melanie Eisfeld
Senior Applications Engineer, National Instruments Germany
Certified LabVIEW Developer
Certified TestStand Architect
0 Kudos
Message 2 of 5
(4,456 Views)

Ok, good idea. I try it out and let you know.

 

Best,

Thomas

0 Kudos
Message 3 of 5
(4,453 Views)

Hi Melanie,

I found the reason, but unfortunately not the error. Not yet 😉

The variable who holds the file name of the active file gets corrupted. This is the reason for the Access denied error. It's a bit misleading.

So, I try to find out who is changing the variable.

 

 

Best,

Thomas

0 Kudos
Message 4 of 5
(4,436 Views)

Arghh, It's a good old buffer overflow. I forgot the range checking of a data array.

 

Best,

Thomas

0 Kudos
Message 5 of 5
(4,431 Views)