Pycharm 2019.2 debugger crash

Hello,

I am posting the same issue for the second time. I am facing an issue with pycharm debugger. when i posted this issue for the first time someone asked me to update pycharm i did and it worked fine but just for 24 hours after that i am facing the same issue again. I check the updates too. It is up to date.

Kindly help me as soon as possible its a request.

STACK TRACE

 

"C:\Program Files\JetBrains\PyCharm 2019.2\bin\runnerw64.exe" "C:\Users\Haider Khan\PycharmProjects\untitled5\venv\Scripts\python.exe" "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50263 --file "C:/Users/Haider Khan/PycharmProjects/untitled5/manage.py" runserver 8000
pydev debugger: process 9636 is connecting

Connected to pydev debugger (build 192.6262.63)
pydev debugger: process 10820 is connecting

Watching for file changes with StatReloader
SystemError: ..\Objects\codeobject.c:851: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1056, in _pydevd_bundle.pydevd_cython_win32_36_64.fix_top_level_trace_and_get_trace_func
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\ntpath.py", line 235, in basename
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\ntpath.py", line 204, in split
SystemError: <built-in function fspath> returned a result with an error set
Exception ignored in: '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_bytecode_while_frame_eval'
Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1056, in _pydevd_bundle.pydevd_cython_win32_36_64.fix_top_level_trace_and_get_trace_func
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\ntpath.py", line 235, in basename
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\ntpath.py", line 204, in split
SystemError: <built-in function fspath> returned a result with an error set
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 729, in __call__
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\threading.py", line 884, in _bootstrap
SystemError: error return without exception set

During handling of the above exception, another exception occurred:

SystemError: ..\Objects\codeobject.c:851: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "_pydevd_frame_eval\pydevd_frame_evaluator_win32_36_64.pyx", line 196, in _pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_func_code_info
SystemError: <class '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.FuncCodeInfo'> returned a result with an error set
Exception ignored in: '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_bytecode_while_frame_eval'
Traceback (most recent call last):
File "_pydevd_frame_eval\pydevd_frame_evaluator_win32_36_64.pyx", line 196, in _pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_func_code_info
SystemError: <class '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.FuncCodeInfo'> returned a result with an error set
Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x000001C476DA3F98>
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 729, in __call__
File "C:\Users\Haider Khan\AppData\Local\Programs\Python\Python36\lib\threading.py", line 884, in _bootstrap
SystemError: error return without exception set

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 732, in __call__
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1029, in _pydevd_bundle.pydevd_cython_win32_36_64.SafeCallWrapper.__call__
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1203, in _pydevd_bundle.pydevd_cython_win32_36_64.TopLevelThreadTracerOnlyUnhandledExceptions.trace_unhandled_exceptions
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_breakpoints.py", line 110, in stop_on_unhandled_exception
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_breakpoints.py", line 91, in get_exception_breakpoint
SystemError: error return without exception set

4 comments
Comment actions Permalink

Hi,

It seems that cython is somehow involved in the issue. Can you please disable the cython speedups by settings the following env variables to your run/debug configuration?

PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO

Does it change anything?

0
Comment actions Permalink

This started to happen consistently for me after upgrading from IntelliJ IDEA Ultimate 2019.1.3 to 2019.3. So far happened only when debugging Tornado-based processes. 

Python plugin version: 193.5233.109

Disabling of Cython fixed it so far. But maybe it makes sense for JetBrain to try and reproduce and fix it?

Also note that Cython is not even installed in the conda environment in which my python application runs. Not sure where Python plugin picks it up, but this is hardly related to my code.

0
Comment actions Permalink

I was getting the same above error for my threading operation. As suggested I have updated my pyCharm to professional edition but now I am getting following error.

 

Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x00000219CE9FD470>
Error in sys.excepthook:
SystemError: ..\Objects\codeobject.c:851: bad argument to internal function
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\_pydevd_bundle\pydevd_breakpoints.py", line 169, in _fallback_excepthook
SystemError: PyEval_EvalFrameEx returned a result with an error set
Original exception was:
SystemError: ..\Objects\codeobject.c:851: bad argument to internal function
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\Python36\lib\threading.py", line 916, in _bootstrap_inner
File "C:\Program Files\Python36\lib\threading.py", line 853, in run
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\_pydevd_bundle\pydevd_trace_dispatch.py", line 59, in trace_dispatch
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1328, in _pydevd_bundle.pydevd_cython_win32_36_64.trace_dispatch
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\pydevd.py", line 483, in enable_tracing
SystemError: PyEval_EvalFrameEx returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: ..\Objects\codeobject.c:851: bad argument to internal function
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 773, in __call__
File "C:\Program Files\Python36\lib\threading.py", line 884, in _bootstrap
File "C:\Program Files\Python36\lib\threading.py", line 916, in _bootstrap_inner
File "C:\Program Files\Python36\lib\traceback.py", line 163, in format_exc
SystemError: <built-in function exc_info> returned a result with an error set
During handling of the above exception, another exception occurred:
SystemError: ..\Objects\codeobject.c:851: bad argument to internal function
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 776, in __call__
File "C:\Program Files\JetBrains\PyCharm 2020.2.3\plugins\python\helpers\pydev\pydevd.py", line 737, in notify_thread_not_alive
SystemError: <built-in method __enter__ of _thread.lock object at 0x00000219CCDE2670> returned a result with an error set

0
Comment actions Permalink

As mention above by setting the environment variable help the problem.

PYDEVD_USE_CYTHON=NO
PYDEVD_USE_FRAME_EVAL=NO

1

Please sign in to leave a comment.