News:

:) To post in-line images, login and click on the Gallery link at the top

Main Menu

Could not lock file

Started by theguylafayette, January 22, 2014, 12:20:51 PM

Previous topic - Next topic

John Donovan

#15
Quote from: EricKelly on February 20, 2015, 09:30:19 AM
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.

Hi Eric,
The only reports I have had are posted above.  I myself have never seen this error on a Win 7 computer.

If I were you I would just uninstall BitLocker. These 3rd party low level apps are just asking for trouble.

I had one user that had 5 (count'em, 5!) firewall apps installed and was complaining about some network problem...
john

PS This is what I found on the MS developer site:

QuoteCould not lock file. (Error 3050)

The operating system will not allow the Microsoft Access database engine to create a lock file (.LDB) in the same directory where the database file resides. You need to have write privileges to the directory that contains the database you are trying to open. This error can also occur if you are trying to use the passive shut down/connection control feature while the database is opened exclusively.

I'm not "trying to use the passive shut down/connection control feature" and not only that, the database is always opened non-exclusively in DataGetMDBSample.

Eric: can you send me the complete error message? Just a screen shot will do.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

Hi Eric,
I modified the DataGetMDBSample open database code to add a robust retry even though it is read only. This will be in v. 10.7.4 of PFE.

Download and see if that helps your situation.
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

EricKelly

Thanks, John.  I think the error message is the same as what was posted previously: "Could not lock file".  Although I did not notice the title of the window (DataGetMDBSample).  If we get another, I will capture it for you.

Our IT support helped again too.  We cannot uninstall BitLocker as it is part of the enterprise Windows 7 that the university uses.  It is disabled though.  We also set the computer to decrypt the drive overnight.  This should not matter because once the encryption is disabled, new files should not be encrypted, and even though we tried making new PFE data files, the error still occurred.  Our PFE user directory was already accessible by all users but he made sure that all accounts on the machine had modify privileges just in case.

I also noticed that the error occurred more frequently as the session went on.  I am doing an analysis with a dozen elements, so I wonder if the amount of information in the file/memory is creating more opportunity for the error to occur.

Thanks for the new PFE version.  Let's hope that does the trick!

John Donovan

Quote from: EricKelly on February 22, 2015, 09:55:19 AM
Thanks, John.  I think the error message is the same as what was posted previously: "Could not lock file".  Although I did not notice the title of the window (DataGetMDBSample).  If we get another, I will capture it for you.

Hi Eric,
It helps to have information.

Quote from: EricKelly on February 22, 2015, 09:55:19 AM
Our IT support helped again too.  We cannot uninstall BitLocker as it is part of the enterprise Windows 7 that the university uses.  It is disabled though.  We also set the computer to decrypt the drive overnight.  This should not matter because once the encryption is disabled, new files should not be encrypted, and even though we tried making new PFE data files, the error still occurred.  Our PFE user directory was already accessible by all users but he made sure that all accounts on the machine had modify privileges just in case.

Let this be a lesson to you!    ;)

Never use a "locked down" version of Windows for real time data acquisition.  Just asking for trouble.

Quote from: EricKelly on February 22, 2015, 09:55:19 AM
I also noticed that the error occurred more frequently as the session went on.  I am doing an analysis with a dozen elements, so I wonder if the amount of information in the file/memory is creating more opportunity for the error to occur.

Thanks for the new PFE version.  Let's hope that does the trick!

I'll do what I can but you need to get a clean version of Windows and re-install everything on your probe computer.  These "free" "secured" OS packages are anything but...
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

Gseward

Here is a 'could not lock file' example posted in a different thread.

Quote from: jeb on November 13, 2014, 01:57:14 PM
I'm having issues analyzing the data in a particular MDB file, when I hit the "Analyze" button on particular unknowns (not on all of them) or try to output the data to an Excel file I get this error about not being able to lock the file (see attached image).  It seems to be particular to my computer (Windows 7, 32 bit), when I take it to a computer in the lab it analyzes everything just fine.  I tried putting the MDB file in a different folder/location and still get the same thing.  Any ideas?

Quote from: Gseward on January 23, 2015, 10:46:59 AM
I have had problems with this in the past. My observations seem to suggest it happens when the PC is being taxed. If I close all unneeded processes/applications it goes away.  Perhaps it is possible that there is a process running that is also trying to access/backup/interrogate the database file? i.e. anti virus, backup, recovery etc. Wild speculation, as always.

http://smf.probesoftware.com/index.php?topic=105.0

John Donovan

Quote from: Gseward on March 05, 2015, 08:04:02 PM
Here is a 'could not lock file' example posted in a different thread.

Quote from: jeb on November 13, 2014, 01:57:14 PM
I'm having issues analyzing the data in a particular MDB file, when I hit the "Analyze" button on particular unknowns (not on all of them) or try to output the data to an Excel file I get this error about not being able to lock the file (see attached image).  It seems to be particular to my computer (Windows 7, 32 bit), when I take it to a computer in the lab it analyzes everything just fine.  I tried putting the MDB file in a different folder/location and still get the same thing.  Any ideas?

Quote from: Gseward on January 23, 2015, 10:46:59 AM
I have had problems with this in the past. My observations seem to suggest it happens when the PC is being taxed. If I close all unneeded processes/applications it goes away.  Perhaps it is possible that there is a process running that is also trying to access/backup/interrogate the database file? i.e. anti virus, backup, recovery etc. Wild speculation, as always.

http://smf.probesoftware.com/index.php?topic=105.0

I think my latest efforts may have fixed this issue.  But...

Please let me know if any of you experience this "could not lock file" error again.
john
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"

John Donovan

#21
Just an update as we had a user run into this "Could not lock file" error again:



followed by this error message:



Looks bad, doesn't it(?), but turns out they were trying to access a probe database from a USB drive. The one thing Microsoft didn't get quite right in their Jet (DAO) database engine was the file locking on network drives, and now it appears USB drives.

It sometimes works (the user was able to get it to work after a bit), but if the drive access is slow, the file locking might report it was unable to do so. 

File locking is necessary for updating your probe database in case it happens to be opened by more than one application, e.g., Probe for EPMA *and* CalcImage.

Best practice is to copy your probe database, MDB (and BIM files if present), to your local hard drive. That way you'll never see this error and you'll have a backup copy of your data!
John J. Donovan, Pres. 
(541) 343-3400

"Not Absolutely Certain, Yet Reliable"