Problems Starting Tcl Debug in Windows

Hi
I’m developing some tcl stuff in windows, and I’m getting intermittently, the following error when start a tcl debug session:
error flushing “sock0000029A8CC72870”: socket is not connected
while executing
“flush $socket”
(procedure “DbgNub_Main” line 49)
invoked from within
“DbgNub_Main”
(file “C:/ActiveState/Komodo/lib/support/tcl/appLaunch.tcl” line 90)
This can be worked around once, starting a tcl shell inside komodo, but just works for one try, and if session starts again, I need to open a new shell. This is not happening immediately after install, it happens after suspend and then make run komodo again. However, even after reboot it didn’t work as intended. I erased lots of lock files found, but no success.

Morning @estay,

Thanks for the question. Please provide more details like you would for a Stackoverflow post. At a minimum:

  1. Code sample
  2. Repro steps
  3. When referencing files that you manipulated say exactly what/where they were, eg. What lock files did you erase?

Please also try to reproduce the issue in Safe Mode: Help menu > Troubleshooting > Restart in Safe-Mode

At this moment, If it’s used just after install it works without rebooting, But is failing after suspend or reboot. I suspected that a tcl socket remained active after reboot because of Hybrid Sleep or fast reboot in windows, so I turned it off, but is still failing.
Code could be anything, is not dependent on it. It doesn’t even start

Also tried with safe mode.
I deleted the crash reports at C:\Users\estay\AppData\Roaming\ActiveState
also the locks at C:\Users\estay\AppData\Local\ActiveState

When I workaround opening a tclsh form komodo prior to debug, the debugger remains open in the task manager, so opening more sessions make more sessions to remain open. After some tries it make Komodo to crash. Is windows only. With Linux Komodo is running fine, so my bet is that something environmental is making it crash.
I was using the tclsh from Cygwin at first. I thought that this could be the problem, so I downloaded an ActiveState Build of tcl/tk ActiveTcl-8.6 - estay - ActiveState Platform but still I’m having problems.

Morning @estay,

I’m not able to reproduce an issue but I do note that if you start the debugger with the wish interpreter rather than the tclsh interpreter a small window will open and debugging will not stop until you close that window. Leaving that dialog open would prevent you from starting new sessions and might lead to the other issues you’re seeing.

If you’re debugging non graphical code then you should make sure that you’ve selected Tclsh when starting the debugger.

that didn’t help, error also appears in wish

error flushing "sock000002448A7BFCE0": socket is not connected
    while executing
"flush $socket"
    (procedure "DbgNub_Main" line 49)
    invoked from within
"DbgNub_Main"
    (file "C:/ActiveState/Komodo/lib/support/tcl/appLaunch.tcl" line 90)

A good question is why the socket is not created successfully. In normal conditions, tcl sockets are created without trouble.

It would be possible that a permissions issue could be preventing this socket to open? How I can debug that?

I was saying do not start the debugger with with. My thinking is you’re leaving a bunch of wish debug sessions running.

No, I don’t think so. In your first message in this post you said that you just need to open a new Tcl shell to workaround the issue. If this was a permissions issue then it would mean it would never work.

It sounds like you’re leaving a bunch of wish interpreter debug sessions running and Komodo is failing to start new sessions.