Author Topic: Windows File In Use Error  (Read 4857 times)

Offline rjbokleman

  • Newcomer
  • Posts: 32
    • Astrobin
Windows File In Use Error
« on: 2016 February 20 09:07:57 »
...during StarAlignment if you select File for your reference image and select a file within the folder (Registered) you're processing it fails because PI thinks its in use by another process.

To work around this issue, I must make a copy of my reference image into my Masters folder and all is well until the bug gets addressed.

Offline Alejandro Tombolini

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1267
    • Próxima Sur
Re: Windows File In Use Error
« Reply #1 on: 2016 February 20 10:15:22 »
Hi, do you mean that in StarAlignment tool you select an image as "Reference Image" located in a folder called "Registered", then you select the same image in "Target Image" in StarAlignment tool and it fails?
If that it the case I cannot reproduce it in my Linux distribution 1.8.4.1197
The foloder "Registered" usually is created by BachtPreprocessing script. Have you previously used BPP to align your images?
Saludos, Alejandro.


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Windows File In Use Error
« Reply #2 on: 2016 February 24 01:51:16 »
Quote
it fails because PI thinks its in use by another process.

If this is reported, then the file *is* being used by another process. This is a relatively common issue on Windows, and typically it means that a background process, such as an anti virus application or a malware, is accessing the file in question or has blocked it.

So this is not a bug, but an unexpected problem caused by another application. PixInsight cannot open a file that is already in use by another application.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline rjbokleman

  • Newcomer
  • Posts: 32
    • Astrobin
Re: Windows File In Use Error
« Reply #3 on: 2016 March 01 15:13:47 »
There's no anti-virus on the system.  I've had numerous issues with PI on Windows where it thinks files are in use by other processes in PI.

I created a folder called \Registered manually to store my lights at that point in the process.  This was not the result of using the script.

Then when selecting the files in that folder by the StarAlignment process and selecting one of them from that same folder as the reference image the StarAlignment processed failed when trying to access my selected reference image.

As I said, this happens to me all over and over again when using PI on Windows (using Windows Server 2012 R2) as you work through a standard processing workflow and is really annoying.  I'm going to have to carefully provide some repro steps on this.  I use Windows Server 2012 R2 because it's loaded on a 12 core 64GB of RAM system so it speeds up processing.
« Last Edit: 2016 March 01 15:23:30 by rjbokleman »

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Windows File In Use Error
« Reply #4 on: 2016 March 01 18:53:32 »
does the equivalent of "lsof" exist on windows? at least that way you might be able to catch another process in the act of opening the file...

rob

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Windows File In Use Error
« Reply #5 on: 2016 March 01 19:15:11 »
does the equivalent of "lsof" exist on windows? at least that way you might be able to catch another process in the act of opening the file...

There are a couple of SysInternals utilities that will show file handle usage on Windows systems (Handle and Process Explorer.)  Download from https://technet.microsoft.com/en-au/sysinternals/bb795535.aspx

Cheers,
Rick.

Offline TrickyDicky

  • Newcomer
  • Posts: 46
Re: Windows File In Use Error
« Reply #6 on: 2017 February 19 03:42:23 »
I know this post is 1 year old, but I hit the same problem today when I wanted to integrate two images.
What is the solution?

Offline RickS

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1298
Re: Windows File In Use Error
« Reply #7 on: 2017 February 19 21:43:41 »
I know this post is 1 year old, but I hit the same problem today when I wanted to integrate two images.
What is the solution?

I don't think this is the same as the original problem reported in this thread, but it is the same issue I reported here: http://pixinsight.com/forum/index.php?topic=9719.0

There are at least two workarounds.  You can use FITS files instead of XISF, or you can make copies of the files.

Cheers,
Rick.

Offline TrickyDicky

  • Newcomer
  • Posts: 46
Re: Windows File In Use Error
« Reply #8 on: 2017 February 23 07:07:45 »
Thanks Rick,
You're a genius. FITs work fine.
 :smiley:

Offline rjbokleman

  • Newcomer
  • Posts: 32
    • Astrobin
Re: Windows File In Use Error
« Reply #9 on: 2017 February 28 10:12:18 »
My issue turned out to be self-inflicted.  I was using GoodSync to keep the files/folders synchronized between my laptop and a high end server.

GoodSync was running on a schedule of every 15 minutes, so it would lock the file.  Once I turned off the automatic schedule things returned to normal and I just synchronize manually now.

 ;)

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Windows File In Use Error
« Reply #10 on: 2017 March 16 02:50:04 »
This is a bug in the current XISF implementation on Windows. The problem happens simply because the files are being opened with sharing disabled for both read and write operations (it should be disabled for writing exclusively).

This bug is now fixed in the next version of the XISF support module, which will be released soon with PixInsight 1.8.5.

BTW, using FITS is a bad idea, in general. The FITS format has been deprecated in PixInsight 1.8.4, and its deprecation is even stronger in version 1.8.5. Many important features that will be implemented during the 1.8.5 cycle won't be available for FITS.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline focaldepth

  • Newcomer
  • Posts: 7
Re: Windows File In Use Error
« Reply #11 on: 2017 March 27 01:53:17 »
As this thread has re-opened, for completeness, when I had this problem it was because I had duplicate file names in several different directories. There was a clash of aligned file names.