iOS simulator ImageLoader startup crash on Catalina 10.15.2, Xcode 11.3

I am using Xcode 11.3 and did upgrade to Catalina 10.15.2 today. Everything was running fine before the upgrade and I can't think of anything else that would've caused this.


I've tried the typical, clean/build, delete derived data...but nothing has helped.


Has anyone else experienced issues with crashing when trying to run in the simulator? See attached image for callstack.


Answered by estebantinder in 398717022

Had the same issue. It's related to the thread sanitizer in the simluator. Followed the instructions in this other post and this resolved the issue for me: https://forums.developer.apple.com/thread/126891

#00x00007fff523d5bea in __abort_with_payload ()
#10x00007fff523d74f3 in abort_with_payload_wrapper_internal ()
#20x00007fff523d74a3 in abort_with_reason ()
#30x00007fff52469974 in pthread_self.cold.1 ()
#40x00007fff52462fe3 in pthread_self ()
#50x000000010f3f316b in __tsan::cur_thread() ()
#60x000000010f3c8985 in wrap_sysctlbyname ()
#70x00007fff52470331 in assert_simulator_supported_host ()
#80x00007fff4ff167c1 in libSystem_initializer ()
#90x000000010f2fa3a7 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) ()
#100x000000010f2fa7b8 in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) ()
#110x000000010f2f59a2 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#120x000000010f2f590f in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#130x000000010f2f590f in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#140x000000010f2f590f in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#150x000000010f2f47a6 in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) ()
#160x000000010f2f4846 in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) ()
#170x000000010f2e9046 in dyld::initializeMainExecutable() ()
#180x000000010f2ed0fc in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#190x000000010f2e81cd in start_sim ()
#200x000000011db508cc in dyld::useSimulatorDyld(int, macho_header const*, char const*, int, char const**, char const**, char const**, unsigned long*, unsigned long*) ()
#210x000000011db4e575 in dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) ()
#220x000000011db49227 in dyldbootstrap::start(dyld3::MachOLoaded const*, int, char const**, dyld3::MachOLoaded const*, unsigned long*) ()
#230x000000011db49025 in _dyld_start ()

I just confirmed that the project runs fine on my non-Catalina system. This issue arised after updating to 10.15.2.


On non-Catalina system, I am running Xcode 11.3 and everything is fine.

Accepted Answer

Had the same issue. It's related to the thread sanitizer in the simluator. Followed the instructions in this other post and this resolved the issue for me: https://forums.developer.apple.com/thread/126891

iOS simulator ImageLoader startup crash on Catalina 10.15.2, Xcode 11.3
 
 
Q