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

NottaSmartMan

I can make WinSCP handle it more gracefully, but you should not have a filename with FFFF character in the first place

Couldn't agree more, but unfortunately, I have no control over the new and creative ways end users find to break things. I couldn't even begin to guess how they managed to pull this one off.
martin

So it's not the Chinese character, but the two FFFF characters that precede it. FFFF is not a valid character:
https://www.fileformat.info/info/unicode/char/ffff/index.htm
I can make WinSCP handle it more gracefully, but you should not have a filename with FFFF character in the first place.
NottaSmartMan

Attached is a zip file containing the odd file in case it helps. I was able to edit the contents to just say "Test", but keep the filename the same.
NottaSmartMan

Here you go
martin

Re: Interesting Error: Error parsing session log file

Thanks for your report. Though I cannot reproduce the problem.

Please attach a full session and debug log files showing the problem (using the latest version of WinSCP).

Use Session.SessionLogPath and Session.DebugLogPath.
NottaSmartMan

Interesting Error: Error parsing session log file

I ran across a nutty problem today when using SynchronizeDirectories (PowerShell) to sync up a folder. I ran across a file with a name of just a chinese (?) character of 쥹.

WinSCP replicated it like a champ, but then threw an error updating a log file. Any idea how to work around this?

The error in the debug log is:
[2024-11-04 18:04:07.179] [0009]     SessionLogReader.Read leaving

[2024-11-04 18:04:07.179] [0009]     ElementLogReader.Dispose(upload@2) entering
[2024-11-04 18:04:07.179] [0009]       ElementLogReader.ReadToEnd(upload@2) entering
[2024-11-04 18:04:07.179] [0009]         SessionLogReader.Read entering
[2024-11-04 18:04:07.179] [0009]           Opening log without write sharing
[2024-11-04 18:04:07.180] [0009]           Opening log with write sharing
[2024-11-04 18:04:07.180] [0009]           Log opened
[2024-11-04 18:04:07.180] [0009]           Can seek = True
[2024-11-04 18:04:07.180] [0009]           Read 1390 bytes from log
[2024-11-04 18:04:07.180] [0009]           Skipping 24 nodes
[2024-11-04 18:04:07.180] [0009]           Closing log
[2024-11-04 18:04:07.181] [0009]           Log contents has not changed
[2024-11-04 18:04:07.397] [0009]           Exception: WinSCP.SessionLocalException: Error parsing session log file
 ---> System.Xml.XmlException: '￿', hexadecimal value 0xFFFF, is an invalid character. Line 13, position 83.
   at System.Xml.XmlTextReaderImpl.Throw(Exception e)
   at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
   at System.Xml.XmlTextReaderImpl.ParseAttributeValueSlow(Int32 curPos, Char quoteChar, NodeData attr)
   at System.Xml.XmlTextReaderImpl.ParseAttributes()
   at System.Xml.XmlTextReaderImpl.ParseElement()
   at System.Xml.XmlTextReaderImpl.ParseElementContent()
   at WinSCP.SessionLogReader.DoRead()
   --- End of inner exception stack trace ---