Process finished with exit code -1073741819 (0xC0000005)

Hi team,

I need to debug a script and I get this error when it finishes. I’am using pycharm

C:\Users\hs47155\PycharmProjects\pythonProject1\venv\Scripts\python.exe -X pycache_prefix=C:\Users\hs47155\AppData\Local\JetBrains\PyCharmCE2023.3\cpython-cache C:/Users/hs47155/AppData/Local/CitiSoftware/CTC1753126_PYCHARM_2023.3.5/plugins/python-ce/helpers/pydev/pydevd.py --multiprocess --qt-support=auto --client 127.0.0.1 --port 55762 --file findHHIvanV2.py -s 0V1JXON178R0G007NZ6 -f "message.log.2024-06-05_1929.2024-06-05_1931.cexpgtap4p.gz,message.log.2024-06-05_1931.2024-06-05_1933.cexpgtap4p.gz,message.log.2024-06-05_1932.2024-06-05_1933.cexpswap4c.gz,message.log.202 4-06-06_0613.2024-06-06_0620.cexpgtap4p.gz " -d C:/Users/hs47155/Python 
Connected to pydev debugger (build 233.15026.15)
searching in specified directories...
first search
file C:/Users/hs47155/Python/message.log.2024-06-05_1929.2024-06-05_1931.cexpgtap4p.gz  
Process finished with exit code -1073741819 (0xC0000005)

Regards and thanks!

On windows Application Error 0xc0000005 (Access Violation) error.
Does the code run any non-python programs? Maybe that program crashed?

On windows system, I’m running pycharm for windows.

I’m not asking about your development tools, I am asking what your code does.

Is it running external programs using os.system() or subprocess module for example?

yes, I use os module.

These are the all modules

import sys
import os
import glob
import gzip
import time
import datetime
import codecs

For debugging you can try to use the stdlib signal module to install a signal handler and catch the segfault. But since this is a segfault, the python interpreter might be in a very bad state with little chance of recovering. Your best bet is to try and reduce the code to a minimal reproducible example, for example using print debugging (with flush=True), and post that.

Hi Krupp

Do you have any example to see?

Regards

I need to debug without the error. Do you have one step by step document?

Regards