Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: The process cannot access the file because it is being used by another process?[Problem disappeared!]

by Discipulus (Canon)
on Apr 28, 2016 at 07:42 UTC ( [id://1161740]=note: print w/replies, xml ) Need Help??


in reply to The process cannot access the file because it is being used by another process?[Problem disappeared!]

Not reproducible errors are mmhh.. how to say? just weird happenings?

Googgling the error text you received leads to many different things or probably weird behaviour of explorer.exe

In my experience windows error reporting is not the best things here around.

Speaking of more than 150 Mb of DATA other things can also lock the file: for example antivirus and the indexer service come to mind, maybe in conjunction with some IO temporary issue.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
  • Comment on Re: The process cannot access the file because it is being used by another process?[Problem disappeared!]
  • Select or Download Code

Replies are listed 'Best First'.
Re^2: The process cannot access the file because it is being used by another process?[Problem disappeared!]
by BrowserUk (Patriarch) on Apr 28, 2016 at 08:48 UTC
    other things can also lock the file

    I think I may know the cause; though a half-hearted attempt to reproduce it failed.

    I had the original file from which I cut the data which is 350MB; and I had 2.4 million numbers pasted into the program file in the same editor; I also have a simulation running that is using 3.2GB of my 8GB. And of course, windows had to store the paste buffer copy somewhere also.

    I saved the file from the editor, switched to the command line and tried to run it. I didn't wait or check to see if the editor had finished saving it to disk. That could mean that the editor was still trying to write the file out whilst I was trying to run the script.

    However, I also switched back into the editor and made some changes, before trying again with the same result. Now normally speaking the editor wouldn't allow me to edit the file if it was still in the process of saving it; so how could that be?

    But maybe, it completed just as I switched back to it. And then when I saved the changes and tried again the problem repeats. But for that to happens again and again seems like extremely unfortunate (some might say incredible) timing; until I remembered that Windows gives the (newly) foreground process a priority boost when you switch to it.

    It is just possible that with two of four cores currently fully utilised to running the background simulation; and system memory tight; the editor was being exceptionally slow writing the large file to disk, through a severely depleted system cache. With a busy system; depleted cache and me switching away to the command line thus giving it the priority boost; the editor was simply starved of cycles until I switched back to it each time when it got the boost and completed.

    Anyhoo; that's what I'm going to put it down to; and promptly forget about it. I've got too much on to pursue it any further.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I knew I was on the right track :)
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1161740]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-18 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found