skip to Main Content

I updated xcode version to 15.0 and faced with "No template named ‘unary_function’ in namespace ‘std’; did you mean ‘__unary_function’?". After fixing that issue by adding "_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION" in "Apple Clang – Preprocessing > under Macro section", app build successfully. But when on starting the app, it crash immediately with this error log.

-------------------------------------
Translated Report (Full Report Below)
-------------------------------------

Incident Identifier: FDD163B9-2A7D-4004-AA72-0B677465E0D7
CrashReporter Key:   891D0A04-EC30-4A74-60A3-B1B12FFE62E1
Hardware Model:      MacBookPro17,1
Process:             MyApp [22948]
Path:                /Users/USER/Library/Developer/CoreSimulator/Devices/25A8C041-B8E4-446A-8A27-55C5731E783A/data/Containers/Bundle/Application/FAD24FDF-05FE-4E12-8DEF-2E723B2B3250/MyApp.app/MyApp
Identifier:          com.my.app
Version:             1.0 (1)
Code Type:           X86-64 (Native)
Role:                Foreground
Parent Process:      launchd_sim [12210]
Coalition:           com.apple.CoreSimulator.SimDevice.25A8C041-B8E4-446A-8A27-55C5731E783A [5606]
Responsible Process: SimulatorTrampoline [944]

Date/Time:           2023-10-05 10:06:51.7691 +0630
Launch Time:         2023-10-05 10:06:41.6848 +0630
OS Version:          macOS 14.0 (23A344)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: OBJC 1 

Triggered by Thread:  0

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   ???                                    0x1082c1a78 ???
1   <translation info unavailable>         0x10854ddb4 ???
2   libsystem_kernel.dylib                 0x11786b8c2 abort_with_payload_wrapper_internal + 82
3   libsystem_kernel.dylib                 0x11786b870 abort_with_reason + 19
4   libobjc.A.dylib                        0x111fcc593 _objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*) + 121
5   libobjc.A.dylib                        0x111fcc51a _objc_fatal(char const*, ...) + 114
6   libobjc.A.dylib                        0x111fb666d load_images + 1383
7   dyld_sim                               0x11075909b dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*) + 359
8   dyld_sim                               0x11075e73c dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const + 182
9   dyld_sim                               0x11076149a dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_1::operator()() const + 92
10  dyld_sim                               0x11075e7dd dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const + 93
11  dyld_sim                               0x1107743df dyld4::APIs::runAllInitializersForMain() + 263
12  dyld_sim                               0x11075010a dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2535
13  dyld_sim                               0x11074f356 _dyld_sim_prepare + 854
14  dyld                                   0x2083fbe23 dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1459
15  dyld                                   0x2083fa5e9 dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 205
16  dyld                                   0x2083fa33f start + 1839

Thread 1:: com.apple.rosetta.exceptionserver
0   ???                                 0x7ff7ffcea2b4 ???


Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000008  rbx: 0x0000000000000000  rcx: 0x0000000000000001  rdx: 0x0000000000000000
  rdi: 0x0000002000000000  rsi: 0x0000000000000000  rbp: 0x0000000000000080  rsp: 0x0000600000284000
   r8: 0x0000600000284000   r9: 0x0000000000000080  r10: 0x0000000000000000  r11: 0x6120746f6e206572
  r12: 0x0000000000000080  r13: 0x0000000000000000  r14: 0x0000000000000008  r15: 0x0000000000000000
  rip: <unavailable>       rfl: 0x0000000000000283
 tmp0: 0xffffffffffffffff tmp1: 0x00000001082c1a4c tmp2: 0x000000011786b8c2


Binary Images:
       0x2083f4000 -        0x208493fff dyld (*) <1289b60a-4980-342d-b1a4-250bbee392f1> /usr/lib/dyld
       0x1117da000 -        0x111855fff libc++.1.dylib (*) <59e45d36-caa7-3061-9c6b-4fdc9c7635cf> /Volumes/VOLUME/*/libc++.1.dylib
       0x110dbb000 -        0x110dcffff libc++abi.dylib (*) <d7bb956d-31b7-3243-a3d7-e8ace54e1752> /Volumes/VOLUME/*/libc++abi.dylib
       0x112018000 -        0x1122a7fff libicucore.A.dylib (*) <51dca1ce-d3de-3ceb-9085-0ffee6405bef> /Volumes/VOLUME/*/libicucore.A.dylib
       0x111602000 -        0x11177dfff libsqlite3.dylib (*) <63b7cdb9-94b8-3cf0-88e0-65ce127344c9> /Volumes/VOLUME/*/libsqlite3.dylib
       0x110d7c000 -        0x110d8ffff libz.1.dylib (*) <34ac5699-9069-3ff9-a142-ad85542a8c6d> /Volumes/VOLUME/*/libz.1.dylib
       0x110d5e000 -        0x110d5efff com.apple.avfoundation (2.0) <f0436ba3-424a-32de-8051-13091b93cde2> /Volumes/VOLUME/*/AVFoundation.framework/AVFoundation
       0x110d69000 -        0x110d69fff com.apple.Accelerate (1.11) <15e7f33f-15c0-3297-bd11-81f37b8358d2> /Volumes/VOLUME/*/Accelerate.framework/Accelerate
       0x11192d000 -        0x11193dfff com.apple.AssetsLibrary (1.0) <037e3f02-dd47-32dd-8d70-7e26c83b42f8> /Volumes/VOLUME/*/AssetsLibrary.framework/AssetsLibrary
       0x111d8d000 -        0x111edafff com.apple.audio.toolbox.AudioToolbox (1.8) <98480ead-cdfd-335c-b4e7-e452a754ac43> /Volumes/VOLUME/*/AudioToolbox.framework/AudioToolbox
       0x112d35000 -        0x1130d9fff com.apple.CFNetwork (1.0) <e15e69d3-f664-3c48-a5f9-d1e19d540288> /Volumes/VOLUME/*/CFNetwork.framework/CFNetwork
       0x1144ac000 -        0x114d15fff com.apple.CoreGraphics (2.0) <6b80f8ae-4324-3cc3-a5fe-b34281a247ac> /Volumes/VOLUME/*/CoreGraphics.framework/CoreGraphics
       0x1123c0000 -        0x112774fff com.apple.CoreImage (18.0.0) <1de8427c-6e22-37e3-add7-4322fac
       0x104a43000 -        0x10608afff com.my.app (1.0) <de3f581c-301e-35de-8a5f-ba3131f47c66> /Users/USER/Library/Developer/CoreSimulator/Devices/25A8C041-B8E4-446A-8A27-55C5731E783A/data/Containers/Bundle/Application/FAD24FDF-05FE-4E12-8DEF-2E723B2B3250/MyApp.app/MyApp
       0x11074e000 -        0x1107a5fff dyld_sim (*) <73f239b0-6438-3d25-9ce1-214e4bbc75de> /Volumes/VOLUME/*/dyld_sim
               0x0 - 0xffffffffffffffff ??? (*) <00000000-0000-0000-0000-000000000000> ???

Error Formulating Crash Report:
dyld_process_snapshot_get_shared_cache failed
PC register does not match crashing frame (0x0 vs 0x1082C1A78)

EOF

-----------
Full Report
-----------

{"app_name":"MyApp","timestamp":"2023-10-05 10:07:19.00 +0630","app_version":"1.0","slice_uuid":"de3f581c-301e-35de-8a5f-ba3131f47c66","build_version":"1","platform":7,"bundleID":"com.my.app","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 14.0 (23A344)","roots_installed":0,"name":"MyApp","incident_id":"FDD163B9-2A7D-4004-AA72-0B677465E0D7"}
{
  "uptime" : 4800,
  "procRole" : "Foreground",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacBookPro17,1",
  "coalitionID" : 5606,
  "osVersion" : {
    "train" : "macOS 14.0",
    "build" : "23A344",
    "releaseType" : "User"
  },
  "captureTime" : "2023-10-05 10:06:51.7691 +0630",
  "codeSigningMonitor" : 1,
  "incident" : "FDD163B9-2A7D-4004-AA72-0B677465E0D7",
  "pid" : 22948,
  "translated" : true,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-10-05 10:06:41.6848 +0630",
  "procStartAbsTime" : 115975078236,
  "procExitAbsTime" : 116216782406,
  "procName" : "MyApp",
  "procPath" : "/Users/USER/Library/Developer/CoreSimulator/Devices/25A8C041-B8E4-446A-8A27-55C5731E783A/data/Containers/Bundle/Application/FAD24FDF-05FE-4E12-8DEF-2E723B2B3250/MyApp.app/MyApp",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"com.my.app"},
  "storeInfo" : {"deviceIdentifierForVendor":"AE7E8A52-5B95-5F6D-B67A-392A866659F4","thirdParty":true},
  "parentProc" : "launchd_sim",
  "parentPid" : 12210,
  "coalitionName" : "com.apple.CoreSimulator.SimDevice.25A8C041-B8E4-446A-8A27-55C5731E783A",
  "crashReporterKey" : "891D0A04-EC30-4A74-60A3-B1B12FFE62E1",
  "responsiblePid" : 944,
  "responsibleProc" : "SimulatorTrampoline",
  "codeSigningID" : "com.my.app",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 570425861,
  "codeSigningValidationCategory" : 10,
  "codeSigningTrustLevel" : 4294967295,
  "wakeTime" : 3817,
  "sleepWakeUUID" : "7044A994-60F8-4E21-845A-216F95065C06",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
  "termination" : {"namespace":"OBJC","flags":646,"code":1},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":3,"task_for_pid":5},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":125521,"threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":128},"r12":{"value":128},"rosetta":{"tmp2":{"value":4689672386},"tmp1":{"value":4432075340},"tmp0":{"value":18446744073709551615}},"rbx":{"value":0},"r8":{"value":105553118904320},"r15":{"value":0},"r10":{"value":0},"rdx":{"value":0},"rdi":{"value":137438953472},"r9":{"value":128},"r13":{"value":0},"rflags":{"value":643},"rax":{"value":8},"rsp":{"value":105553118904320},"r11":{"value":6998721842871559538},"rcx":{"value":1},"r14":{"value":8},"rsi":{"value":0}},"queue":"com.apple.main-thread","frames":[{"imageOffset":4432075384,"imageIndex":680},{"imageOffset":4434746804,"region":"<translation info unavailable>","imageIndex":680},{"imageOffset":174274,"symbol":"abort_with_payload_wrapper_internal","symbolLocation":82,"imageIndex":96},{"imageOffset":174192,"symbol":"abort_with_reason","symbolLocation":19,"imageIndex":96},{"imageOffset":161171,"symbol":"_objc_fatalv(unsigned long long, unsigned long long, char const*, __va_list_tag*)","symbolLocation":121,"imageIndex":30},{"imageOffset":161050,"symbol":"_objc_fatal(char const*, ...)","symbolLocation":114,"imageIndex":30},{"imageOffset":71277,"symbol":"load_images","symbolLocation":1383,"imageIndex":30},{"imageOffset":45211,"symbol":"dyld4::RuntimeState::notifyObjCInit(dyld4::Loader const*)","symbolLocation":359,"imageIndex":679},{"imageOffset":67388,"symbol":"dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&) const","symbolLocation":182,"imageIndex":679},{"imageOffset":79002,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_1::operator()() const","symbolLocation":92,"imageIndex":679},{"imageOffset":67549,"symbol":"dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const","symbolLocation":93,"imageIndex":679},{"imageOffset":156639,"symbol":"dyld4::APIs::runAllInitializersForMain()","symbolLocation":263,"imageIndex":679},{"imageOffset":8458,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":2535,"imageIndex":679},{"imageOffset":4950,"symbol":"_dyld_sim_prepare","symbolLocation":854,"imageIndex":679},{"imageOffset":32291,"symbol":"dyld4::prepareSim(dyld4::RuntimeState&, char const*)","symbolLocation":1459,"imageIndex":0},{"imageOffset":26089,"symbol":"dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)","symbolLocation":205,"imageIndex":0},{"imageOffset":25407,"symbol":"start","symbolLocation":1839,"imageIndex":0}]},{"id":125522,"name":"com.apple.rosetta.exceptionserver","threadState":{"flavor":"x86_THREAD_STATE","rbp":{"value":6609954668544},"r12":{"value":0},"rosetta":{"tmp2":{"value":0},"tmp1":{"value":0},"tmp0":{"value":0}},"rbx":{"value":0},"r8":{"value":1539},"r15":{"value":0},"r10":{"value":4566745924},"rdx":{"value":0},"rdi":{"value":0},"r9":{"value":4566745956},"r13":{"value":0},"rflags":{"value":515},"rax":{"value":268451845},"rsp":{"value":0},"r11":{"value":0},"rcx":{"value":17314086914},"r14":{"value":0},"rsi":{"value":2616}},"frames":[{"imageOffset":140703125381812,"imageIndex":680}]}],
  "usedImages" : [
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 8728297472,
    "size" : 655360,
    "uuid" : "1289b60a-4980-342d-b1a4-250bbee392f1",
    "path" : "/usr/lib/dyld",
    "name" : "dyld"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4588412928,
    "size" : 507904,
    "uuid" : "59e45d36-caa7-3061-9c6b-4fdc9c7635cf",
    "path" : "/Volumes/VOLUME/*/libc++.1.dylib",
    "name" : "libc++.1.dylib"
  },
  
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4651417600,
    "CFBundleShortVersionString" : "3.3.0",
    "CFBundleIdentifier" : "com.apple.ImageIO",
    "size" : 4710400,
    "uuid" : "8e4ae353-fd0c-329e-9b26-a2d15ec6ca07",
    "path" : "/Volumes/VOLUME/*/ImageIO.framework/ImageIO",
    "name" : "ImageIO",
    "CFBundleVersion" : "2488.0.1.6"
  },
  
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 5380513792,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.CBORLibrary",
    "size" : 180224,
    "uuid" : "a767894f-728d-3feb-a319-3e4af4ca0eb1",
    "path" : "/Volumes/VOLUME/*/CBORLibrary.framework/CBORLibrary",
    "name" : "CBORLibrary",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 5379825664,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.apple.AAAFoundationSwift",
    "size" : 307200,
    "uuid" : "9643189f-64e1-3aa0-8c6a-8b5ff2ba3206",
    "path" : "/Volumes/VOLUME/*/AAAFoundationSwift.framework/AAAFoundationSwift",
    "name" : "AAAFoundationSwift",
    "CFBundleVersion" : "1"
  },
  
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4372836352,
    "CFBundleShortVersionString" : "1.0",
    "CFBundleIdentifier" : "com.my.app",
    "size" : 23363584,
    "uuid" : "de3f581c-301e-35de-8a5f-ba3131f47c66",
    "path" : "/Users/USER/Library/Developer/CoreSimulator/Devices/25A8C041-B8E4-446A-8A27-55C5731E783A/data/Containers/Bundle/Application/FAD24FDF-05FE-4E12-8DEF-2E723B2B3250/MyApp.app/MyApp",
    "name" : "MyApp",
    "CFBundleVersion" : "1"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4571062272,
    "size" : 360448,
    "uuid" : "73f239b0-6438-3d25-9ce1-214e4bbc75de",
    "path" : "/Volumes/VOLUME/*/dyld_sim",
    "name" : "dyld_sim"
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "vmSummary" : "ReadOnly portion of Libraries: Total=1.3G resident=0K(0%) swapped_out_or_unallocated=1.3G(100%)nWritable regions: Total=725.5M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=725.5M(100%)nn                                VIRTUAL   REGION nREGION TYPE                        SIZE    COUNT (non-coalesced) n===========                     =======  ======= nKernel Alloc Once                    8K        1 nMALLOC                           558.4M       21 nMALLOC guard page                   16K        4 nRosetta Arena                     4096K        2 nRosetta Generic                   1820K      452 nRosetta IndirectBranch             224K        3 nRosetta JIT                      128.0M        1 nRosetta Return Stack                20K        2 nRosetta Thread Context              20K        2 nStack                             8176K        1 nStack Guard                       56.0M        1 nVM_ALLOCATE                         48K        1 nVM_ALLOCATE (reserved)              20K        2         reserved VM address space (unallocated)n__DATA                            28.2M      875 n__DATA_CONST                      67.4M      664 n__DATA_DIRTY                       100K       12 n__FONT_DATA                          4K        1 n__LINKEDIT                       482.8M      683 n__TEXT                           804.2M      680 ndyld private memory               32.0G       21 nmapped file                        620K        7 n===========                     =======  ======= nTOTAL                             34.1G     3436 nTOTAL, minus reserved VM space    34.1G     3436 n",
  "legacyInfo" : {
  "threadTriggered" : {
    "queue" : "com.apple.main-thread"
  }
},
  "logWritingSignature" : "b755d6db1cd523d51c0011b0aefd2bb7fa02fb1f",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "6297d96be2c9387df974efa4",
      "factorPackIds" : {

      },
      "deploymentId" : 240000014
    },
    {
      "rolloutId" : "645c2d2f9e69a025b0a37e29",
      "factorPackIds" : {

      },
      "deploymentId" : 240000003
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "6dd670af-0633-45e4-ae5f-122ae4df02be",
      "experimentId" : "64406ba83deb637ac8a04419",
      "deploymentId" : 900000017
    }
  ]
},
  "reportNotes" : [
  "dyld_process_snapshot_get_shared_cache failed",
  "PC register does not match crashing frame (0x0 vs 0x1082C1A78)"
]
}

Model: MacBookPro17,1, BootROM 10151.1.1, proc 8:4:4 processors, 8 GB, SMC 
Graphics: Apple M1, Apple M1, Built-In
Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online
Memory Module: LPDDR4, Micron
AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4378), wl0: Jul  8 2023 18:08:48 version 18.20.438.0.7.8.162 FWID 01-f7533da5
AirPort: 
Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
USB Device: USB31Bus
USB Device: SDM439-QRD _SN:7163E15F
USB Device: USB31Bus
Thunderbolt Bus: MacBook Pro, Apple Inc.
Thunderbolt Bus: MacBook Pro, Apple Inc.

I have tried cleaning pod and reinstall it.

2

Answers


  1. unary_function and binary_function are no longer provided in C++17 and newer Standard modes. They can be re-enabled with _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION.

    release note Xcode 15

    Add this code to your Podfile inside post_install and install pods again

      post_install do |installer|
          installer.pods_project.targets.each do |target|
            target.build_configurations.each do |config|
              config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
            end
          end
      end
    
    Login or Signup to reply.
  2. I don’t know if you have the same problem, I found that there is a native problem with some of the libraries, specifically my problem was with react-native-vision-camera, I had to change certain lines to the library files, here is a better explanation of the thread, I hope it helps you:

    commented issue

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search