Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm using pycharm with pyqt5.6 and qt5.6.2 and the problem started when I upgraded to these versions.

I've tried searching as much as I can, but have not been able to find an answer. Can anyone help please?

@ARob4. Exit codes are completely useless for debugging. Please learn how to configure your programming environment so that it displays the python traceback. Or run the code in a console or command window instead of IDE so you can see the output directly. ekhumoro May 31, 2018 at 10:21 @ekhumoro The Python interpreter is crashing with non-zero exit code when PyCharm/IntelliJ attempts to iterate properties. In this scenario, the Python interpreter does not provide an exception stack trace. It is possible that Linux could provide a core dump. kevinarpe Nov 9, 2021 at 12:34

Assume you are running under Windows. Application Error code 0xc0000005, also known as Access Violation error, is a common problem experienced by Windows users, regardless of os version. There are various causes to trigger Application Error 0xc0000005. For my case, I'm running debug mode in PyCharm (or Eclipse) with code that includes the following:

from pympler import muppy
all_objects=muppy.get_objects()  # this causes pydev debugger exit with code -1073741819 (0xC0000005)

It was perfectly fine if execute the same piece of code through PyCharm in non-debug (Run) mode. Disabled the above code in debug mode, issue resolved.

Environment: PyCharm Community 2019.3, Anaconda 3, Python 3.7.3, pympler 0.7, Windows 10 Enterprise

This was helpful, although not exactly what happened to me. I was getting the error both in 'debug' & 'run' mode in PyCharm, but it was definitely PyCharm that was causing the error. I ran the script from terminal and the error was gone. – Laguilhoat Aug 25, 2022 at 9:31 Do you remember what solved your problem? I get the same error codes and I'm using PySide2 (now the official Python bindings for Qt 5). – HelloGoodbye Nov 10, 2019 at 22:21 Yes, it wasn't anything to do my the code, it was due to problems finding the DLLs that were needed. The path environment variable wasn't pointing to the right place. Trial and error was all that worked! – A Rob4 Nov 12, 2019 at 7:25 Okay. I had a completely weird problem, where if I assigned the pixmap from a QImage to a QLabel, with setPixmap, in the same function as I created the QImage, it would work fine, whereas if I created the QImage in one function, stored it, and then assigned its pixmap to the QLabel in another function, the script would crash and give me this error code during the call to setPixmap. I have no idea why this happened, but I simply made sure to have the QImage creation and the call to setPixmap in the same function because then it works. – HelloGoodbye Nov 12, 2019 at 9:25

Use faulthandler it will show the stack trace when application crashes through which u can debug the issue

import faulthandler
if __name__ == "__main__":
    faulthandler.enable() #start @ the beginning
    ... # application logic

Same problem, this resolved in my case:

  • try run from command line (no pycharm), it works ( exception only in debug )
  • closed pycharm
  • deleted ".idea" folder inside project path
  • opened pycharm
  • reconfigure python runtime version and command line parameter
  • debug works
  • I encountered the same issue today. I found this question while Googling for an answer! By luck, I found the root cause in my code.

    When I tried to expand a self pointer in the IntelliJ Python debugger, my Python interpreter would crash with: Process finished with exit code -1073741819 (0xC0000005)

    Here is the code that caused the issue:

    @property
    def prop(self):
        return self.prop  # Facepalm: I meant to write: self._prop
    

    When expanding self in the debugger, IntelliJ iterates all properties in the object. If there is infinite loop/recursion, the Python interpreter will crash.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.