Interesting Error: Error parsing session log file

Advertisement

NottaSmartMan
Joined:
Posts:
39

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 ---
  • ParseError.png (75.48 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,454
Location:
Prague, Czechia

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.

Reply with quote

NottaSmartMan
Joined:
Posts:
39

Here you go
  • Sample 1 2024-11-08_20-48-46.log (342.67 KB, Private file)
  • debug 2024-11-08_20-48-46.log (192.68 KB, Private file)
  • ConsoleLog_2024-11-08_20-48-35 2024-11-08_20-48-46.log (5.56 KB, Private file)

Reply with quote

NottaSmartMan
Joined:
Posts:
39

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.
  • FileWithOddName.zip (202 Bytes, Private file)

Reply with quote

Advertisement

NottaSmartMan
Joined:
Posts:
39

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.

Reply with quote

Advertisement

You can post new topics in this forum