System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file is locked and cannot be opened)

Bug #1718960 reported by Greg Davies
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Open Rails
Invalid
Undecided
Unassigned

Bug Description

Error: System.IO.IOException: The process cannot access the file 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being used by another process.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   at Orts.Common.FileTeeLogger.Write(String value) in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 77
   at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index, Int32 count) in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
   at System.IO.TextWriter.WriteLine(String value)
   at System.IO.TextWriter.WriteLine(String format, Object arg0, Object arg1, Object arg2)
   at System.IO.TextWriter.SyncTextWriter.WriteLine(String format, Object arg0, Object arg1, Object arg2)
   at ORTS.Settings.UserSettings.Log() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
   at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings settings, String[] args, Boolean appendLog) in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 668
   at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass8.<Load>b__3() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 147
   at Orts.Viewer3D.Processes.GameStateRunActivity.Load() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 190
   at Orts.Viewer3D.Processes.LoaderProcess.Load() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 158
   at Orts.Viewer3D.Processes.LoaderProcess.DoLoad() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 138
   at Orts.Viewer3D.Processes.LoaderProcess.LoaderThread() in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 109
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Information: Game.PopState()

Revision history for this message
Greg Davies (greg.b.davies) wrote :
James Ross (twpol)
summary: - Logging file is locked and cannot be opened.
+ System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
+ is locked and cannot be opened)
Revision history for this message
Carlo Santucci (carlosanit1) wrote :

This may occur either because you have another instance of OR open (or not correctly closed) or because your antivirus software or backup software access your OpenRailsLog.txt file. In such second case you should tell such programs not to access such file.

Revision history for this message
Greg Davies (greg.b.davies) wrote : Re: [Bug 1718960] Re: System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file is locked and cannot be opened)
Download full text (4.5 KiB)

Carlo,

One - I only have one instance of OR open at a time.

Two - I do all of my backups manually because I do not want any background
operations interfering with my foreground activities.

Three - I have not altered nor changed my antivirus software in the past
year.

Four - More importantly, this started happening with the testing version of
OR that came out two weeks ago.

What I will do is to shut off my virus software, which is Avast Pro, and
see if that has an effect on this file. I will let you know the results,
either way.

Greg Davies

On Sun, Sep 24, 2017 at 3:04 AM, Carlo Santucci <email address hidden>
wrote:

> This may occur either because you have another instance of OR open (or
> not correctly closed) or because your antivirus software or backup
> software access your OpenRailsLog.txt file. In such second case you
> should tell such programs not to access such file.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1718960
>
> Title:
> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
> is locked and cannot be opened)
>
> Status in Open Rails:
> New
>
> Bug description:
> Error: System.IO.IOException: The process cannot access the file
> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
> used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String
> maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
> bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> access, FileShare share, Int32 bufferSize, FileOptions options)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding, Int32 bufferSize)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding)
> at Orts.Common.FileTeeLogger.Write(String value) in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.
> Simulation\Common\ErrorLogger.cs:line 77
> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index, Int32
> count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
> at System.IO.TextWriter.WriteLine(String value)
> at System.IO.TextWriter.WriteLine(String format, Object arg0, Object
> arg1, Object arg2)
> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
> Object arg0, Object arg1, Object arg2)
> at ORTS.Settings.UserSettings.Log() in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
> settings, String[] args, Boolean appendLog) in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line
> 668
> at Orts....

Read more...

Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (5.0 KiB)

Carlos,

I think I may have found the problem. Is there any way of changing the
location the log file is written to? I want to move it to a different
location because the Desktop is set to Read Only. That was probably a
Windows update change and it does not look like Windows will allow me the
change that property of the Desktop.

Greg Davies

On Sun, Sep 24, 2017 at 11:00 AM, Greg Davies <email address hidden>
wrote:

> Carlo,
>
> One - I only have one instance of OR open at a time.
>
> Two - I do all of my backups manually because I do not want any background
> operations interfering with my foreground activities.
>
> Three - I have not altered nor changed my antivirus software in the past
> year.
>
> Four - More importantly, this started happening with the testing version
> of OR that came out two weeks ago.
>
> What I will do is to shut off my virus software, which is Avast Pro, and
> see if that has an effect on this file. I will let you know the results,
> either way.
>
> Greg Davies
>
> On Sun, Sep 24, 2017 at 3:04 AM, Carlo Santucci <email address hidden>
> wrote:
>
>> This may occur either because you have another instance of OR open (or
>> not correctly closed) or because your antivirus software or backup
>> software access your OpenRailsLog.txt file. In such second case you
>> should tell such programs not to access such file.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1718960
>>
>> Title:
>> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
>> is locked and cannot be opened)
>>
>> Status in Open Rails:
>> New
>>
>> Bug description:
>> Error: System.IO.IOException: The process cannot access the file
>> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
>> used by another process.
>> at System.IO.__Error.WinIOError(Int32 errorCode, String
>> maybeFullPath)
>> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
>> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
>> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
>> bFromProxy)
>> at System.IO.FileStream..ctor(String path, FileMode mode,
>> FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
>> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding, Int32 bufferSize)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding)
>> at Orts.Common.FileTeeLogger.Write(String value) in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 77
>> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index,
>> Int32 count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
>> at System.IO.TextWriter.WriteLine(String value)
>> at System.IO.TextWriter.WriteLine(String format, Object arg0,
>> Object arg1, Object arg2)
>> at System.IO.TextWriter.SyncTextWri...

Read more...

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Greg,
the path of the logfile is within a hidden setting, and I don't know exactly how to change it, sorry.
However it seems strange to me that you can't set your desktop to be read/write, because I don't see other people having this problem.

Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (4.3 KiB)

Carlo,

I agree on the read/write change, although the Desktop is classed as a
System Folder and Windows may not allow that kind of a change. I will
continue to look into the matter.

As far as the location of the login file, I suggest you open this up to
allow changes using the Browse function to ensure the location is valid,
but leave a default should that not work.

Greg

On Sun, Sep 24, 2017 at 12:34 PM, Carlo Santucci <email address hidden>
wrote:

> Greg,
> the path of the logfile is within a hidden setting, and I don't know
> exactly how to change it, sorry.
> However it seems strange to me that you can't set your desktop to be
> read/write, because I don't see other people having this problem.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1718960
>
> Title:
> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
> is locked and cannot be opened)
>
> Status in Open Rails:
> New
>
> Bug description:
> Error: System.IO.IOException: The process cannot access the file
> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
> used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String
> maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
> bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> access, FileShare share, Int32 bufferSize, FileOptions options)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding, Int32 bufferSize)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding)
> at Orts.Common.FileTeeLogger.Write(String value) in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.
> Simulation\Common\ErrorLogger.cs:line 77
> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index, Int32
> count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
> at System.IO.TextWriter.WriteLine(String value)
> at System.IO.TextWriter.WriteLine(String format, Object arg0, Object
> arg1, Object arg2)
> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
> Object arg0, Object arg1, Object arg2)
> at ORTS.Settings.UserSettings.Log() in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
> settings, String[] args, Boolean appendLog) in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line
> 668
> at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass8.<Load>b__3()
> in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\
> RunActivity\Viewer3D\Processes\GameSt...

Read more...

Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (4.7 KiB)

Carlo,

New thought. Why is it the Error System is allowed to write to the file
but not the OR System? In looking at the Log File, the log stops at a
point and then the error is written.

Greg Davies

On Sun, Sep 24, 2017 at 1:06 PM, Greg Davies <email address hidden>
wrote:

> Carlo,
>
> I agree on the read/write change, although the Desktop is classed as a
> System Folder and Windows may not allow that kind of a change. I will
> continue to look into the matter.
>
> As far as the location of the login file, I suggest you open this up to
> allow changes using the Browse function to ensure the location is valid,
> but leave a default should that not work.
>
> Greg
>
> On Sun, Sep 24, 2017 at 12:34 PM, Carlo Santucci <email address hidden>
> wrote:
>
>> Greg,
>> the path of the logfile is within a hidden setting, and I don't know
>> exactly how to change it, sorry.
>> However it seems strange to me that you can't set your desktop to be
>> read/write, because I don't see other people having this problem.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1718960
>>
>> Title:
>> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
>> is locked and cannot be opened)
>>
>> Status in Open Rails:
>> New
>>
>> Bug description:
>> Error: System.IO.IOException: The process cannot access the file
>> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
>> used by another process.
>> at System.IO.__Error.WinIOError(Int32 errorCode, String
>> maybeFullPath)
>> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
>> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
>> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
>> bFromProxy)
>> at System.IO.FileStream..ctor(String path, FileMode mode,
>> FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
>> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding, Int32 bufferSize)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding)
>> at Orts.Common.FileTeeLogger.Write(String value) in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 77
>> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index,
>> Int32 count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
>> at System.IO.TextWriter.WriteLine(String value)
>> at System.IO.TextWriter.WriteLine(String format, Object arg0,
>> Object arg1, Object arg2)
>> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
>> Object arg0, Object arg1, Object arg2)
>> at ORTS.Settings.UserSettings.Log() in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
>> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
>> settings, String[] args, B...

Read more...

Revision history for this message
Carlo Santucci (carlosanit1) wrote :

Hi Greg,
I'm not able to reply to your question. However in the meantime I looked at the code, and can tell you how to customize the OpenRailsLog.txt folder. There is a possibility of creating an .ini file, but it should contain all OR options, and therefore I'd not recommend it. If instead you know how to create a Registry Key, go to HKEY_CURRENT_USER\Software\OpenRails\ORTS and add a new string key called LoggingPath where you insert the path you desire for your logging file. This on your own responsibility.

Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (4.3 KiB)

Carlo,

Thanks. I will give that a try.

Greg Davies

On Sun, Sep 24, 2017 at 3:37 PM, Carlo Santucci <email address hidden>
wrote:

> Hi Greg,
> I'm not able to reply to your question. However in the meantime I looked
> at the code, and can tell you how to customize the OpenRailsLog.txt folder.
> There is a possibility of creating an .ini file, but it should contain all
> OR options, and therefore I'd not recommend it. If instead you know how to
> create a Registry Key, go to HKEY_CURRENT_USER\Software\OpenRails\ORTS
> and add a new string key called LoggingPath where you insert the path you
> desire for your logging file. This on your own responsibility.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1718960
>
> Title:
> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
> is locked and cannot be opened)
>
> Status in Open Rails:
> New
>
> Bug description:
> Error: System.IO.IOException: The process cannot access the file
> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
> used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String
> maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
> bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> access, FileShare share, Int32 bufferSize, FileOptions options)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding, Int32 bufferSize)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding)
> at Orts.Common.FileTeeLogger.Write(String value) in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.
> Simulation\Common\ErrorLogger.cs:line 77
> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index, Int32
> count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
> at System.IO.TextWriter.WriteLine(String value)
> at System.IO.TextWriter.WriteLine(String format, Object arg0, Object
> arg1, Object arg2)
> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
> Object arg0, Object arg1, Object arg2)
> at ORTS.Settings.UserSettings.Log() in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
> settings, String[] args, Boolean appendLog) in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line
> 668
> at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass8.<Load>b__3()
> in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\
> RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 147
> at Orts.View...

Read more...

Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (4.6 KiB)

Carlo,

Worked like a champ. Thanks a bunch. I may download the latest code and
have a look to see if I can answer my own question.

Greg

On Sun, Sep 24, 2017 at 9:28 PM, Greg Davies <email address hidden>
wrote:

> Carlo,
>
> Thanks. I will give that a try.
>
> Greg Davies
>
> On Sun, Sep 24, 2017 at 3:37 PM, Carlo Santucci <email address hidden>
> wrote:
>
>> Hi Greg,
>> I'm not able to reply to your question. However in the meantime I looked
>> at the code, and can tell you how to customize the OpenRailsLog.txt folder.
>> There is a possibility of creating an .ini file, but it should contain all
>> OR options, and therefore I'd not recommend it. If instead you know how to
>> create a Registry Key, go to HKEY_CURRENT_USER\Software\OpenRails\ORTS
>> and add a new string key called LoggingPath where you insert the path you
>> desire for your logging file. This on your own responsibility.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1718960
>>
>> Title:
>> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
>> is locked and cannot be opened)
>>
>> Status in Open Rails:
>> New
>>
>> Bug description:
>> Error: System.IO.IOException: The process cannot access the file
>> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
>> used by another process.
>> at System.IO.__Error.WinIOError(Int32 errorCode, String
>> maybeFullPath)
>> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
>> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
>> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
>> bFromProxy)
>> at System.IO.FileStream..ctor(String path, FileMode mode,
>> FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
>> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding, Int32 bufferSize)
>> at System.IO.StreamWriter..ctor(String path, Boolean append,
>> Encoding encoding)
>> at Orts.Common.FileTeeLogger.Write(String value) in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 77
>> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index,
>> Int32 count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
>> at System.IO.TextWriter.WriteLine(String value)
>> at System.IO.TextWriter.WriteLine(String format, Object arg0,
>> Object arg1, Object arg2)
>> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
>> Object arg0, Object arg1, Object arg2)
>> at ORTS.Settings.UserSettings.Log() in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
>> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
>> settings, String[] args, Boolean appendLog) in
>> e:\Documents\Coding\Jenkins\jobs\Open Rails
>> Testing\workspace\Source\RunActivity\Viewer3D...

Read more...

Changed in or:
status: New → Invalid
Revision history for this message
Greg Davies (greg.b.davies) wrote :
Download full text (3.8 KiB)

Carlo,

I just tried to update from 3951 to 3955 and got this. Clues?

[image: Inline image 1]

Greg Davies

On Fri, Sep 29, 2017 at 2:59 PM, Carlo Santucci <email address hidden>
wrote:

> ** Changed in: or
> Status: New => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1718960
>
> Title:
> System.IO.IOException at Orts.Common.FileTeeLogger.Write (Logging file
> is locked and cannot be opened)
>
> Status in Open Rails:
> Invalid
>
> Bug description:
> Error: System.IO.IOException: The process cannot access the file
> 'C:\Users\Train Simulator\Desktop\OpenRailsLog.txt' because it is being
> used by another process.
> at System.IO.__Error.WinIOError(Int32 errorCode, String
> maybeFullPath)
> at System.IO.FileStream.Init(String path, FileMode mode, FileAccess
> access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
> FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
> bFromProxy)
> at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
> access, FileShare share, Int32 bufferSize, FileOptions options)
> at System.IO.StreamWriter.CreateFile(String path, Boolean append)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding, Int32 bufferSize)
> at System.IO.StreamWriter..ctor(String path, Boolean append,
> Encoding encoding)
> at Orts.Common.FileTeeLogger.Write(String value) in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\Orts.
> Simulation\Common\ErrorLogger.cs:line 77
> at Orts.Common.FileTeeLogger.Write(Char[] buffer, Int32 index, Int32
> count) in e:\Documents\Coding\Jenkins\jobs\Open Rails
> Testing\workspace\Source\Orts.Simulation\Common\ErrorLogger.cs:line 85
> at System.IO.TextWriter.WriteLine(String value)
> at System.IO.TextWriter.WriteLine(String format, Object arg0, Object
> arg1, Object arg2)
> at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
> Object arg0, Object arg1, Object arg2)
> at ORTS.Settings.UserSettings.Log() in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\ORTS.Settings\UserSettings.cs:line 468
> at Orts.Viewer3D.Processes.GameStateRunActivity.InitLogging(UserSettings
> settings, String[] args, Boolean appendLog) in e:\Documents\Coding\Jenkins\jobs\Open
> Rails Testing\workspace\Source\RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line
> 668
> at Orts.Viewer3D.Processes.GameStateRunActivity.<>c__DisplayClass8.<Load>b__3()
> in e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\
> RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 147
> at Orts.Viewer3D.Processes.GameStateRunActivity.Load() in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\
> RunActivity\Viewer3D\Processes\GameStateRunActivity.cs:line 190
> at Orts.Viewer3D.Processes.LoaderProcess.Load() in
> e:\Documents\Coding\Jenkins\jobs\Open Rails Testing\workspace\Source\
> RunActivity\Viewer3D\Processes\LoaderProcess.cs:line 158
> at Orts.Viewer3D.Processes.LoaderProcess....

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.