MartinMcD Posted March 16, 2011 Report Share Posted March 16, 2011 Hello everyone, Well, this is a strange problem which is driving me around the bend. I have written an app that lets the user save out data as a tdms file. 90% of the time it works fine. However, sometimes when you hit save (in the app) the TDMS Open block throws error 8 saying that the file can't be opened due to a permissions error. The file is valid and available. It is really hard to recreate the error on demand. In fact, tonight I set a stub vi running which opens the same tdms file and keeps the reference open at all times. My 'proper' app can still write to the file properly when this is the case - I can't recreate the error. However, the app is used by >30 people and it is a real error, it crops up a few times a day and is causing a real problem. I'm wondering what is going on and whether I don't understand something to do with TDMS files. I don't understand the buffering option or the 'flush' command and I'm wondering if I'm missing something here. Please can anyone shed any light on my problems? Any help would be very very much appreciated. Thank you very much, Martin Quote Link to comment
ShaunR Posted March 16, 2011 Report Share Posted March 16, 2011 (edited) Hello everyone, <snip> Martin If you are running under windows, turn off windows ndexing. Edited March 16, 2011 by ShaunR Quote Link to comment
MartinMcD Posted March 16, 2011 Author Report Share Posted March 16, 2011 If you are running under windows, turn off windows ndexing. Hello Shaun, That sounds like the nugget of information I need. Is windows indexing something I can turn off from within LabView? Please can you expand, I'm afraid I don't know what it is. Thank you, Martin Quote Link to comment
ShaunR Posted March 16, 2011 Report Share Posted March 16, 2011 (edited) Hello Shaun, That sounds like the nugget of information I need. Is windows indexing something I can turn off from within LabView? Please can you expand, I'm afraid I don't know what it is. Thank you, Martin I wish I could find stuff on LAVA. I've commented many time before..but here we go again. Windows indexing is the windows search service (so no, you can't turn it off in LabVIEW AFAIK). It periodically runs through the system acquiring locks on files, reading its contents (so you can search contents), and building up it's quick search database. I've been bitten many times in the past by getting file errors at seemingly random intervals and it's a killer on logging apps. I now routinely disable it and have not been bitten by random file errors since (only my own faux pas - but I can debug those ) How to turn it off Try turning it off and see if your problem goes away. Edited March 16, 2011 by ShaunR Quote Link to comment
MartinMcD Posted March 17, 2011 Author Report Share Posted March 17, 2011 I wish I could find stuff on LAVA. I've commented many time before..but here we go again. Windows indexing is the windows search service (so no, you can't turn it off in LabVIEW AFAIK). It periodically runs through the system acquiring locks on files, reading its contents (so you can search contents), and building up it's quick search database. I've been bitten many times in the past by getting file errors at seemingly random intervals and it's a killer on logging apps. I now routinely disable it and have not been bitten by random file errors since (only my own faux pas - but I can debug those ) How to turn it off Try turning it off and see if your problem goes away. Thank you, I've added the relevant line to the registry in my installer and created a new version - I'll see if the problem goes away. Fingers crossed... Thanks, Martin Quote Link to comment
tnt Posted March 17, 2011 Report Share Posted March 17, 2011 A while back I had some similar problems and in my case it was caused by the antivirus that was checking (and blocking) the file while checking the contents for virusses. As a solution I excluded certain extensions (or skip the entire folder) from the virusscan. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.