-1

要检查是否存在我尝试使用的任何线程问题Thread Sanitiser。但是在编辑方案中启用它后,我的应用程序一启动应用程序就会崩溃。下面是堆栈回溯。

* thread #1, stop reason = signal SIGABRT
  * frame #0: 0x0000000117791ad6 libsystem_kernel.dylib`__abort_with_payload + 10
    frame #1: 0x00000001177933df libsystem_kernel.dylib`abort_with_payload_wrapper_internal + 80
    frame #2: 0x000000011779338f libsystem_kernel.dylib`abort_with_reason + 19
    frame #3: 0x00000001177d8c29 libsystem_pthread.dylib`pthread_self.cold.1 + 24
    frame #4: 0x00000001177d2334 libsystem_pthread.dylib`pthread_self + 35
    frame #5: 0x000000010ea1516b libclang_rt.tsan_iossim_dynamic.dylib`__tsan::cur_thread() + 11
    frame #6: 0x000000010e9ea985 libclang_rt.tsan_iossim_dynamic.dylib`wrap_sysctlbyname + 37
    frame #7: 0x00000001176bd390 libsystem_sim_kernel.dylib`assert_simulator_supported_host + 44
    frame #8: 0x0000000116301a0c libSystem.B.dylib`libSystem_initializer + 56
    frame #9: 0x000000010e928f14 dyld_sim`ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 518
    frame #10: 0x000000010e929112 dyld_sim`ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
    frame #11: 0x000000010e924547 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 343
    frame #12: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
    frame #13: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
    frame #14: 0x000000010e9244d3 dyld_sim`ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 227
    frame #15: 0x000000010e923704 dyld_sim`ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 134
    frame #16: 0x000000010e923798 dyld_sim`ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 74
    frame #17: 0x000000010e917342 dyld_sim`dyld::initializeMainExecutable() + 129
    frame #18: 0x000000010e91b497 dyld_sim`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 4395
    frame #19: 0x000000010e916624 dyld_sim`start_sim + 136
    frame #20: 0x000000011092879a dyld`dyld::useSimulatorDyld(int, macho_header const*, char const*, int, char const**, char const**, char const**, unsigned long*, unsigned long*) + 2308
    frame #21: 0x0000000110926432 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 837
    frame #22: 0x0000000110921227 dyld`dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) + 453
    frame #23: 0x0000000110921025 dyld`_dyld_start + 37

我也尝试Strip Style所有符号更改为调试符号,但无济于事。在这方面的任何建议都会有所帮助。谢谢。

4

1 回答 1

2

您使用的是哪个 Xcode 版本?因为在Xcode 11.3.1 的发行说明中,您可以找到 Thread Sanitizer 的修复程序。

解决了阻止 Xcode 在 macOS Catalina 10.15.2 上启用 Thread Sanitizer 的情况下启动进程的问题。(57822138)

于 2020-05-16T12:21:05.650 回答