QT创建者应用程序在MacOS 12.4 [M1/Silicon]上崩溃

发布于 2025-02-06 04:57:09 字数 9916 浏览 1 评论 0 原文

我能够使用指定的设置在此Mac上编译并运行我的应用程序。从一天到另一天,我无法执行该应用程序(即使在调试模式下)。除了在默认调试/发布构建中发生的事情之外,发生了错误。

我试图解决此问题的方法:

  • 使清洁构建构建,甚至重新锁定了存储库
  • 重新启动了MacBook(如官方MacOS文档根据此签名错误)
  • 重新安装了QTCreator
  • Run系统更新(例如,用于控制台工具的工具)

我用完了下一步该怎么做。任何输入都将不胜感激。在下面有MacOS崩溃报告:

Process:               Sample [6739]
Path:                  /Users/USER/*/Sample.app/Contents/MacOS/Sample
Identifier:            com.yourcompany.Sample
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        qtcreator_processlauncher [6187]
User ID:               501

Date/Time:             2022-06-10 09:56:06.0533 +0200
OS Version:            macOS 12.4 (21F79)
Report Version:        12
Anonymous UUID:        3C17814C-6324-03D6-2715-B4F55ACF44E5

Sleep/Wake UUID:       74437E44-7126-4975-8C2B-014AB410B1BE

Time Awake Since Boot: 35000 seconds
Time Since Wake:       6363 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x0000000100db0000
Exception Codes:       0x0000000000000032, 0x0000000100db0000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 2 

VM Region Info: 0x100db0000 is in 0x100db0000-0x100dd0000;  bytes after start: 0  bytes before end: 131071
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      mapped file                 100d74000-100db0000    [  240K] r--/rwx SM=COW  ...t_id=e753674d
--->  mapped file                 100db0000-100dd0000    [  128K] r-x/rwx SM=COW  ...t_id=e753674d
      VM_ALLOCATE (reserved)      100dd0000-100dec000    [  112K] rw-/rwx SM=NUL  ...(unallocated)

Thread 0 Crashed:
0   dyld                                   0x100fa8008 dyld3::MachOFile::isMachO(Diagnostics&, unsigned long long) const + 20
1   dyld                                   0x100f892cc dyld4::Loader::mapSegments(Diagnostics&, dyld4::RuntimeState&, char const*, unsigned long long, dyld4::Loader::CodeSignatureInFile const&, bool, dyld3::Array<dyld4::Loader::Region> const&, bool, bool, dyld4::Loader::FileValidationInfo const&) + 1096
2   dyld                                   0x100f892cc dyld4::Loader::mapSegments(Diagnostics&, dyld4::RuntimeState&, char const*, unsigned long long, dyld4::Loader::CodeSignatureInFile const&, bool, dyld3::Array<dyld4::Loader::Region> const&, bool, bool, dyld4::Loader::FileValidationInfo const&) + 1096
3   dyld                                   0x100f8eb88 invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 68
4   dyld                                   0x100f8e528 dyld4::JustInTimeLoader::withRegions(dyld3::MachOAnalyzer const*, void (dyld3::Array<dyld4::Loader::Region> const&) block_pointer) + 292
5   dyld                                   0x100f8eadc invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 480
6   dyld                                   0x100f93d58 dyld4::SyscallDelegate::withReadOnlyMappedFile(Diagnostics&, char const*, bool, void (void const*, unsigned long, bool, dyld4::FileID const&, char const*) block_pointer) const + 132
7   dyld                                   0x100f8e8c8 dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 204
8   dyld                                   0x100f886d0 invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&) + 1384
9   dyld                                   0x100f87bc0 dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 780
10  dyld                                   0x100f877ec invocation function for block in dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 148
11  dyld                                   0x100f7db18 dyld4::ProcessConfig::PathOverrides::forEachImageSuffix(char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 176
12  dyld                                   0x100f7e34c invocation function for block in dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 160
13  dyld                                   0x100f7d0f0 dyld4::ProcessConfig::PathOverrides::forEachInColonList(char const*, char const*, void (char const*, bool&) block_pointer) + 204
14  dyld                                   0x100f7dd9c dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 344
15  dyld                                   0x100f87740 dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 172
16  dyld                                   0x100f87f60 dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&) + 864
17  dyld                                   0x100f8cb60 invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&) + 380
18  dyld                                   0x100fa9264 invocation function for block in dyld3::MachOFile::forEachDependentDylib(void (char const*, bool, bool, bool, unsigned int, unsigned int, bool&) block_pointer) const + 148
19  dyld                                   0x100f75f98 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168
20  dyld                                   0x100fa90ac dyld3::MachOFile::forEachDependentDylib(void (char const*, bool, bool, bool, unsigned int, unsigned int, bool&) block_pointer) const + 172
21  dyld                                   0x100f8c8c8 dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&) + 164
22  dyld                                   0x100f795c0 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 1092
23  dyld                                   0x100f7906c start + 488


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000100db0000   x1: 0x000000016f6edcd8   x2: 0x0000000000020000   x3: 0x0000000000040012
    x4: 0x0000000000000003   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000100fec62c   x9: 0x0000000100fedea8  x10: 0x000000001e000000  x11: 0x0800000000028000
   x12: 0x0000000000000001  x13: 0x0000000000000001  x14: 0x0000000000011b00  x15: 0x0000000000000000
   x16: 0x00000000000000c5  x17: 0x6ae100016f6ed4b8  x18: 0x0000000000000000  x19: 0x000000016f6edcd8
   x20: 0x0000000100c70060  x21: 0x000000000003c000  x22: 0x0000000000000003  x23: 0x000000016f6ed7c8
   x24: 0x0000000000000040  x25: 0x0000000000000000  x26: 0x000000016f6ed54c  x27: 0x0000000000000000
   x28: 0x0000000100db0000   fp: 0x000000016f6ed110   lr: 0x7a6f800100f892cc
    sp: 0x000000016f6ed100   pc: 0x0000000100fa8008 cpsr: 0x00001000
   far: 0x0000000100db0000  esr: 0x92000007 (Data Abort) byte read Translation fault

Binary Images:
       0x100f74000 -        0x100fd3fff dyld (*) <d9c2a46e-8dc4-3950-9d6a-f799e8ccb683> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=6048K resident=0K(0%) swapped_out_or_unallocated=6048K(100%)
Writable regions: Total=9360K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9360K(100%)

这是 $ codesign 输出:

Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20400 size=43712 flags=0x20002(adhoc,linker-signed) hashes=1363+0 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=250886c9e93ae2aa977a592f451a52885ecd1701
CandidateCDHashFull sha256=250886c9e93ae2aa977a592f451a52885ecd17015c94bbeafa49d2cbb2274ed3
Hash choices=sha256
CMSDigest=250886c9e93ae2aa977a592f451a52885ecd17015c94bbeafa49d2cbb2274ed3
CMSDigestType=2
CDHash=250886c9e93ae2aa977a592f451a52885ecd1701
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none

I was able to compile and run my application on this Mac with the specified setup. From one day to another I couldn't execute the application (even in Debug mode). The error occurs without any actual signing besides the things that are happening in the default debug/release build.

What I've tried to solve this issue:

  • Made clean builds, even re-cloned the repository
  • Restarted the MacBook (as specified in the official MacOS docs according to this signing error)
  • Reinstalled QtCreator
  • Run system updates (e.g. for the console tools)

I ran out of ideas what to do next. Any input is appreciated. In the following there is the MacOS crash report:

Process:               Sample [6739]
Path:                  /Users/USER/*/Sample.app/Contents/MacOS/Sample
Identifier:            com.yourcompany.Sample
Version:               ???
Code Type:             ARM-64 (Native)
Parent Process:        qtcreator_processlauncher [6187]
User ID:               501

Date/Time:             2022-06-10 09:56:06.0533 +0200
OS Version:            macOS 12.4 (21F79)
Report Version:        12
Anonymous UUID:        3C17814C-6324-03D6-2715-B4F55ACF44E5

Sleep/Wake UUID:       74437E44-7126-4975-8C2B-014AB410B1BE

Time Awake Since Boot: 35000 seconds
Time Since Wake:       6363 seconds

System Integrity Protection: enabled

Crashed Thread:        0

Exception Type:        EXC_BAD_ACCESS (SIGKILL (Code Signature Invalid))
Exception Codes:       UNKNOWN_0x32 at 0x0000000100db0000
Exception Codes:       0x0000000000000032, 0x0000000100db0000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 2 

VM Region Info: 0x100db0000 is in 0x100db0000-0x100dd0000;  bytes after start: 0  bytes before end: 131071
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      mapped file                 100d74000-100db0000    [  240K] r--/rwx SM=COW  ...t_id=e753674d
--->  mapped file                 100db0000-100dd0000    [  128K] r-x/rwx SM=COW  ...t_id=e753674d
      VM_ALLOCATE (reserved)      100dd0000-100dec000    [  112K] rw-/rwx SM=NUL  ...(unallocated)

Thread 0 Crashed:
0   dyld                                   0x100fa8008 dyld3::MachOFile::isMachO(Diagnostics&, unsigned long long) const + 20
1   dyld                                   0x100f892cc dyld4::Loader::mapSegments(Diagnostics&, dyld4::RuntimeState&, char const*, unsigned long long, dyld4::Loader::CodeSignatureInFile const&, bool, dyld3::Array<dyld4::Loader::Region> const&, bool, bool, dyld4::Loader::FileValidationInfo const&) + 1096
2   dyld                                   0x100f892cc dyld4::Loader::mapSegments(Diagnostics&, dyld4::RuntimeState&, char const*, unsigned long long, dyld4::Loader::CodeSignatureInFile const&, bool, dyld3::Array<dyld4::Loader::Region> const&, bool, bool, dyld4::Loader::FileValidationInfo const&) + 1096
3   dyld                                   0x100f8eb88 invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 68
4   dyld                                   0x100f8e528 dyld4::JustInTimeLoader::withRegions(dyld3::MachOAnalyzer const*, void (dyld3::Array<dyld4::Loader::Region> const&) block_pointer) + 292
5   dyld                                   0x100f8eadc invocation function for block in dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 480
6   dyld                                   0x100f93d58 dyld4::SyscallDelegate::withReadOnlyMappedFile(Diagnostics&, char const*, bool, void (void const*, unsigned long, bool, dyld4::FileID const&, char const*) block_pointer) const + 132
7   dyld                                   0x100f8e8c8 dyld4::JustInTimeLoader::makeJustInTimeLoaderDisk(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, bool, unsigned int) + 204
8   dyld                                   0x100f886d0 invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&) + 1384
9   dyld                                   0x100f87bc0 dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 780
10  dyld                                   0x100f877ec invocation function for block in dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 148
11  dyld                                   0x100f7db18 dyld4::ProcessConfig::PathOverrides::forEachImageSuffix(char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 176
12  dyld                                   0x100f7e34c invocation function for block in dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 160
13  dyld                                   0x100f7d0f0 dyld4::ProcessConfig::PathOverrides::forEachInColonList(char const*, char const*, void (char const*, bool&) block_pointer) + 204
14  dyld                                   0x100f7dd9c dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const + 344
15  dyld                                   0x100f87740 dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) + 172
16  dyld                                   0x100f87f60 dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&) + 864
17  dyld                                   0x100f8cb60 invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&) + 380
18  dyld                                   0x100fa9264 invocation function for block in dyld3::MachOFile::forEachDependentDylib(void (char const*, bool, bool, bool, unsigned int, unsigned int, bool&) block_pointer) const + 148
19  dyld                                   0x100f75f98 dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const + 168
20  dyld                                   0x100fa90ac dyld3::MachOFile::forEachDependentDylib(void (char const*, bool, bool, bool, unsigned int, unsigned int, bool&) block_pointer) const + 172
21  dyld                                   0x100f8c8c8 dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&) + 164
22  dyld                                   0x100f795c0 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 1092
23  dyld                                   0x100f7906c start + 488


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000100db0000   x1: 0x000000016f6edcd8   x2: 0x0000000000020000   x3: 0x0000000000040012
    x4: 0x0000000000000003   x5: 0x0000000000000000   x6: 0x0000000000000000   x7: 0x0000000000000000
    x8: 0x0000000100fec62c   x9: 0x0000000100fedea8  x10: 0x000000001e000000  x11: 0x0800000000028000
   x12: 0x0000000000000001  x13: 0x0000000000000001  x14: 0x0000000000011b00  x15: 0x0000000000000000
   x16: 0x00000000000000c5  x17: 0x6ae100016f6ed4b8  x18: 0x0000000000000000  x19: 0x000000016f6edcd8
   x20: 0x0000000100c70060  x21: 0x000000000003c000  x22: 0x0000000000000003  x23: 0x000000016f6ed7c8
   x24: 0x0000000000000040  x25: 0x0000000000000000  x26: 0x000000016f6ed54c  x27: 0x0000000000000000
   x28: 0x0000000100db0000   fp: 0x000000016f6ed110   lr: 0x7a6f800100f892cc
    sp: 0x000000016f6ed100   pc: 0x0000000100fa8008 cpsr: 0x00001000
   far: 0x0000000100db0000  esr: 0x92000007 (Data Abort) byte read Translation fault

Binary Images:
       0x100f74000 -        0x100fd3fff dyld (*) <d9c2a46e-8dc4-3950-9d6a-f799e8ccb683> /usr/lib/dyld
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=6048K resident=0K(0%) swapped_out_or_unallocated=6048K(100%)
Writable regions: Total=9360K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=9360K(100%)

This is the $ codesign output:

Format=app bundle with Mach-O thin (arm64)
CodeDirectory v=20400 size=43712 flags=0x20002(adhoc,linker-signed) hashes=1363+0 location=embedded
Hash type=sha256 size=32
CandidateCDHash sha256=250886c9e93ae2aa977a592f451a52885ecd1701
CandidateCDHashFull sha256=250886c9e93ae2aa977a592f451a52885ecd17015c94bbeafa49d2cbb2274ed3
Hash choices=sha256
CMSDigest=250886c9e93ae2aa977a592f451a52885ecd17015c94bbeafa49d2cbb2274ed3
CMSDigestType=2
CDHash=250886c9e93ae2aa977a592f451a52885ecd1701
Signature=adhoc
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements=none

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

佞臣 2025-02-13 04:57:09

如建议的在这里,通过QT Creator(如果愿意的话,或Cmake和Ninja)构建应用程序,然后通过终端或Finder运行它。另外,尝试直接通过QT创建者构建和运行以释放。

As suggested here, build the app through Qt Creator (or CMake and Ninja if you prefer) and then run it through the Terminal or Finder. Also, try building and running for release through Qt Creator directly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文