Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

PyCharm pydevd debug crash #240

Closed
Closed

Description

@egmkang

i'm using Python 3.7.5 x86-64: stackless-3.7.5-amd64.exe (26857280 Byte) (md5 f85ecddb2f4d83990ad764bd7c5c8aa8) .

using PyCharm to debug a hello world program, the python process wil crash, and error code is 0xC0000005.

here is log:

D:\Stackless37\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2021.1\plugins\python-ce\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50654 --file D:/tttt/hello.py
Connected to pydev debugger (build 211.6693.115)

Process finished with exit code -1073741819 (0xC0000005)

Activity

  1. akruis commented on Apr 20, 2021

    @akruis

    Hello egmkang,

    thank you for the report. The exit code 0xC0000005 indicates an access violation. Could you please provide the source code of D:/tttt/hello.py. Does the crash also happen without the debugger attached?

    Regards
    Anselm

  2. egmkang commented on Apr 21, 2021

    @egmkang
    Author

    just one lineprint("hello world"), and use PyCharm to debug this file, it will crash. run this file is ok

  3. akruis commented on Apr 22, 2021

    @akruis

    I can reproduce the crash.

  4. akruis commented on Apr 23, 2021

    @akruis

    PyCharm - more precisely the debugger component pydevd - optionally uses the frame evaluation API "eval_frame" defined in PEP 523. Stackless can't support this API, because it evaluates frames quite differently than regular C-Python.

    Fortunately there is a simple workaround: set the environment variable PYDEVD_USE_FRAME_EVAL=NO:

    set PYDEVD_USE_FRAME_EVAL=NO
    "\Program Files\JetBrains\PyCharm Community Edition 2021.1.1\bin\pycharm64.exe"
    

    A patch for pydevd to disable frame eval for Stackless would be good too.

  5. changed the title [-]PyCharm debug crash[/-] [+]PyCharm pydevd debug crash[/+] on Apr 23, 2021
  6. akruis commented on Apr 23, 2021

    @akruis

    pull request for pydevd created

  7. gemerden commented on May 10, 2021

    @gemerden

    I have this issue (i think) but setting PYDEVD_USE_FRAME_EVAL=NO did not work for me. I have created an issue: https://youtrack.jetbrains.com/issue/PY-48739

  8. akruis commented on May 10, 2021

    @akruis

    I have this issue (i think) but setting PYDEVD_USE_FRAME_EVAL=NO did not work for me. I have created an issue: https://youtrack.jetbrains.com/issue/PY-48739

    First, double check, that Python actually sees the environment setting. Run:

    import os
    print(os.environ.get('PYDEVD_USE_FRAME_EVAL'))
    

    You may also try the set the environment variable PYDEVD_USE_CYTHON=NO. Previous versions of cython were not compatible with Stackless Python (see #168) and Pycharm uses cython.

  9. gemerden commented on May 10, 2021

    @gemerden

    Perfect, thanks, that solved my problem!

    In the 'set environment variables' part of the run/debug dialog in PyCharm, i was separating the variables with "; " (space) instead of ";" (no space). This set the wrong (or no) variable. Umpfff.

    Will also report to PyCharm issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions