4

I am trying to run a VGG python code via PyCharm. When I run the code, I am getting:

Process finished with exit code -1073740791 (0xC0000409)

and I do not know what to do because it should show the 50 epochs that I am trying to execute. I have looked up the exit code and it says:

0xC0000409 means stack buffer overflow

and I don't know what that means. I am new to python code, so please explain it simple as can be lol

Josh
  • 107
  • 1
  • 2
  • 9
  • I would guess it's because some variable(s) in the code (likely lists or dictionaries) grew to be too large. – John Gordon May 08 '22 at 01:05
  • _Typically_, that shouldn't be able to happen in a "safe language" like Python, unless you're using native libraries written in C. – Charles Duffy May 08 '22 at 01:12
  • 1
    Either way, to give you a firm answer about how it happened, we need a [mre] -- the shortest possible code we can run ourselves, without changes, to see the problem and test proposed solutions. The message itself is one that can happen in too many ways to have a usefully narrow and specific answer otherwise. – Charles Duffy May 08 '22 at 01:12
  • BTW, this isn't _at all_ a Python-specific error. You can have a stack overflow in any language that has a call stack... all the way down to most ABIs for software written directly in assembly or machine language; hence it being something general enough to have a major programming website named after the class of problem. :) – Charles Duffy May 08 '22 at 01:14
  • 2
    Typically, this means some module wrote beyond the end of a buffer and trashed the stack. As others have said, this can only happen if you are using C-based modules like `numpy` and you have violated their rules. Are you, perhaps, trying to use a model that is way beyond the capacity of memory? – Tim Roberts May 08 '22 at 01:16
  • @CharlesDuffy - I have the code, but it is linked to a folder of images that I am testing. – Josh May 08 '22 at 17:35
  • @TimRoberts - IDK, I am using a Ryzen 7 with GEFORCE RTX 3080. The specific code was not running on my laptop which had Ryzen 7 with AMD Radeon. Radeon doesn't like CUDA/CUDNN as much, which is why I switched GPU. – Josh May 08 '22 at 17:35
  • So, if you were to try to collect information to debug this, the place to start is to attach a debugger to your Python interpreter so you can get a stack trace showing where inside the interpreter the problem is. (I don't know if the Windows builds of Python ship with debug symbols -- you might need a different copy to get full debugging functionality). That said, there's a very good chance it'll be not inside the interpreter itself, but inside a C module or library that it loaded (or a library that a C module loaded), and you'll be able to tell _that_ without needing debug symbols. – Charles Duffy May 08 '22 at 17:46

0 Answers0