Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Saqib wrote:

Do you still think there is no connection between the starting of service to start WinsCP.

There's no connection apparent from your report. Do you have any reason to believe there is a connection?
Saqib

The issue is because of this Kernel issue the service to initiate the WinSCP is not starting at all. If we force to restart the service, we are getting these errors.

Do you still think there is no connection between the starting of service to start WinsCP.
martin

Re: KERNELBASE crash in Windows 10 64bit command line

Saqib wrote:

Hi Martin,

I am also facing same issue in Windows 10
Faulting application name: AutoUpdationService.exe, version: 1.0.0.0, time stamp: 0x5ab1103d
Faulting module name: KERNELBASE.dll, version: 10.0.16299.309, time stamp: 0xd3aa915c

Sorry, I do not see any relation to WinSCP here.
Saqib

KERNELBASE crash in Windows 10 64bit command line

Hi Martin,

I am also facing same issue in Windows 10
Faulting application name: AutoUpdationService.exe, version: 1.0.0.0, time stamp: 0x5ab1103d
Faulting module name: KERNELBASE.dll, version: 10.0.16299.309, time stamp: 0xd3aa915c
Exception code: 0xe0434352
Fault offset: 0x001008f2
Faulting process id: 0x305c
Faulting application start time: 0x01d3c3704d0529b8
Faulting application path: I:\AutoUpdationService\AutoUpdationService\bin\Release\AutoUpdationService.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: b838ba69-a045-415e-ab75-c347694c65e6
Faulting package full name:
Faulting package-relative application ID:
martin

Re: KERNELBASE crash in Windows Server 2008R2 64bit command line

Chuck K wrote:

I'm getting a similar error. Has there been a solution for this? This is a Windows Server 2008R2 as well. After re-booting the server, the process will work for a few days and then produce this error:
...

You are using 11 years old version of WinSCP. We cannot provide a support for that. Please upgrade.
Chuck K

Re: KERNELBASE crash in Windows Server 2008R2 64bit command line

dmch2 wrote:

I've written a windows service that is currently undergoing testing which calls WinSCP 4.2.8 (818) in command line mode with a configuration script every 30 seconds to check for new files on a remote server.
...

I'm getting a similar error. Has there been a solution for this? This is a Windows Server 2008R2 as well. After re-booting the server, the process will work for a few days and then produce this error:
Faulting application name: WinSCP3.exe, version: 3.8.1.328, time stamp: 0x00000000
Faulting module name: KERNELBASE.dll, version: 6.1.7601.19045, time stamp: 0x56258f05
Exception code: 0x0eedfade
Fault offset: 0x0000c42d
Faulting process id: 0x5926c
Faulting application start time: 0x01d2c41917fbef6e
Faulting application path: c:\Progra~2\WinSCP3\WinSCP3.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 55aadbae-300c-11e7-90f2-d89d671b3ec0

Any ideas would be great.
martin

Sebt wrote:

or do I also need to send you an email for a debugging version of WinSCP ?

Yes, please.
Sebt

Hi,

We also have this kind of error. Do you have found how to fix this or do I also need to send you an email for a debugging version of WinSCP ?

Thanks.

Best,
Sebastien.
martin

Re: BEX. winscp vers. 5.5.1.3970, Fehlermodulname: CFGMGR32.dll

kaminskipodinski wrote:

yes. Do you need further informations?

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
kaminskipodinski

Re: BEX. winscp vers. 5.5.1.3970, Fehlermodulname: CFGMGR32.dll

martin wrote:

Does this mean that the log ends like shown above? No further progress?

yes. Do you need further informations?
martin

Re: BEX. winscp vers. 5.5.1.3970, Fehlermodulname: CFGMGR32.dll

kaminskipodinski wrote:

log-file:
.2014-08-03 03:00:00.593 Looking up host "www.www.www"
.2014-08-03 03:00:00.609 Connecting to ip-Adresse port 12522
.2014-08-03 03:00:00.656 Server version: SSH-2.0-OpenSSH_5.5p1
.2014-08-03 03:00:00.656 Using SSH protocol version 2
.2014-08-03 03:00:00.656 We claim version: SSH-2.0-WinSCP_release_5.5.1
.2014-08-03 03:00:00.671 Doing Diffie-Hellman group exchange
.2014-08-03 03:00:00.734 Doing Diffie-Hellman key exchange with hash SHA-256

thanks for your help.
regards

Does this mean that the log ends like shown above? No further progress?
kaminskipodinski

BEX. winscp vers. 5.5.1.3970, Fehlermodulname: CFGMGR32.dll

Hello,
I've written a windows service that is currently undergoing testing which calls WinSCP 5.5.1 in command line mode with a configuration script every night to check for new files on a remote server.
Server: Windows 7 Servicepack 1
the configuration script is:
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open sftp://www.www.wwww/ -hostkey="ssh-rsa 2048 ..."
# Connect
open sftp://www.www.wwww/ -hostkey="ssh-rsa 2048 ..."
# Change remote directory
pwd
echo
# Force binary mode transfer
option transfer binary
# Download file to the local directory c:\
# Synchronisieren der Verzeichnisse mit der Filemask alle csv-Dateien die nicht älter sind als ein Tag
synchronize both \\server\files\ /out -filemask="*.* |<2D"
 
# When the first parameter is local, changes from remote directory are applied to local directory.
# When the first parameter is remote, changes from the local directory are applied to the remote directory.
# When the first parameter is both, both local and remote directories can be modified.
 
synchronize local \\server\files\ /out -filemask="*.* |<2D"
 
# Disconnect
close
# Exit WinSCP
exit

log-file:
.2014-08-03 03:00:00.593 Looking up host "www.www.www"
.2014-08-03 03:00:00.609 Connecting to ip-Adresse port 12522
.2014-08-03 03:00:00.656 Server version: SSH-2.0-OpenSSH_5.5p1
.2014-08-03 03:00:00.656 Using SSH protocol version 2
.2014-08-03 03:00:00.656 We claim version: SSH-2.0-WinSCP_release_5.5.1
.2014-08-03 03:00:00.671 Doing Diffie-Hellman group exchange
.2014-08-03 03:00:00.734 Doing Diffie-Hellman key exchange with hash SHA-256

thanks for your help.
regards
martin

Re: Win Server 2008 R2 Foundation 64-Bit

heli wrote:

Any idea how I could further drill down this problem? Debug version?

Thanks for your report.
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
heli

Win Server 2008 R2 Foundation 64-Bit

Hi,

I have a similar problem like the postes above. I have a script that syncs data to my website every 10 minutes. In principle that works perfect, but every few hours WinSCP crashes when negotiating or after negotation the TLS connection... I have also upgraded WinSCP but that did not help. Windows throws the following output (unfortunately it's in German):
Problemsignatur:

  Problemereignisname:   APPCRASH
  Anwendungsname:   WinSCP.exe
  Anwendungsversion:   5.5.3.4214
  Anwendungszeitstempel:   00000000
  Fehlermodulname:   WinSCP.exe
  Fehlermodulversion:   5.5.3.4214
  Fehlermodulzeitstempel:   00000000
  Ausnahmecode:   c0000005
  Ausnahmeoffset:   00461697
  Betriebsystemversion:   6.1.7601.2.1.0.16.33
  Gebietsschema-ID:   3079
  Zusatzinformation 1:   0a9e
  Zusatzinformation 2:   0a9e372d3b4ad19135b953a78882e789
  Zusatzinformation 3:   0a9e
  Zusatzinformation 4:   0a9e372d3b4ad19135b953a78882e789


Any idea how I could further drill down this problem? Debug version?

Thanks for your support - WinSCP is really great!

Helmut
martin

karaszmiklos wrote:

Time to time winscp.com exit with -1073741819 (0xc0000005)
Winscp.com runs from powershell from a daily scheduled task. This issue occures 1 or 2 times in a month.
Older versions of winscp produced the same, but as i remember they dont produced any output or logfiles in that case. No i'm on latest stable with some logs.

Thanks for your report.
I have sent you an email with a debug version of WinSCP to address you have used to register on this forum.
karaszmiklos

Hi,

Time to time winscp.com exit with -1073741819 (0xc0000005)
Winscp.com runs from powershell from a daily scheduled task. This issue occures 1 or 2 times in a month.
Older versions of winscp produced the same, but as i remember they dont produced any output or logfiles in that case. No i'm on latest stable with some logs.
Enviroment detailed in these.
Triggering the task right after the issue it is always working without any error.
Winscp is not installed, just extracted from the portable zipped version.
Logs refers winscp.exe in spite the powershell script calls wiscp.com:
relevant fragment from main.ps1:
$winscpScriptFile = "$($ini.Log.Path)\$DateTimeFix"+"_WinSCP.in.txt"
$winscpScriptStr | Out-File -FilePath:"$winscpScriptFile" -Encoding:"ASCII"
# Execute script
Write-Output "$(Get-Date -Format:s)`tWinSCP: Running script:$winscpScriptFile"
$winscpConsole = .\WinSCP.com /script="$winscpScriptFile" log="$($ini.Log.Path)\$($DateTimeFix)_WinSCP.log.txt" 2>&1
$WinSCP_exitcode = $LASTEXITCODE
$winscpOutfile="$($ini.Log.Path)\$DateTimeFix"+"_WinSCP.out.txt"

Is there any workaround to avoid this kind of issue?

Please note that sensitive information has been asterisked in the logs:
Event log:
Log Name: Application
Source: Application Error
Date: 1/27/2014 7:15:03 AM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User: N/A
Computer: *******
Description:
Faulting application name: WinSCP.exe, version: 5.5.0.3839, time stamp: 0x00000000
Faulting module name: CFGMGR32.dll, version: 6.1.7601.17621, time stamp: 0x4ddb8851
Exception code: 0xc0000005
Fault offset: 0x0000125d
Faulting process id: 0x232c
Faulting application start time: 0x01cf1b271ce9271b
Faulting application path: C:\Management\CognosSFTPinterface\WinSCP.exe
Faulting module path: C:\Windows\syswow64\CFGMGR32.dll
Report Id: 5b378fc0-871a-11e3-990f-842b2b54b750

Winscp log:
. 2014-01-27 07:15:02.614 --------------------------------------------------------------------------
. 2014-01-27 07:15:02.614 WinSCP Version 5.5.0 (Build 3839) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Standard)
. 2014-01-27 07:15:02.614 Configuration: C:\Management\CognosSFTPinterface\WinSCP.ini
. 2014-01-27 07:15:02.614 Local account: ******
. 2014-01-27 07:15:02.614 Working directory: C:\Management\CognosSFTPinterface
. 2014-01-27 07:15:02.614 Process ID: 9004
. 2014-01-27 07:15:02.614 Command-line: "C:\Management\CognosSFTPinterface\WinSCP.exe" /console=550 /consoleinstance=_6904_392 "/script=Log\20140127-071500_WinSCP.in.txt" "/log=Log\20140127-071500_WinSCP.log.txt"
. 2014-01-27 07:15:02.614 Time zone: Current: GMT+1, Standard: GMT+1, DST: GMT+2, DST Start: 3/30/2014, DST End: 10/26/2014
. 2014-01-27 07:15:02.614 Login time: Monday, January 27, 2014 7:15:02 AM
. 2014-01-27 07:15:02.614 --------------------------------------------------------------------------
. 2014-01-27 07:15:02.614 Script: Retrospectivelly logging previous script records:
> 2014-01-27 07:15:02.614 Script: option batch on
< 2014-01-27 07:15:02.614 Script: batch           on       
> 2014-01-27 07:15:02.614 Script: option confirm off
< 2014-01-27 07:15:02.614 Script: confirm         off       
> 2014-01-27 07:15:02.614 Script: option echo on
< 2014-01-27 07:15:02.614 Script: echo            on       
> 2014-01-27 07:15:02.614 Script: open "*************************************"
< 2014-01-27 07:15:02.614 Script: open "************************************"
. 2014-01-27 07:15:02.614 --------------------------------------------------------------------------
. 2014-01-27 07:15:02.614 Session name: ************************************ (Site)
. 2014-01-27 07:15:02.614 Host name: ************************************ (Port: 22)
. 2014-01-27 07:15:02.614 User name: ******* (Password: Yes, Key file: No)
. 2014-01-27 07:15:02.614 Tunnel: No
. 2014-01-27 07:15:02.614 Transfer Protocol: SFTP (SCP)
. 2014-01-27 07:15:02.614 Ping type: -, Ping interval: 30 sec; Timeout: 600 sec
. 2014-01-27 07:15:02.614 Proxy: none
. 2014-01-27 07:15:02.614 Send buffer: 262144
. 2014-01-27 07:15:02.614 SSH protocol version: 2; Compression: No
. 2014-01-27 07:15:02.614 Bypass authentication: No
. 2014-01-27 07:15:02.614 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2014-01-27 07:15:02.614 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2014-01-27 07:15:02.614 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2014-01-27 07:15:02.614 Simple channel: Yes
. 2014-01-27 07:15:02.614 Return code variable: Autodetect; Lookup user groups: A
. 2014-01-27 07:15:02.614 Shell: default
. 2014-01-27 07:15:02.614 EOL: 0, UTF: 2
. 2014-01-27 07:15:02.614 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2014-01-27 07:15:02.614 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2014-01-27 07:15:02.614 SFTP Bugs: A,A
. 2014-01-27 07:15:02.614 SFTP Server: default
. 2014-01-27 07:15:02.614 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2014-01-27 07:15:02.614 Cache directory changes: Yes, Permanent: Yes
. 2014-01-27 07:15:02.614 DST mode: 1; Timezone offset: 0h 0m
. 2014-01-27 07:15:02.614 --------------------------------------------------------------------------
. 2014-01-27 07:15:02.614 Looking up host "****.****.com"
. 2014-01-27 07:15:02.614 Connecting to ***.***.10.60 port 22
. 2014-01-27 07:15:02.692 Server version: SSH-2.0-1.82_sshlib GlobalSCAPE
. 2014-01-27 07:15:02.692 Using SSH protocol version 2
. 2014-01-27 07:15:02.692 We claim version: SSH-2.0-WinSCP_release_5.5
. 2014-01-27 07:15:02.723 Doing Diffie-Hellman group exchange
. 2014-01-27 07:15:02.942 Doing Diffie-Hellman key exchange with hash SHA-1

Winscp.com console output:
batch           on        

confirm         off       
echo            on       
open "********************************"
Searching for host...
Connecting to host...
scheduled task config:

Scheduled task config:
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.3" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Date>2012-10-25T18:57:50.597961</Date>
    <Author>****************</Author>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2012-10-25T07:15:00</StartBoundary>
      <Enabled>true</Enabled>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>*************DOMAIN*********\*******UserName*********</UserId>
      <LogonType>Password</LogonType>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <RunOnlyIfIdle>false</RunOnlyIfIdle>
    <DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession>
    <UseUnifiedSchedulingEngine>false</UseUnifiedSchedulingEngine>
    <WakeToRun>false</WakeToRun>
    <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>main.cmd</Command>
      <Arguments>&gt; main.out</Arguments>
      <WorkingDirectory>c:\Management\CognosSFTPinterface\</WorkingDirectory>
    </Exec>
  </Actions>
</Task>
martin

Re: WinSCP Crash Version 4.3.7.1679

pintoocool wrote:

No we didn't tried it. Is fix available in the new version of WinSCP ? Is it compatible with 64 bit windows Machine.

I do not know what problem this is, so I cannot tell if upgrade helps for sure. But we do not support 4.x anymore. And yes, the latest version works on 64-bit.
pintoocool

Re: WinSCP Crash Version 4.3.7.1679

No we didn't tried it. Is fix available in the new version of WinSCP ? Is it compatible with 64 bit windows Machine.
martin

Re: WinSCP Crash Version 4.3.7.1679

pintoocool wrote:

We are facing an regular crash of WinSCP 4.3.7.1679 version on Windows Server 2008 R2 Enterprise 64 bit system:

Are you able to reproduce the problem with a latest version of WinSCP?
pintoocool

WinSCP Crash Version 4.3.7.1679

Hi,

We are facing an regular crash of WinSCP 4.3.7.1679 version on Windows Server 2008 R2 Enterprise 64 bit system:
Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: WinSCP.exe
P2: 4.3.7.1679
P3: 00000000
P4: KERNELBASE.dll
P5: 6.1.7601.17965
P6: 506dbe50
P7: 0eedfade
P8: 0000c41f
P9:
P10:

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_WinSCP.exe_d434a9ab16ecc6f40c958def68b5d32c0d287b_c274666f

Analysis symbol:
Rechecking for solution: 0
Report Id: 7aba6be9-27da-11e3-85ab-0017a4778034
Report Status: 4

This issue has happened from last 4 times and every time after reinstallation it works fine. But we need permanent solution for it. So would request you to suggest on the failure and solution to overcome it.
martin

Re: same problem

jsalvadorvega05 wrote:

I'm working with 4.2.8.818.Which is the version which I can try to fix this issue?..

Make sure you use the latest version of WinSCP. We cannot and do not support such ancient versions.
jsalvadorvega05

Re: same problem

Hello,

I'm working with 4.2.8.818.Which is the version which I can try to fix this issue?..

I received events like these:
Faulting application name: WinSCP.exe, version: 4.2.8.818, time stamp: 0x00000000
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18015, time stamp: 0x50b83c8a
Exception code: 0x0eedfade
Fault offset: 0x0000c41f
Faulting process id: 0x5f84
Faulting application start time: 0x01ceb2833ed3baaa
Faulting application path: C:\Program Files (x86)\WinSCP\WinSCP.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: 80fd73f8-1e76-11e3-87ee-005056a10012
martin

Re: Unable to connect

kvikdev wrote:

I managed to start sshd by changing the compatibility mode to Win 2003 SP 1. But when I try to connect using ssh user@hostname it refuses connection. I see below error in windows event logs:
...

This is WinSCP forum. As you seem to have problems with your SSH server, please contact its vendor support.
kvikdev

Unable to connect

I managed to start sshd by changing the compatibility mode to Win 2003 SP 1. But when I try to connect using ssh user@hostname it refuses connection. I see below error in windows event logs:
Faulting application name: sshd.exe, version: 0.0.0.0, time stamp: 0x4084343f
Faulting module name: kernel32.dll, version: 6.1.7601.18015, time stamp: 0x50b83c89
Exception code: 0xc0000005
Fault offset: 0x0003d20e
Faulting process id: 0x2158
Faulting application start time: 0x01cea7ee6e00cafd
Faulting application path: C:\OpenSSH\usr\sbin\sshd.exe
Faulting module path: C:\Windows\syswow64\kernel32.dll
Report Id: ac7c4e3d-13e1-11e3-9811-005056b81df4

Can someone help. I am trying to make this work on WIN 2008 R2.

Thanks
martin

Re: same problem

James.read1 wrote:

hi i have the same problem, is there a fix/software version i need?

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
James.read1

same problem

hi i have the same problem, is there a fix/software version i need?

regards

James
eburgues

I solved

Thank's prikryl but I have already found the solution.

The cause of the service hang appears to be panda antivirus. I disabled it and now the service works fine.

Enric
martin

Re: Same problem

eburgues wrote:

I'm using Windows Server 2003 Standard Edition SP2
...

The same:

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
eburgues

Same problem

Hello,

I have the same problem exposed by dmch2

I'm using Windows Server 2003 Standard Edition SP2

This is my script:
open SAP_MDLW_PRODUCCIO
cd /interficies/AR/SAP_MDLWAR/DE_SAP_A_MDLWAR
lcd C:\Bustia_SAP_MDLW\Entrada
bin
option confirm off
get *xml
exit

I use 4.3.5 WinSCP version compilation 1463.
It runs perfectly but it crashes randomly once per day. WinSCP process don't terminates.
I terminate it from Windows Task Manager.
I terminate too my windows service. But until I restart the computer, I can start again my windows service
martin

Stoned_Sun wrote:

I have the same problem... What is it / how can it be fixed??

Can you send me an email, so I can send you back a debug version of WinSCP to track the problem? Please include link back to this topic in your email. Also note in this topic that you have sent the email. Thanks.

You will find my address (if you log in) in my forum profile.
Stoned_Sun

Guys,

I have the same problem... What is it / how can it be fixed??
dmch2

Re: KERNELBASE crash in Windows Server 2008R2 64bit command line

Many thanks. It failed straight away this time and I've sent you the log files (console.log and WinSCPxxxxxtrace.log)

They're only 1KB so I didn't think it was worth compressing them! :)
martin

Re: KERNELBASE crash in Windows Server 2008R2 64bit command line

I have sent you an email.
dmch2

KERNELBASE crash in Windows Server 2008R2 64bit command line

Hi,

I've written a windows service that is currently undergoing testing which calls WinSCP 4.2.8 (818) in command line mode with a configuration script every 30 seconds to check for new files on a remote server.

I'm using Windows Server 2008R2 64bit.

I can connect fine via the UI and it reports the protocol as being:
Session Protocol: SSH-2
SSH Implementation: OpenSSH_5.6
Encryption algorithm: aes
Compression: No
File transfer protocol: SFTP-3

The configuration script (I've anonymised the user, server and local path) is:
option batch on
option confirm off
open sftp://USER:SERVER:4522 -implicit -passive
lcd "\\UNC PATH"
cd outgoing
get -delete *.xml
exit

Everything ran perfectly for several days (correctly transferring files etc) before WinSCP reported an error (via the return code) and apparently outputted the script file as an error message (I capture the output and email it in case of errors) and logged the following in the event log:
Faulting application name: WinSCP.exe, version: 4.2.8.818, time stamp: 0x00000000
Faulting module name: CFGMGR32.dll, version: 6.1.7600.16385, time stamp: 0x4a5bd9a6
Exception code: 0xc0000005
Fault offset: 0x00001295
Faulting process id: 0x703c
Faulting application start time: 0x01cb6684aaf44022
Faulting application path: C:\Program Files (x86)\WinSCP\WinSCP.exe
Faulting module path: C:\Windows\syswow64\CFGMGR32.dll
Report Id: e909b374-d277-11df-a8c9-005056be39cf

Every subsequent attempt by the service resulted in no output message and an event log entry referring to KERNELBASE.dll:
Faulting application name: WinSCP.exe, version: 4.2.8.818, time stamp: 0x00000000
Faulting module name: KERNELBASE.dll, version: 6.1.7600.16385, time stamp: 0x4a5bdbdf
Exception code: 0x0eedfade
Fault offset: 0x0000b727
Faulting process id: 0x20244
Faulting application start time: 0x01cb6685ad7d3f82
Faulting application path: C:\Program Files (x86)\WinSCP\WinSCP.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: ebb6761a-d278-11df-a8c9-005056be39cf

I restarted the service and after a few minutes started getting the KERNELBASE error again.

Please can you advise as to what might be going on and how to fix the issue? or how I can investigate further?

Many thanks
Dave