Error, when closing tabs too fast : "List index out of bounds (-1)"

Advertisement

me2
Joined:
Posts:
3

Error, when closing tabs too fast : "List index out of bounds (-1)"

I'd just like to give some details about some errors which I reported a few moments ago.

WinSCP version: 6.5 and 6.5.6.
System: Window 10
Transfer Protocl: SFTP
Reproduction steps:
(I don't know which of the steps below are really relevant for the issue)
  1. Set WinSCP to commander mode (not sure if this is needed).
  2. In the Login dialogue create a new folder (not sure if this is needed).
  3. Save 7 SFTP sessions to similar IPv4-Adresses in that folder, with password stored.
  4. Right click the new folder and select open, to open the 7 tabs for the 7 sessions.
  5. Click at each tab and let WinSCP connect to the server and display the folder.
  6. Hover with the mouse over the close-button (x) of the left-most tab. Now left-click very fast at least 7 time at the close-button.
  7. Error window appears: "List index out of bounds (-1)", Content:
    Stack trace:
    (00B8C039) _winscp_query
    (0008822F) ntdll.dll
    (00074711) ntdll.dll.KiUserExceptionDispatcher
    (00C9D7C1) TSecureShell::EventSelectLoop
    (00C9C0FC) TSecureShell::Close
    (00CF1F87) TSFTPFileSystem::Close
    (000CA38F) TTerminalManager::FreeActiveTerminal
    (00BB2D62) TThemePageControl::Dispatch
    (003A356D) Vcl::Controls::TWinControl::WndProc
    (003A2A78) Vcl::Controls::TWinControl::MainWndProc
    (00204C90) System::Classes::_18364
    (00040C09) USER32.dll
    (000372C5) USER32.dll
    (000369F1) USER32.dll.GetSystemMetricsForDpi
    (000351F6) USER32.dll.CallWindowProcW
    (00539473) Dragdrop::TDragDrop::WndMethod
    (00204C90) System::Classes::_18364
    (00040C09) USER32.dll
    (000372C5) USER32.dll
    (00035B6B) USER32.dll
    (0003569B) USER32.dll.DispatchMessageW

    (001EADF3) System::Classes::TList::Get
    (001EADF3) System::Classes::TList::Get
    (000CA38F) TTerminalManager::FreeActiveTerminal
    (00BB2D62) TThemePageControl::Dispatch
    (003A356D) Vcl::Controls::TWinControl::WndProc
    (003A2A78) Vcl::Controls::TWinControl::MainWndProc
    (00204C90) System::Classes::_18364
    (00040C09) USER32.dll
    (000372C5) USER32.dll
    (000369F1) USER32.dll.GetSystemMetricsForDpi
    (000351F6) USER32.dll.CallWindowProcW
    (00539473) Dragdrop::TDragDrop::WndMethod
    (00204C90) System::Classes::_18364
    (00040C09) USER32.dll
    (000372C5) USER32.dll
    (00035B6B) USER32.dll
    (0003569B) USER32.dll.DispatchMessageW

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
42,885
Location:
Prague, Czechia

Re: Error, when closing tabs too fast : "List index out of bounds (-1)"

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

Reply with quote

me2
Joined:
Posts:
3

I had received the mail from Martin and I have downloaded the test version.
Unfortunately I was very busy, and also out of the office where I had notices this issue, and didn't have time to try it out yet. I hope I can do that next Tuesday or Wednesday.

Side note: So far, after the post from Martin I somehow wasn't able to reply to this post, as the server always rejected my post without further explanation and just responding: "Sorry, your post was not accepted."

Edit: It seems this was due to a third-party cookie which was blocked on my side.

Reply with quote

me2
Joined:
Posts:
3

Was able to test now

Now I had time to test.


First I made sure I can still reproduce the error with 6.5.6 installed. I did this with 6 tabs. Error is still exactly the same.


Then I have tested now your version:
6.6.2 (Debug Build 17327 2026-05-13) - Do NOT distribute
Before I came close to testing I got an assertion window:
Error
Assertion failure (C:\misto\buildserver\storage\work\build32\source\packages\filemng\CustomDir\View.pas, line 2349)
In the beginning of my test I could reproduce this error frequently. In the first test this was the seconds last tab (2nd from right), in another test the last (right most) tab, and in another it was the first local folder tab. Once it happened it always reappeared when switching between tabs and selecting a certain tab with that issue.

I first got the impression that it might have to do something with one or more of the following:
- closing the login screen in the beginning, so a local tab appears, and then opening 6 connections
- when clicking each tab to connect, you abort one of the connection attempts.
- opening one more tab at a later point in time.

However, currently I can't reproduce the error anymore.
I had noticed one of the connections, which I had created by copying an existing connection today in the first test with the regular build, had a different local path stored like the others. I navigated to another path and closed winscp properly. After that I somehow never got that assertion again.


I then focused on closing the tabs quickly. I can confirm the issue is now definitely gone. The user interface behaves differently. When one tab is in the process of closing, any further mouse clicks seem to be ignored and create "bing" sounds instead.


Then I also made sure I can also reproduce the error with regular 6.5.6 portable. I did this with 6 tabs. Error is still exactly the same.


I tested again your version 6.6.2 (Debug Build 17327 2026-05-13).
However, somewhere in the process of opening and closing tabs I managed to get an:
Assertion failed: !SecureShell->Active, file core\Terminal.cpp, line 1702
But unfortunately I have no idea how exactly I did that.

I tried opened and closed WinSCP a lot and tried multiple things, and at some point I got it a second time during closing WinSCP.


I can send you some trace logs this evening (UTC+2).

Reply with quote

Advertisement

You can post new topics in this forum