Topic ".tmp file handle issue causing exception in WinSCPnet!WinSCP.SessionLogReader.OpenLog()"

Author Message
[View user's profile]

Joined: 2016-05-24
Posts: 3
WinSCP automation 5.7.5 (need .NET 4.5.2)

Exceptions occur randomly which seems to be related to how WinSCP handle .tmp file handles internally.
Is this a known issue? Can you handle this in another way? (with .NET 4.5.2 support)

Handle.exe C:\Users\username\AppData\Local\Temp
Indicate that it is WinSCP.exe itself that is keeping the files here locked. (no other applications, Antivirus etc)
WinSCP.exe pid: 1234 type: File 3A0: C:\Users\username\AppData\Local\Temp\wscp0123.01234567.tmp
WinSCP.exe pid: 2345 type: File 3D0: C:\Users\username\AppData\Local\Temp\wscp089A.BCDEF012.tmp

0000000011D1D7F0 00000003800551a0 System.String The process cannot access the file '{0}' because it is being used by another process.
0000000011D1D940 0000000080128da0 System.String C:\Users\username\AppData\Local\Temp\wscp0123.01234567.tmp

Relevant frames in call stack with issue:
19 KERNELBASE!RaiseException
1a clr!RaiseTheExceptionInternalOnly
1b clr!IL_Throw
1c mscorlib_ni!System.IO.__Error.WinIOError(Int32, System.String)
1d mscorlib_ni!System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
1e mscorlib_ni!System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean)
1f mscorlib_ni!System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare)
20 WinSCPnet!WinSCP.SessionLogReader.OpenLog()
21 WinSCPnet!WinSCP.SessionLogReader.DoRead()
22 WinSCPnet!WinSCP.SessionLogReader.Read(WinSCP.LogReadFlags)
23 WinSCPnet!WinSCP.SessionElementLogReader.Read(WinSCP.LogReadFlags)
24 WinSCPnet!WinSCP.CustomLogReader.WaitForNonEmptyElementAndCreateLogReader(System.String, WinSCP.LogReadFlags)
25 WinSCPnet!WinSCP.Session.Open(WinSCP.SessionOptions)
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24755
Location: Prague, Czechia
I believe you have reported this over an email already. Though the error was different.

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License