0

I am getting this error when using the debugger, and I am not having it when running my code. I am trying to understand this answer which seems to raise the same thing but that barely gives any advice on what to do (or maybe I misunderstood what the person wanted to say).

In my case, there was indeed an error in my code. I had written for attribute_idx, attribute in list instead of for attribute_idx, attribute in enumerate(list). But because the debugger was outputing nothing but Process finished with exit code -1073741819 (0xC0000005), I had a hard time finding the error (I had to run the code without the debugger, which I literally never do when I'm developping - so I spent at least 10-15 minutes completely lost).

I am not able to make a minimal reproducible example, both running the code and the debugger seem to be working well when the code is small enough. This is my attempt at reproducing it:

try:
    a = ["1", "2", "3", "4"]
    for b, c in a:
        print(b, c)
except Exception as e:
    print(e)

Attempt that did not yield anything, because the error clearly shows both in the debug mode and in the normal mode.

I would like to know how to avoid this error? I've seen other answers saying it was related to my RAM, but I've checked and I was only using 12 GB of the 16 available during the error.

  • 2
    This sounds like a potential bug report for the debugger, not anything we could possibly help with on Stack Overflow. – Karl Knechtel May 11 '22 at 22:38
  • Should I contact PyCharm directly? – FluidMechanics Potential Flows May 11 '22 at 22:38
  • 1
    Is this a debugger that is integrated into / provided by PyCharm? Or is it just giving you an interface to `pdb` or similar? In the latter case, can you reproduce the problem by debugging from the command line? – Karl Knechtel May 11 '22 at 22:41
  • @KarlKnechtel Umm, I have never used a debugger outside PyCharm so I'm not sure I could answer correctly this question. But I don't do that (https://www.geeksforgeeks.org/python-debugger-python-pdb/#:~:text=Starting%20Python%20Debugger&text=To%20start%20debugging%20within%20the,where%20we%20call%20set_trace().) i.e. I don't import pdb, and I don't use breakpoint() – FluidMechanics Potential Flows May 16 '22 at 09:11
  • We will have to see the whole code... usually exit codes like the above is from a c++ segfault somewhere in an imported lib. But we cant help if we dont know what c++ extension you're using – testfile May 20 '22 at 13:46
  • The thing is that the code is long (several dozens of files) and I'm not able to make a minimal reproducible example. Maybe I can try and list the libraries I imported? – FluidMechanics Potential Flows May 20 '22 at 16:21

0 Answers0