Jump to content

TDMS File Open error that makes no sense


Recommended Posts

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

Link to comment

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

Link to comment

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. throwpc.gif I've commented many time before..but here we go again. biggrin.gif

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 rolleyes.gif)

How to turn it off

Try turning it off and see if your problem goes away.

Edited by ShaunR
Link to comment

I wish I could find stuff on LAVA. throwpc.gif I've commented many time before..but here we go again. biggrin.gif

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 rolleyes.gif)

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.