robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

[BUG] Error in console after debuging

Open Krata4 opened this issue 2 years ago • 4 comments

Describe the bug When I install Python 12, I can see error after debuging in console:

Exception in worker Traceback (most recent call last): File "C:\Program Files\Python312\Lib\concurrent\futures\thread.py", line 91, in _worker if work_item is not None: ^^^^^^^^^ File "c:\Users....vscode\extensions\ms-python.python-2024.0.1\pythonFiles\lib\python\debugpy_vendored\pydevd_pydevd_bundle\pydevd_trace_dispatch_regular.py", line 203, in trace_dispatch py_db.enable_tracing(thread_trace_func) File "c:\Users....vscode\extensions\ms-python.python-2024.0.1\pythonFiles\lib\python\debugpy_vendored\pydevd\pydevd.py", line 1107, in enable_tracing pydevd_tracing.SetTrace(thread_trace_func) File "c:\Users....vscode\extensions\ms-python.python-2024.0.1\pythonFiles\lib\python\debugpy_vendored\pydevd\pydevd_tracing.py", line 87, in SetTrace if set_trace_to_threads(tracing_func, thread_idents=[thread.get_ident()], create_dummy_thread=False) == 0: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "c:\Users.....vscode\extensions\ms-python.python-2024.0.1\pythonFiles\lib\python\debugpy_vendored\pydevd\pydevd_tracing.py", line 354, in set_trace_to_threads start_new_thread(increase_tracing_count, ()) RuntimeError: can't create new thread at interpreter shutdown

With Python 11 it was without error.

Thanks Jirka

Krata4 avatar Feb 27 '24 16:02 Krata4

I noticed this as well sometimes, but it is not really reproducable for me. But after some investigation there seems to be a regression in python 3.12 see here: https://github.com/python/cpython/issues/113964

And if you look at the code and I also see this if I get this error, this seems to happen in debugpy and not in RobotCode.

Does this happens every time?

d-biehl avatar Feb 29 '24 22:02 d-biehl

Yes, every time in case Test failed and I am using debuging.

Krata4 avatar Mar 01 '24 07:03 Krata4

Is this bug still there or does it work with newer versions of the Vscode Python extension?

d-biehl avatar Apr 16 '24 21:04 d-biehl

unfortunately, error is till there: start_new_thread(increase_tracing_count, ()) RuntimeError: can't create new thread at interpreter shutdown

Krata4 avatar Apr 17 '24 07:04 Krata4

Hey, in one of the last versions of robotcode I changed the way the debugger starts the robot process. Also the version of the pydevd, that comes with the Python Debugger extension has changed.

Can you check if the error is still there?

d-biehl avatar May 09 '24 19:05 d-biehl

Hi,

thanks for fix. Debugging is without error currently.

Krata4 avatar May 15 '24 08:05 Krata4