-
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)검색하기 귀찮아서 블로그에 박제 2024. 1. 15. 21:55728x90
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) #SIGSEGV는 "세그먼트 결함"을 나타내는데 프로세스에서 매핑되지 않은 메모리 주소를 읽거나 쓸 때를 말한다.
PyCharm 디버깅 시 오류가 났는데
step over로 넘기지 않고 그냥 실행으로 optimizer.step()부분을 넘어가니까 잘 작동이 되었다.
알고보니 PyCharm의 유명한 Issue 중 하나였다.아래의 방법은 복잡하니 나처럼 그냥 넘어가는 것도 하나의 방법..!
문제 원인
- Python 스크립트에 버그가 있거나 타사 코드에 버그가 있는 경우 로드 중인 모듈
- 코드를 깨는 오래된 버전의 모듈
- 다른 사람이 여는 파일과 상호 작용(읽기/쓰기) 시도
- Python 스크립트를 처리하는 동안 메모리 문제가 발생
- 가상 환경 연결
해결방법
1) PyQt 를 사용할 경우
https://stackoverflow.com/questions/45016449/pycharm-debugger-instantly-exits-with-139-code
Pycharm debugger instantly exits with 139 code
After upgrade from Pycharm 2017.2.3 to Pycharm 2017.1.4 Pycharm's Debugger suggested to build cpython (or sth associated with it): path/to/my/python /opt/pycharm-community-2017.1.4/helpers/pydev/
stackoverflow.com
Pycharm의 "Preference->Project: your current project->Project interpreter"에서 pyqt를 제거하고 '-' 버튼을 누르면 디버그가 작동
앵간하면 이 방법으로 해결이 되어야 한다.
아니면 나처럼 디버깅 포기하고 줄 넘어가기,,,,
안되면 아래의 방법으로 디버깅해보기 바람2) matplot을 사용할 경우
pip install --upgrade matplotlib
matplotlib 3.2.1 -> 3.3.4로 업그레이드 했을 경우 해결된 사례가 있다.
PyCharm Plotting Issue "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)"
Within PyCharm (Versions 2020.3) I'm unable to show any plots and I get an error. I've tried following other recommendations of going into PyCharm settings and unselecting "PyQt" as well as
stackoverflow.com
3) gdb로 디버깅 해보기
https://bobbyhadz.com/blog/process-finished-with-exit-code-139-interrupted-by-signal-11
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) | bobbyhadz
A step-by-step guide on how to solve the Python error Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) in multiple ways.
bobbyhadz.com
728x90'검색하기 귀찮아서 블로그에 박제' 카테고리의 다른 글