POV-Ray : Newsgroups : povray.general : "Failed to save file:" Server Time
31 Jul 2024 08:28:27 EDT (-0400)
  "Failed to save file:" (Message 9 to 18 of 18)  
<<< Previous 8 Messages Goto Initial 10 Messages
From: Charles C
Subject: Re: "Failed to save file:"
Date: 2 Nov 2007 23:34:41
Message: <472bfa61@news.povray.org>
Alain wrote:
> OK
> Check if the file exist and if it's read only or system. Same with the 
> folder itself.
> Can you open the offending file, edit it with another application and 
> save it back?
> Is the file opened by any other application?
> Do you have ownership of the file? I had some instances where files and 
> folders on my system got eroneous ownership, with only one user. Some 
> folders/files had been set with an owner whose name was just a bunch of 
> random characters.
> Is you drive full?
> 

Thanks Alain.  This happens with any non-read-only file in my P-Scenes 
directory (which btw is not next to the installation directory) where I 
continually save and re-save as I edit and test and edit and test.  It 
seems to happen with just POV-Ray running, and maybe Windows Explorer. 
The drive has dozens of gigs left.  It's pretty reproducable when it 
happens, but it doesn't always happen.  It only happens following a 
parse-error and an attempted *minor* edit and save.

Here's a better version of the link.  Hopefully it'll work a little better:
http://news.povray.org/povray.beta-test/thread/%3C430daeda@news.povray.org%3E/?ttop=249422&toff=150

Charles


Post a reply to this message

From: Jan Dvorak
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 02:24:14
Message: <472c221e@news.povray.org>
Charles C napsal(a):
> 
> 
> Samuel Benge wrote:
> 
>> Whenever I have received that message it was because the file was 
>> still open in some other application.
> 
> I'm pretty sure it's just POV-Ray.  Re-starting POV-Ray and not changing 
>  anything else lets me make the change and save again.
> Charles
It seems to me POVray doesn't close the file handle and tries to open a 
new one. This fails because there cannot be two file handles to the same 
file if one of them is a writable one.
I've never seen the POVray code but if handle closing depends on a 
garbage collector+destructor then this is certainly wrong. In this case 
either force GC before opening a file or, if that fails, trace the 
references to it (if you don't mind debugging yourself).
You can use Sysinternals taskmanager to see if the image handle is still 
open by POVray.


Post a reply to this message

From: John VanSickle
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 07:46:37
Message: <472c6dad@news.povray.org>
Charles C wrote:
> "Failed to save file:
> 
> The process cannot access the file because it is being used by another 
> process."

When I've had this error, it's because I've tried to save a scene file 
while POV-Ray was parsing it.  For some reason this causes POV-Ray to 
maintain the file lock (or whatever it is the OS calls it) after the 
parsing is done, because the message pops up on all subsequent saves.

Regards,
John


Post a reply to this message

From: Slime
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 17:04:21
Message: <472cf065$1@news.povray.org>
> "Failed to save file:
>
> The process cannot access the file because it is being used by another
> process."
>
> ...in a self-compiled version of POV-Ray 3.6.0 for Windows which I've
> been using for a while now to avoid the spline / token_count issue.


I *think* this was an issue that was fixed in 3.6.1.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Charles C
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 17:31:44
Message: <472cf6d0@news.povray.org>
Jan Dvorak wrote:
> It seems to me POVray doesn't close the file handle and tries to open a 
> new one. This fails because there cannot be two file handles to the same 
> file if one of them is a writable one.
> I've never seen the POVray code but if handle closing depends on a 
> garbage collector+destructor then this is certainly wrong. In this case 
> either force GC before opening a file or, if that fails, trace the 
> references to it (if you don't mind debugging yourself).
> You can use Sysinternals taskmanager to see if the image handle is still 
> open by POVray.


Thanks Jan.  What you're saying I suspect is right.  I think it's been 
fixed but I don't think the fixed-code hasn't been released.  That's 
what I'm really hoping for. :-)
Charles


Post a reply to this message

From: Charles C
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 17:35:02
Message: <472cf796@news.povray.org>
John VanSickle wrote:
> When I've had this error, it's because I've tried to save a scene file 
> while POV-Ray was parsing it.  For some reason this causes POV-Ray to 
> maintain the file lock (or whatever it is the OS calls it) after the 
> parsing is done, because the message pops up on all subsequent saves.

Just curious, which version are you using?

Charles


Post a reply to this message

From: Charles C
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 17:42:27
Message: <472cf953@news.povray.org>
Slime wrote:
>> "Failed to save file:
>>
>> The process cannot access the file because it is being used by another
>> process."
>>
>> ...in a self-compiled version of POV-Ray 3.6.0 for Windows which I've
>> been using for a while now to avoid the spline / token_count issue.
> 
> 
> I *think* this was an issue that was fixed in 3.6.1.

Which one are you referring to?   I think the file handling issue was 
fixed for 3.6.1 (Change 3003?) but not the spline / token_count issue. 
The latter is way more important to me so I'm using a fixed 3.6.0 source 
because that's the latest published.
Charles


Post a reply to this message

From: Slime
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 17:53:06
Message: <472cfbd2@news.povray.org>
> Which one are you referring to?   I think the file handling issue was
> fixed for 3.6.1 (Change 3003?)

That's what I was referring to. I don't know the change number.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Charles C
Subject: Re: "Failed to save file:"
Date: 3 Nov 2007 18:05:04
Message: <472cfea0@news.povray.org>
Slime wrote:
>> Which one are you referring to?   I think the file handling issue was
>> fixed for 3.6.1 (Change 3003?)
> 
> That's what I was referring to. I don't know the change number.

Ah.  Then the solution is out there somewhere. ;-)


Post a reply to this message

From: John VanSickle
Subject: Re: "Failed to save file:"
Date: 4 Nov 2007 15:47:16
Message: <472e2fd4@news.povray.org>
Charles C wrote:
> 
> 
> John VanSickle wrote:
> 
>> When I've had this error, it's because I've tried to save a scene file 
>> while POV-Ray was parsing it.  For some reason this causes POV-Ray to 
>> maintain the file lock (or whatever it is the OS calls it) after the 
>> parsing is done, because the message pops up on all subsequent saves.
> 
> 
> Just curious, which version are you using?

Windows version, 3.6 something.  It may not be just a POV-Ray thing.  I 
haven't seen the problem in a while, and I'm not sure what I did to make 
it go away.

Regards,
John


Post a reply to this message

<<< Previous 8 Messages Goto Initial 10 Messages

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.