Python:进程结束,退出代码为139(被信号11中断:SIGSEGV)

4nkexdtk  于 2023-02-15  发布在  Python
关注(0)|答案(1)|浏览(416)

我是一个新手,对于我下面的代码:

# Constant
c_dir = '/Users/sapfinance/PycharmProjects/RFBIBL00'
C_FILE_SEP = '|'
Fichier1 = filedialog.askopenfile(initialdir=c_dir)
Fichier2 = filedialog.askopenfile(initialdir=c_dir)

当我启动报告时,如果Fichier1是一个大文件(大于300M0字节),而Fichier2是一个小文件,则会显示错误消息:**进程结束,退出代码为139(被信号11中断:SIGSEGV)**否则,如果第一个文件很小,第二个文件很大,则不会出现问题。
我在MBP 2023中使用Python 3.11。
小文件位于[此处][1],大文件位于[此处][2]
我添加了错误日志,为什么?

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Process:               Python [75896]
Path:                  /Library/Frameworks/Python.framework/Versions/3.11/Resources/Python.app/Contents/MacOS/Python
Identifier:            org.python.python
Version:               3.11.1 (3.11.1)
Code Type:             ARM-64 (Native)
Parent Process:        pycharm [49477]
Responsible:           pycharm [49477]
User ID:               501

Date/Time:             2023-02-13 17:42:44.2803 +0100
OS Version:            macOS 13.2 (22D49)
Report Version:        12
Anonymous UUID:        CC935EEC-AECF-735E-06B3-40216C7B759F

Sleep/Wake UUID:       BE7F527D-88BD-4A69-8B1B-662C43878116

Time Awake Since Boot: 470000 seconds
Time Since Wake:       14851 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x000000000000001e
Exception Codes:       0x0000000000000001, 0x000000000000001e

Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process:   exc handler [75896]

VM Region Info: 0x1e is not in any region.  Bytes before following region: 105553518919650
     REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
     UNUSED SPACE AT START
--->  
     MALLOC_NANO (reserved)   600018000000-600020000000 [128.0M] rw-/rwx SM=NUL  ...(unallocated) ```

 [1]: https://u.pcloud.link/publink/show?code=XZENVgVZpLLP9U5np7Vc9lxhOUJ3YyhhFCgk
 [2]: https://u.pcloud.link/publink/show?code=XZrNVgVZ46GE8BQ24Y76ANlNSDHqhSio2dIy
8tntrjer

8tntrjer1#

我已经搜索了网络,已知漏洞https://github.com/python/cpython/issues/92603
按照不同的阅读,我解决崩溃添加:

root = tk.Tk()

我的车祸已经过去了。
我不明白为什么,我的想法是添加第二个指令摧毁Windows,但它的工作没有.
我的新密码是

from tkinter import filedialog
# Constant
c_dir = '/Users/sapfinance/PycharmProjects/RFBIBL00'
C_FILE_SEP = '|'
root = tk.Tk()
Fichier1 = filedialog.askopenfile(initialdir=c_dir)

Fichier2 = filedialog.askopenfile(initialdir=c_dir)

相关问题