Re: [BLACKBOX] File write error with Windows7

From: Dr. Markus Bautsch <"Dr.>
Date: Thu, 23 May 2013 13:03:42 -0400

--
Content-type: text/plain
Dear all !
 
I have observed a similar behahiour, on my Windows 7 machines - I remember that I changed my directory and file access rights within the file system to "full access" and then the problem was gone, but I am not sure whether this can solve your problems, too...
 
Regards
 
Markus
 
-----Ursprüngliche Mitteilung----- 
Von: Wojtek Skulski <skulski{([at]})nowhere.xyAn: BLACKBOX <BLACKBOX{([at]})nowhere.xyVerschickt: Do, 23 Mai 2013 6:46 pm
Betreff: Re: [BLACKBOX] File write error with Windows7
Rainer:
a few days ago I opened a text file with my data with BB running under XP.
I made a small change, saved the file, quit BlackBox, used the file for
simulations with another program, and then I wanted to delete the file. I
could not. WinXP was informing me that the file was in use. The situation
persisted for a few days, until I rebooted Windows. I have no idea why. BB
was not running. I checked under Task Manager that BB was not on the
process list as a "zombie process", what sometimes happens (anybody knows,
why?).
This kind of strange behavior happened a few times in the past. I want to
say that a problem like yours occur under XP. I have not seen any pattern
why and when it happens.
Wojtek
> Aubrey,
> thanks for this hint.
> The anti-virus scanner is started automatically during lunch time but the
> problem happens all the day. So I guess there is another problem causing
> this effect.
>
> Best regards,
> Rainer
>
>
> Am 23.05.2013 um 17:59 schrieb Aubrey.McIntosh{([at]})nowhere.xy>
>> Perhaps some anti-virus software has opened the file.
>>
>>
>>
>> On Thu, May 23, 2013 at 10:34 AM, Rainer Neubauer
>> <neubauer.rainer{([at]})nowhere.xy>> Hi all,
>> I have a strange effect when saving a modified source file:
>> An alert box titled ?File Error? shows up containing the message
>>
>> <file> could not be replaced because it is in use
>>
>> When I press the button in the box to repeat the action, the file is
>> saved without any problem.
>> This effect never showed up on Windows XP systems but happens many times
>> on Windows7.
>>
>> It is annoying when editing source files but is actually a BIG problem
>> to me because in my current application (Windows XP up to now; one run
>> taking several hours) I write some status files periodically. On
>> Windows7 this effect would cause my application to stop several times
>> every minute and wait for somebody to click a button.
>>
>> It does not show up when the file to be saved contains just a few dozens
>> of lines.
>> It does not show up too when I write an empty file but showes up when I
>> have appended a line to an existing file and save the file.
>>
>>
>> This is a sketch of my code causing this problem:
>>
>>                 PROCEDURE WriteToFile (VAR path, name, string: ARRAY OF
>> CHAR);
>>                                 (* file must exist and must be a text
>> file *)
>>                                 VAR
>>                                                 formatter:
>> TextMappers.Formatter;
>>                                                 locator: Files.Locator;
>>                                                 model: TextModels.Model;
>>                                                 view: Views.View;
>>                 BEGIN
>>                                 locator := Files.dir.This (path);
>>                                 view := Views.OldView (locator, name);
>>                                 (* omitted code for checking
>> "locator.res = 0" and "view IS
>> TextViews.View" *)
>>
>>                                 model := view (TextViews.View).ThisModel
>> ();   (* get the model of the view *)
>>                                 formatter.ConnectTo (model);
>> (* connect a formatter to the text *)
>>                                 formatter.SetPos (model.Length ());
>> (* set position to end of text *)
>>
>>                                 formatter.WriteString (string)
>>                                 formatter.WriteLn;
>>                                 Views.RegisterView (view, locator, name)
>>                 END WriteToFile;
>>
>>
>>
>> Writing an empty file works without any problems:
>>
>>                 PROCEDURE StatusFileWrite (VAR path, name: ARRAY OF
>> CHAR);
>>                                 VAR
>>                                                 formatter:
>> TextMappers.Formatter;
>>                                                 locator: Files.Locator;
>>                                                 model: TextModels.Model;
>>                                                 view: TextViews.View;
>>                 BEGIN
>>                                 locator := Files.dir.This (path);
>>                                 (* omitted code for checking
>> "locator.res # 0" *)
>>
>>                                 model := TextModels.dir.New ();
>> (* create a new, empty text object *)
>>                                 view := TextViews.dir.New (model);
>> (* create a new text view for model *)
>>                                 formatter.ConnectTo (model);
>> (* connect a formatter to the text *)
>>                                 formatter.SetPos (0);             (* set
>> write position to beginning of file *)
>>
>>                                 WriteFile (formatter);             (*
>> now write file contents *)
>>                                 Views.RegisterView (view, locator,
>> name);
>>                 END StatusFileWrite;
>>
>>
>>
>> Does anybody have an idea how to solve this problem ?
>> Thanks in advance and best regards,
>> Rainer
>>
>>
>>
>> ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
>> LISTSERV{([at]})nowhere.xy>>
>>
>>
>>
>> --
>> Aubrey McIntosh, Ph.D.
>> 211 E. 5th St.
>> Morris MN 56267
>> (512)-348-7401
>>
>> ---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
>> LISTSERV{([at]})nowhere.xy>>
>
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy>
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to 
LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy--
Content-type: text/html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><font color="black" size="2" face="Arial, Helvetica, sans-serif">
<div><font style="background-color: transparent;">Dear all&nbsp;!</font></div>
<div>&nbsp;</div>
<div>I have observed a similar behahiour, on my Windows 7 machines - I remember that I changed my directory and file access rights within the file system to &quot;full access&quot; and then the problem was gone, but I am not sure whether this can solve your problems, too...</div>
<div>&nbsp;</div>
<div>Regards</div>
<div>&nbsp;</div>
<div>Markus</div>
<div>&nbsp;</div>
<div></div>
<div></div>
<div style="color: black; font-family: arial,helvetica; font-size: 10pt;">-----Ursprüngliche Mitteilung----- <br>
Von: Wojtek Skulski &lt;skulski{([at]})nowhere.xyAn: BLACKBOX &lt;BLACKBOX{([at]})nowhere.xyVerschickt: Do, 23 Mai 2013 6:46 pm<br>
Betreff: Re: [BLACKBOX] File write error with Windows7<br>
<br>
<div style="margin: 0px; color: rgb(0, 0, 0); font-family: Tahoma, Verdana, Arial, Sans-Serif; font-size: 12px; background-color: rgb(255, 255, 255);" id="AOLMsgPart_0_009ac1cc-b22b-4ea5-82ba-520cdcced024">
<pre style="font-size: 9pt;"><tt>Rainer:
a few days ago I opened a text file with my data with BB running under XP.
I made a small change, saved the file, quit BlackBox, used the file for
simulations with another program, and then I wanted to delete the file. I
could not. WinXP was informing me that the file was in use. The situation
persisted for a few days, until I rebooted Windows. I have no idea why. BB
was not running. I checked under Task Manager that BB was not on the
process list as a &quot;zombie process&quot;, what sometimes happens (anybody knows,
why?).
This kind of strange behavior happened a few times in the past. I want to
say that a problem like yours occur under XP. I have not seen any pattern
why and when it happens.
Wojtek
&gt; Aubrey,
&gt; thanks for this hint.
&gt; The anti-virus scanner is started automatically during lunch time but the
&gt; problem happens all the day. So I guess there is another problem causing
&gt; this effect.
&gt;
&gt; Best regards,
&gt; Rainer
&gt;
&gt;
&gt; Am 23.05.2013 um 17:59 schrieb <a href="mailto:Aubrey.McIntosh{([at]})nowhere.xy&gt;
&gt;&gt; Perhaps some anti-virus software has opened the file.
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; On Thu, May 23, 2013 at 10:34 AM, Rainer Neubauer
&gt;&gt; &lt;<a href="mailto:neubauer.rainer{([at]})nowhere.xy&gt;&gt; Hi all,
&gt;&gt; I have a strange effect when saving a modified source file:
&gt;&gt; An alert box titled &#147;File Error&#148; shows up containing the message
&gt;&gt;
&gt;&gt; &lt;file&gt; could not be replaced because it is in use
&gt;&gt;
&gt;&gt; When I press the button in the box to repeat the action, the file is
&gt;&gt; saved without any problem.
&gt;&gt; This effect never showed up on Windows XP systems but happens many times
&gt;&gt; on Windows7.
&gt;&gt;
&gt;&gt; It is annoying when editing source files but is actually a BIG problem
&gt;&gt; to me because in my current application (Windows XP up to now; one run
&gt;&gt; taking several hours) I write some status files periodically. On
&gt;&gt; Windows7 this effect would cause my application to stop several times
&gt;&gt; every minute and wait for somebody to click a button.
&gt;&gt;
&gt;&gt; It does not show up when the file to be saved contains just a few dozens
&gt;&gt; of lines.
&gt;&gt; It does not show up too when I write an empty file but showes up when I
&gt;&gt; have appended a line to an existing file and save the file.
&gt;&gt;
&gt;&gt;
&gt;&gt; This is a sketch of my code causing this problem:
&gt;&gt;
&gt;&gt;                 PROCEDURE WriteToFile (VAR path, name, string: ARRAY OF
&gt;&gt; CHAR);
&gt;&gt;                                 (* file must exist and must be a text
&gt;&gt; file *)
&gt;&gt;                                 VAR
&gt;&gt;                                                 formatter:
&gt;&gt; TextMappers.Formatter;
&gt;&gt;                                                 locator: Files.Locator;
&gt;&gt;                                                 model: TextModels.Model;
&gt;&gt;                                                 view: Views.View;
&gt;&gt;                 BEGIN
&gt;&gt;                                 locator := Files.dir.This (path);
&gt;&gt;                                 view := Views.OldView (locator, name);
&gt;&gt;                                 (* omitted code for checking
&gt;&gt; &quot;locator.res = 0&quot; and &quot;view IS
&gt;&gt; TextViews.View&quot; *)
&gt;&gt;
&gt;&gt;                                 model := view (TextViews.View).ThisModel
&gt;&gt; ();   (* get the model of the view *)
&gt;&gt;                                 formatter.ConnectTo (model);
&gt;&gt; (* connect a formatter to the text *)
&gt;&gt;                                 formatter.SetPos (model.Length ());
&gt;&gt; (* set position to end of text *)
&gt;&gt;
&gt;&gt;                                 formatter.WriteString (string)
&gt;&gt;                                 formatter.WriteLn;
&gt;&gt;                                 Views.RegisterView (view, locator, name)
&gt;&gt;                 END WriteToFile;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Writing an empty file works without any problems:
&gt;&gt;
&gt;&gt;                 PROCEDURE StatusFileWrite (VAR path, name: ARRAY OF
&gt;&gt; CHAR);
&gt;&gt;                                 VAR
&gt;&gt;                                                 formatter:
&gt;&gt; TextMappers.Formatter;
&gt;&gt;                                                 locator: Files.Locator;
&gt;&gt;                                                 model: TextModels.Model;
&gt;&gt;                                                 view: TextViews.View;
&gt;&gt;                 BEGIN
&gt;&gt;                                 locator := Files.dir.This (path);
&gt;&gt;                                 (* omitted code for checking
&gt;&gt; &quot;locator.res # 0&quot; *)
&gt;&gt;
&gt;&gt;                                 model := TextModels.dir.New ();
&gt;&gt; (* create a new, empty text object *)
&gt;&gt;                                 view := TextViews.dir.New (model);
&gt;&gt; (* create a new text view for model *)
&gt;&gt;                                 formatter.ConnectTo (model);
&gt;&gt; (* connect a formatter to the text *)
&gt;&gt;                                 formatter.SetPos (0);             (* set
&gt;&gt; write position to beginning of file *)
&gt;&gt;
&gt;&gt;                                 WriteFile (formatter);             (*
&gt;&gt; now write file contents *)
&gt;&gt;                                 Views.RegisterView (view, locator,
&gt;&gt; name);
&gt;&gt;                 END StatusFileWrite;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Does anybody have an idea how to solve this problem ?
&gt;&gt; Thanks in advance and best regards,
&gt;&gt; Rainer
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; ---- To unsubscribe, send a message with body &quot;SIGNOFF BLACKBOX&quot; to
&gt;&gt; <a href="mailto:LISTSERV{([at]})nowhere.xy&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; --
&gt;&gt; Aubrey McIntosh, Ph.D.
&gt;&gt; 211 E. 5th St.
&gt;&gt; Morris MN 56267
&gt;&gt; (512)-348-7401
&gt;&gt;
&gt;&gt; ---- To unsubscribe, send a message with body &quot;SIGNOFF BLACKBOX&quot; to
&gt;&gt; <a href="mailto:LISTSERV{([at]})nowhere.xy&gt;&gt;
&gt;
&gt;
&gt;
&gt; ----
&gt; To unsubscribe, send a message with body &quot;SIGNOFF BLACKBOX&quot; to
&gt; <a href="mailto:LISTSERV{([at]})nowhere.xy&gt;
----
To unsubscribe, send a message with body &quot;SIGNOFF BLACKBOX&quot; to 
<a href="mailto:LISTSERV{([at]})nowhere.xy</tt></pre>
</div>
 <!-- end of AOLMsgPart_0_009ac1cc-b22b-4ea5-82ba-520cdcced024 -->
</div>
</font>
<p>
----
To unsubscribe, send a message with body &quot;SIGNOFF BLACKBOX&quot; to LISTSERV{([at]})nowhere.xy----
Received on Thu May 23 2013 - 19:03:42 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:54 UTC