07-10-2011 05:05 AM
LV has a very annoying behavior where it sometimes locks files which are completely unrelated to it. Now I finally realized what causes this.
These specific steps have been run on Windows 7 with LV 2009, but I have seen this happen with other LV and Windows versions:
This video demonstrates this:
It looks like LV gets a drag enter message when the cursor passes over it and at that point it locks the file (looking at it again, I see that this happens even if you don't actually open the file). This doesn't happen with all file types, but I have seen it happen before with other files as well, and I'm assuming with these simple repro steps, someone on the LV team can figure out why and whether this can be fixed.
Solved! Go to Solution.
07-10-2011 12:20 PM
Wow, that's annoying. Thanks for tracking it down to easily reproducible steps.
After your test procedure, you can actually close all open VIs until LabVIEW is at the welcome screen and the files are still locked. This is probably related to observations discussed elsewhere, that LabVIEW keeps unwarranted locks on some files until it is completely closed. I recently had a few temporary VIs open, closed them all to the welcome screen, but still was not able to delete the folder containing one of the files.
07-10-2011 12:48 PM
Folders are usually less of an issue, because the folder is generally locked because it was one set as the working directory for the process. Setting another working directory (for instance, by doing a Save As) should free it up. Files are locked because LV holds open handles to them, which I don't see any good reason for.
07-10-2011 12:53 PM - edited 07-10-2011 12:54 PM
If I remember right it would not allow me to delete the folder because one or more if the files in it (not the folder itself) were locked by LabVIEW, even thought LabVIEW was at the welcome screen. Sorry, I did not invertigate in detail.
07-12-2011 09:23 AM
07-12-2011 05:11 PM - edited 07-12-2011 05:12 PM
The aforementioned CAR has now been closed as Duplicate.
The CAR that it was a duplicate of is closed as "Fixed in LV 2011". So now you have a reason to upgrade when August comes around. 🙂
(And we just reconfirmed that the bug is actually fixed using the exact steps to reproduce that are listed here.)
07-13-2011 01:13 AM
OK, so woohoo, I guess? Thanks.