0

我编写了一个在 macOS Big Sur 上运行良好的 QT 应用程序。最近我升级到 MacOS 12 beta 2。编译过程仍然有效。但应用程序无法启动。回溯堆栈显示它在 dyld 进程中崩溃。

dyld[16971]: Assertion failed: (idx < _usedCount), function operator[], file Array.h, line 54.

* thread #1, stop reason = signal SIGABRT
  * frame #0: 0x000000010039cf5a dyld`__abort_with_payload + 10
    frame #1: 0x00000001003b303f dyld`abort_with_payload_wrapper_internal + 80
    frame #2: 0x00000001003b3071 dyld`abort_with_payload + 9
    frame #3: 0x00000001003624d7 dyld`dyld4::halt(char const*) + 375
    frame #4: 0x00000001003b2805 dyld`abort_report_np + 173
    frame #5: 0x00000001003b2842 dyld`__assert_rtn + 61
    frame #6: 0x00000001003b0c1e dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 33
    frame #7: 0x000000010036c534 dyld`invocation function for block in dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 233
    frame #8: 0x00000001003954fa dyld`dyld3::MachOAnalyzer::forEachBind_OpcodesWeak(Diagnostics&, dyld3::MachOLoaded::LinkEditInfo const&, dyld3::MachOFile::SegmentInfo const*, void (char const*, dyld3::MachOLoaded::LinkEditInfo const&, dyld3::MachOFile::SegmentInfo const*, bool, bool, unsigned int, int, unsigned int, unsigned char, unsigned long long, unsigned char, char const*, bool, bool, unsigned long long, bool, bool&) block_pointer, void (char const*) block_pointer) const + 606
    frame #9: 0x00000001003948c2 dyld`dyld3::MachOAnalyzer::forEachBindUnified_Opcodes(Diagnostics&, bool, void (unsigned long long, dyld3::MachOAnalyzer::BindTargetInfo const&, bool&) block_pointer, void (unsigned long long, dyld3::MachOAnalyzer::BindTargetInfo const&, bool&) block_pointer) const + 818
    frame #10: 0x000000010039603f dyld`dyld3::MachOAnalyzer::forEachBindLocation_Opcodes(Diagnostics&, void (unsigned long long, unsigned int, bool&) block_pointer, void (unsigned long long, unsigned int, bool&) block_pointer) const + 105
    frame #11: 0x000000010036c19f dyld`dyld4::Loader::applyFixupsGeneric(Diagnostics&, dyld4::RuntimeState&, dyld3::Array<void const*> const&, dyld3::Array<void const*> const&, bool, dyld3::Array<dyld4::Loader::MissingFlatLazySymbol> const&) const + 407
    frame #12: 0x000000010036f452 dyld`dyld4::JustInTimeLoader::applyFixups(Diagnostics&, dyld4::RuntimeState&, dyld4::DyldCacheDataConstLazyScopedWriter&, bool) const + 534
    frame #13: 0x000000010035dd15 dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 1876
    frame #14: 0x000000010035d4b4 dyld`start + 388

由于我在 dyld 期间无法停止并且没有 dyld 的源代码,因此我使用了一些标志来显示该过程。然后我得到以下信息:

...
dyld[16806]: mprotect 0x000106D9C000->0x000106DA0000 to read-only
dyld[16806]: <libabsl_raw_hash_set.2103.0.1.dylib/bind#0> -> 0x7ff805b6d2b1 (libdyld.dylib/__tlv_bootstrap)
dyld[16806]: fixup: *0x000106DB0018 = 0x000106DB0000 <rebase>
dyld[16806]: fixup: *0x000106DB0000 = 0x7FF805B6D2B1 <libabsl_raw_hash_set.2103.0.1.dylib/bind#0>
dyld[16806]: Assertion failed: (idx < _usedCount), function operator[], file Array.h, line 54.

我的问题是:1)有什么方法可以调试 dyld 并找出导致此错误的库?2) dyld 日志是否意味着错误在 libabsl_raw_hash_set 库中?3)它本身是否可能是一个dyld错误并且将在MacOS Monterey的发布版本中修复?

非常感谢!

4

1 回答 1

0

这已在 MacOS Monterey public beta 3 中修复。

于 2021-07-18T19:07:27.557 回答