macos运行qt报错:Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault:

macos: 12.7.4

qt:6.7

现象:

qt代码中使用connect+SIGNAL宏连接信号与槽,运行后关闭窗口系统会弹窗报错:Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11

connect(this,SIGNAL(idx_signal(int)),editUserWindow,SLOT(setIdx(int)));

解决:

signal命名时不应带下划线,改成小驼峰命名即可

//widget.h
signals:
    void idxSignal(int idx);


//widget.cpp
connect(this,SIGNAL(idxSignal(int)),editUserWindow,SLOT(setIdx(int)));

mac终端打不开,提示信息如下:------------------------------------- Translated Report (Full Report Below) ------------------------------------- Process: Terminal [3804] Path: /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal Identifier: com.apple.Terminal Version: 2.14 (455) Build Info: Terminal-455000000000000~1602 Code Type: ARM-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2025-03-25 16:14:30.3736 +0800 OS Version: macOS 15.3.2 (24D81) Report Version: 12 Anonymous UUID: 5ED56A84-13F8-3F57-93F7-DC852E994061 Time Awake Since Boot: 6100 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 0x0000600084469b20 Exception Codes: 0x0000000000000001, 0x0000600084469b20 Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process: exc handler [3804] VM Region Info: 0x600084469b20 is not in any region. Bytes after previous region: 1682119457 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL owned unmapped memory unmapped-unmapped [ 224K] rw-/rw- SM=PRV owned physical footprint (unmapped) ---> UNUSED SPACE AT END Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 Terminal 0x102f4fbf0 0x102f0c000 + 277488 1 Terminal 0x102f4fbc8 0x102f0c000 + 277448 2 Terminal 0x102f4e5a0 0x102f0c000 + 271776 3 AppKit 0x18e84af28 -[NSApplication(NSPersistentUIRestorationSupport) restoreWindowWithIdentifier:state:completionHandler:] + 368 4 AppKit 0x18e84a7c4 -[NSApplication(NSPersistentUIRestorationSupp
最新发布
03-26
安装jmpro16报错:------------------------------------- Translated Report (Full Report Below) ------------------------------------- Incident Identifier: B5BC2CD0-BBE4-4FC3-8AE7-C31172E5F807 CrashReporter Key: BEB86B0A-A37E-7DA0-4384-8CDA4FCBA770 Hardware Model: MacBookPro17,1 Process: Installer [3748] Path: /System/Library/CoreServices/Installer.app/Contents/MacOS/Installer Identifier: com.apple.installer Version: 6.2.0 (1131) Code Type: X86-64 (Native) Role: Foreground Parent Process: launchd [1] Coalition: com.apple.installer [4237] Date/Time: 2025-03-19 16:59:24.4592 +0800 Launch Time: 2025-03-19 16:59:23.9393 +0800 OS Version: macOS 13.2.1 (22D68) Release Type: User Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000020 Exception Codes: 0x0000000000000001, 0x0000000000000020 VM Region Info: 0x20 is not in any region. Bytes before following region: 140722817843168 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL UNUSED SPACE AT START ---> mapped file 7ffc9591c000-7ffca03e8000 [170.8M] r-x/r-x SM=COW ...t_id=a73e7c65 Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [3748] Triggered by Thread: 0 Thread 0 Crashed: 0 runtime 0x7ff7ffcfe02c 0x7ff7ffcfa000 + 16428 1 runtime 0x7ff7ffd17878 0x7ff7ffcfa000 + 120952 2 runtime 0x7ff7ffd17968 0x7ff7ffcfa000 + 121192 3 runtime 0x7ff7ffd17914 0x7ff7ffcfa000 + 121108 4 runtime 0x7ff7ffd17850 0x7ff7ffcfa000 + 120912 5 runtime 0x7ff7ffd179b0 0x7ff7ffcfa000 + 121264 6 runtime 0x7ff7ffd0d160 0x7ff7ffcfa000 + 78176 7 runt
03-20
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值