Author Topic: Could not lock file  (Read 13431 times)

theguylafayette

  • Student
  • *
  • Posts: 4
Could not lock file
« on: January 22, 2014, 12:20:51 PM »
I have successfully been using Probe for EPMA on my personal computer (non-network) for almost a year. This week for some reason I have started to get a recurring error message as soon as I attempt to work with any file using the program. As soon as I attempt to work with a file (via Analyze! for example) I get an immediate error message of DataGetMDBSample "Could not lock file". I have attempted using backup versions of the files and received the same error message. I have also tried uninstalling and reinstalling the software with the same resulting error message. All of the typical fix-it forums reference this error only occurring in networked systems, which does not apply in my case so I have been unable to find a fix using general computer forums. Has anyone ever received this error message using Probe For EPMA and do you have any suggestions on how I might tackle this issue? I would really appreciate any advice you could give me. Thanks for your help.

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Could not lock file
« Reply #1 on: January 22, 2014, 01:28:43 PM »
Hi "guy",
This is a rare error but I've seen it on XP systems when running PFE under a "limited" account.

Can you tell us what OS you are using and also which version of PFE you installed?  Did you try installing both the CalcZAF.msi and ProbeForEPMA.msi installers?  You need both.

If you are using Windows XP, then this document might help. See attached.
« Last Edit: January 22, 2014, 06:29:55 PM by Probeman »
The only stupid question is the one not asked!

Jeremy Wykes

  • Professor
  • ****
  • Posts: 42
Re: Could not lock file
« Reply #2 on: January 23, 2014, 02:22:24 PM »
I get this error all the time running Probe for EPMA under Windows 8. I had assumed it was because my mdb files were stored in my Dropbox folder, which is always being checked by the Dropbox algorithm to see if files need to be synchronised.
Australian Synchrotron - XAS

Probeman

  • Emeritus
  • *****
  • Posts: 2856
  • Never sleeps...
    • John Donovan
Re: Could not lock file
« Reply #3 on: January 23, 2014, 04:57:03 PM »
I've never seen this error under Windows 7.  You might try running the latest CalcZAF.msi and Probe for EPMA.msi installation files as we did tweak the permissions on these installers since you acquired your data here.

http://www.probesoftware.com/Update.html

Please let me know if that helps.  I can't speak to accessing the files from Dropbox.  I guess try them on your hard drive as a test.
The only stupid question is the one not asked!

theguylafayette

  • Student
  • *
  • Posts: 4
Re: Could not lock file
« Reply #4 on: January 24, 2014, 10:55:02 AM »
I'm running the programs on Windows 7. I have both programs (CalcZAF and Probe for EPMA) and have been running them successfully for close to a year on this system. This is an issue that only popped up in the last few days. I just downloaded the updates to 10.2.3 (originally was using a 10.1 version) and I still get the error with the updated program.

I also attempted the Windows XP file sharing fix. I still received the same error, but I am not fully convinced that I changed the sharing properties correctly.

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Could not lock file
« Reply #5 on: January 24, 2014, 11:06:08 AM »
The XP fix won't work under Win7, I was just guessing your OS because at first you didn't state what OS you are using.

Did you try opening some data files *not* in your DropBox?
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

theguylafayette

  • Student
  • *
  • Posts: 4
Re: Could not lock file
« Reply #6 on: January 28, 2014, 12:00:23 PM »
John,

I have attempted the following fixes:

Uninstall/reinstall
Changing sharing permissions on UserData and Probe for EPMA folders.
Using backup files saved on DropBox
Using backup files from external harddrives

Andrew

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Could not lock file
« Reply #7 on: January 28, 2014, 12:15:07 PM »
Probe for EPMA is designed to handle data files stored almost anywhere that has both read and write permissions.

Is there some reason you haven't tried reading the data files from your hard drive?  That is, that UserData folder on your C:\ drive?
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

theguylafayette

  • Student
  • *
  • Posts: 4
Re: Could not lock file
« Reply #8 on: January 29, 2014, 04:01:25 PM »
John,

I'll try to be a little clearer about what has happened and what I have tried. Let's start with an example file like August.mdb. August was created during a run in August 2013. After this run I saved this file directly from the EPMA instrument computer onto my hard drive. At this same time I saved a copy on dropbox and also saved a copy on an external hard drive. Since August I have successfully modified August.mdb using Probe for EPMA multiple times on my computer. Using the same routine for opening the files that I have always used successfully, last week I began receiving the error message "Could Not Lock File". Any attempt to use any function in Analyze! immediately led to this error message. The files on my hard drive in the Userdata folder no longer worked and only produced this error message.

This is what led to my attempts at the various fix-its I listed previously, which included downloading the backup files from dropbox and copying over the original files from my external hard drive to see if it was the data files that had become corrupted or if it was a program/system issue. As both the original versions from dropbox and the external hard drive do not work either, I think there must either be a program or system issue. At the moment I'm stumped at what to try next. I appreciate any tips/advice/suggestions you might have. Thanks for your help.

Andrew
« Last Edit: January 29, 2014, 04:03:34 PM by theguylafayette »

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Could not lock file
« Reply #9 on: January 29, 2014, 07:31:03 PM »
...Using the same routine for opening the files that I have always used successfully, last week I began receiving the error message "Could Not Lock File". Any attempt to use any function in Analyze! immediately led to this error message. The files on my hard drive in the Userdata folder no longer worked and only produced this error message
Hi Andrew,
Thanks for providing some context.   Well, I must say, this is certainly a conundrum... the closest to this that I've seen is years ago in NT4, when I would update Microsoft Office software and sometimes it would break the DAO (Data Access Object) I use for storing data in the database files. I would then re-install Visual Basic and it would be ok again.

The only reason I mention this is to ask if you can remember last week if you updated anything or installed something, or even uninstalled something.  This might be an excellent clue. 

Some questions:

Are you logged in as an "administrator" when running these tests?

Have you tried running both the CalcZAF and ProbeForEPMA msi installers? 

Do all (old and new) PFE MDB database files show the same symptoms?  Is it only PFE MDB files that are complaining about not locking?

Can you open the standard database (Standard.exe) and add a "test" standard? Say PuO2?

What happens if you create a new file in "demo" mode (click "yes" to the first question) and make some new samples, acquire data, etc.?

Have you tried opening the same MDB files on another computer with PFE?

Finally, have you tried editing the file properties by right clicking on the MDB file?

It would be great if you could respond to these questions one at a time when you have a chance.
john
« Last Edit: January 29, 2014, 07:38:02 PM by John Donovan »
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Jeremy Wykes

  • Professor
  • ****
  • Posts: 42
Re: Could not lock file
« Reply #10 on: January 29, 2014, 10:27:13 PM »
I can confirm that when I open files not located in Dropbox, I do not get the "Could not lock file" error.

I ran Sysinternals Procmon to see what was happening when that error appeared, and if I understand what it found, then it looks like you generate that error when attempting to delete the (I assume temporary) .ldb file.

That may explain the dropbox behaviour, as it is trying to index/sync a short-lived .ldb file. If this is the case then other indexers, or virus scanners may produce the same result.

This is an example of the event I always see associated with a "Could not lock file" error:

5:23:43.8654640 PM   Probewin.exe   4844   CreateFile   C:\Users\jeremy\Dropbox\Wykes_WDS\03-13-2013\s_in_hydrous_andesites.ldb   DELETE PENDING   Desired Access: Generic Read/Write, Disposition: OpenIf, Options: Synchronous IO Non-Alert, Non-Directory File, Random Access, Open No Recall, Attributes: N, ShareMode: Read, Write, AllocationSize: 0
« Last Edit: January 29, 2014, 11:27:33 PM by Jeremy Wykes »
Australian Synchrotron - XAS

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Could not lock file
« Reply #11 on: January 30, 2014, 09:27:13 AM »
Hi Jeremy,
Awesome detective work. Thank-you!
john

Andrew,
Ok, I moved an MDB file to my drop box and sure enough, if I browse to the MDB file and open it, it opens. But when it tries to perform an analysis it fails with what you and Jeremy are reporting:



So, not surprisingly, my suggestion is: "don't do that!".    ;D

Apparently Dropbox is not designed to support fast DAO I/O with file locking!

Now, if you are having an issue opening a Probe for EPMA file from your C:\ or D:\ or whatever drive or even any normal network drive (several of our customers keep all their MDB files on a network file server with no issues), please let us know the specific details.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Gseward

  • Global Moderator
  • Professor
  • *****
  • Posts: 134
Re: Could not lock file
« Reply #12 on: January 31, 2014, 09:48:19 AM »
John, Jeremy,

Very interesting! I had problems with the same error for about 2 years on my PC connected to the probe with an XP installation. More often than not the problem appeared when I was analysing a sample with a lot of  analysis points in it, or when calculating the run time for a large list of standards/unknowns. I noticed that if I closed all unnecessary applications and only had PFE running, the problem would go away (hence I was able to live with it for two years). This led me to believe it was processor-loading related. When I upgraded to a more powerful PC then problem went away. Hence, I thought I knew the answer, but perhaps I didn't; based on your observations, perhaps I was barking up the wrong tree.

gareth

John Donovan

  • Administrator
  • Emeritus
  • *****
  • Posts: 3304
  • Other duties as assigned...
    • Probe Software
Re: Could not lock file
« Reply #13 on: March 02, 2014, 12:37:55 PM »
Very interesting! I had problems with the same error for about 2 years on my PC connected to the probe with an XP installation. More often than not the problem appeared when I was analysing a sample with a lot of  analysis points in it, or when calculating the run time for a large list of standards/unknowns. I noticed that if I closed all unnecessary applications and only had PFE running, the problem would go away (hence I was able to live with it for two years). This led me to believe it was processor-loading related. When I upgraded to a more powerful PC then problem went away. Hence, I thought I knew the answer, but perhaps I didn't; based on your observations, perhaps I was barking up the wrong tree.
Maybe not...  if the OS does the file locking fast enough in the Dropbox folder it might be ok.

But, yes, probably better not to try to access PFE MDB files from inside your Dropbox. Even if it works fine, it will most probably be much slower.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

EricKelly

  • Graduate
  • **
  • Posts: 9
Re: Could not lock file
« Reply #14 on: February 20, 2015, 09:30:19 AM »
The "Could not lock file" error is happening to us now too.  Two probe runs have failed now, so this is a big concern.

We just upgraded our probe computer to a new PC running Windows 7.  The old computer was slow but did not have this error.

On the new probe computer, the problem occurred with a previous version of PFE, so I updated to the latest version (10.7.2) but the error is still there.  We do not use Dropbox on the lab computer.  I asked for help from my IT guy, and we disabled an encryption program (BitLocker) that normally encrypts the entire hard drive.  We also set PFE to run as administrator.

Also, my office computer (Windows 7) shows the error sometimes, but if I retry a few times, it seems to get through the task. I do not keep PFE files in Dropbox on my office computer.  It is also running BitLocker (enabled).

If other labs are not experiencing the problem, perhaps it's specific to our computers, which are typically imaged with the same OS and programs.  Having disabled BitLocker, it seems that the conflict is somewhere else.

Any ideas?  Thanks,

Eric