This error happened when I started my laptop from hibernation. I hibernate most nights and often have WinSCP running, never had this happen until now (track record of 5+ years on multiple machines).
I recently updated from Windows 10 to Windows 11 (regular upgrade through Windows Update).
When starting after hibernation, the computer recognized wrongly my external screen - instead of showing 4K output, it seemed to downgrade to 1080p or lower, and Windows seemed to briefly change the zoom (I have 100% set to all known screens, it seemed to enlarge UI to higher zoom value). It was in the weird state for couple of seconds only, then I reconnected the screen and all went normal, except WinSCP throwing this error twice.
The system is running many programs with many windows, using about 22 GB RAM out of 32 GB. Last full restart was 15 days ago, WinSCP could have been running about that long, with hibernation happening most nights (usually it just reconnects the active tab when the computer wakes up).
The error box showed up twice (with identical stack trace), presumably because there were two connected tabs (more open, but the ones I haven't used in some time / since previous hibernation disconnected, showing the faded screen icon) prior to hibernation (but could be a coincidence). WinSCP reconnected the active tab and seems to be working. I restarted WinSCP without further problems (no issues before restart, but I feel safer restarting the program after memory error).
Log from the error message:
WinSCP 5.19.6
Error message:
Invalid access to memory.
Stack trace:
(00097F7F) ntdll.dll
(000761E1) ntdll.dll.KiUserExceptionDispatcher
(0046EC21) Customdriveview::_16446
(0046ECB0) Customdriveview::TCustomDriveView::IterateSubTree
(0048120E) Driveview::TDriveView::ValidateDirectoryEx
(0046E941) Customdriveview::TCustomDriveView::ValidateDirectory
(00256E6B) Vcl::Extctrls::TTimer::Timer
(003C7B64) System::Classes::_18201
(00046C90) USER32.dll
(00026145) USER32.dll
(00024A73) USER32.dll
(000245AB) USER32.dll.DispatchMessageW
The problem happens rarely. I cannot reproduce it.