Xcode Sanitizers and Runtime Issues

RSS for tag

Xcode Runtime Issues are reports of programming errors found at run time. Issues can be found by variety of tools, including Address Sanitizer (ASan), Main Thread Checker (MTC), Thread Sanitizer (TSan), and Undefined Behavior Sanitizer (UBSan).

Posts under Xcode Sanitizers and Runtime Issues tag

195 Posts

Post

Replies

Boosts

Views

Activity

Xcode 14.1 - App is stuck on building after I added new certificate and profile
I have a weird issue where app is just stuck on building after I added new distribution certificate and profile. I am trying to find out this issue since two days now but no luck. I have Embedded pods framework in the app and it looks like some code sign issue somewhere, with pods or during any script run. I tried lot of solutions provided online but no luck. Please let me know if someone else also faced the issue . Weird things is, the moment I switch to my development certificate and profile, build runs fine without any issue. I am using Xcode 14.1.
0
0
1.4k
Mar ’23
Network connection issue
flutter: [16448:89622] Received XPC error Connection invalid for message type 3 kCFNetworkAgentXPCMessageTypePACQuery 2023-03-20 10:10:44.365174+0500 soo_simple_admin[16448:89622] PAC result block not invoked 2023-03-20 10:10:44.365298+0500 soo_simple_admin[16448:89631] [connection] nw_proxy_resolver_create_parsed_array [C1.1.1 proxy pac] Evaluation error: kCFErrorDomainCFNetwork: 308 2023-03-20 10:10:44.488110+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW B28ACB52-CBE1-421A-994E-BBF73EC5C489 [1: Operation not permitted] 2023-03-20 10:10:44.488299+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.1 142.250.185.42:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.490027+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW B0796A5C-A814-477A-9718-9C28E675BE50 [1: Operation not permitted] 2023-03-20 10:10:44.490162+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.2 172.217.18.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.491078+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 68B6B294-9137-4F21-A08C-834647BD8DC6 [1: Operation not permitted] 2023-03-20 10:10:44.491134+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.3 172.217.169.234:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.491755+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 3E4BFC0A-36BC-4D4C-90F2-D18783A03F06 [1: Operation not permitted] 2023-03-20 10:10:44.491859+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.4 216.58.209.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.492437+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW CED668BC-F736-4C97-ACFA-4974C945C465 [1: Operation not permitted] 2023-03-20 10:10:44.492470+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.5 142.250.181.170:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.492976+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 07133559-E135-4D17-85BE-8B742B47FD0D [1: Operation not permitted] 2023-03-20 10:10:44.493010+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.6 142.250.201.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.493568+0500 soo_simple_admin[16448:89631] Connection 1: received failure notification 2023-03-20 10:10:44.493608+0500 soo_simple_admin[16448:89631] Connection 1: failed to connect 1:1, reason -1 2023-03-20 10:10:44.493622+0500 soo_simple_admin[16448:89631] Connection 1: encountered error(1:1) 2023-03-20 10:10:44.493903+0500 soo_simple_admin[16448:89631] Task <08F0D649-FB69-4BFD-A002-B9150919959C>.<1> HTTP load failed, 0/0 bytes (error code: 1 [1:1]) 2023-03-20 10:10:44.494515+0500 soo_simple_admin[16448:89631] Task <08F0D649-FB69-4BFD-A002-B9150919959C>.<1> finished with error [1] Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <08F0D649-FB69-4BFD-A002-B9150919959C>.<1>, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=1, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <08F0D649-FB69-4BFD-A002-B9150919959C>.<1>" ), _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy}
1
0
1.4k
Mar ’23
Address Sanitizier crashes with puts function in Xcode14
The same thing happens with builds for iOS. A clang issue rather than an Xcode issue? Minimum sample source // main1.c #include <stdio.h> int main(int argc, char *argv[]) {  return 0; } int puts( const char *buffer ) { return 0; } Build clang -fsanitize=address -o main1 main1.c Execution result % ./main1  ==17795==ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with: DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib "interceptors not installed" && 0 zsh: abort   ./main1
5
1
2.1k
Feb ’23
iOS: AddressSanitizer false positive: aligned_alloc -> free
It seems the iOS Asan runtime has a false positive around aligned_alloc. Steps to reproduce: Create a new empty ObjC iOS project, then at the beginning insert the line: free(aligned_alloc(16, 128)); Check the "Address Sanitizer" box in the Scheme->Run->Diagnostics, then run it on a device. Result: There is a workaround, however, for anyone else who runs into this--insert this snippet somewhere in your project in global scope. It seems like posix_memalign does not have the same issue. #if defined(__has_feature) && __has_feature(address_sanitizer) extern "C" void *aligned_alloc(size_t __alignment, size_t __size) { void* ret; int res = ::posix_memalign(&ret, __alignment, __size); if (res == 0) { return ret; } return nullptr; } #endif
2
1
1k
Feb ’23
App won't start with AddressSanitizer enabled
We have a huge app with many frameworks. I want to use address sanitizer with it. After enable it in Xcode and recompile the app does not start. dyld[73936]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[73936]: Library not loaded: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation   Referenced from: <926AEF5E-4934-3EA0-BC60-64CC0A28EC0C> /Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/TeamViewer.app/Contents/MacOS/TeamViewer   Reason: tried: '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/Foundation.framework/Versions/C/Foundation' (no such file), '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/PackageFrameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file, no dyld cache), '/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file) It looks like Foundation.framework is no longer found. When I try the same thing with a new app from the macOS app template and link it to our frameworks, the app launches normally. I have tried playing with the deployment target, but have no luck getting any clues as to what is going wrong
0
0
1.2k
Feb ’23
Application circumvented Objective-C runtime dealloc initiation for <%s> object
I encountered an error in iOS16.0beta4 version "Application circumvented objective-c runtime dealloc initiation for &amp;lt;%s&amp;gt; object", The same code is fine in iOS16.0beta1. I tried a lot of things, but it still didn't work. By looking at the error, we find that the error occurred in the Dealloc assertion of UIView.m#4628.
6
0
5.1k
Feb ’23
CoreData: Operation could not be completed 'Foundation_GenericObjError error 0'
I'm encountering the error 'Operation could not be completed 'Foundation_GenericObjError error 0'' when loading my canvas on my SignupView. No errors are showing in my code, I've tried all sorts of fixes and nothing seems to work. Any help would be appreciated, if you need more code I will update post. SignupView @Environment(\.managedObjectContext) private var viewContext @FetchRequest( sortDescriptors: [NSSortDescriptor(keyPath: \Account.userSince, ascending: true)], animation: .default)       private var savedAccounts: FetchedResults<Account> .onAppear(perform: userData) .fullScreenCover(isPresented:$showHomeView, content: {             HomeView().environment(\.managedObjectContext, viewContext) func userData() {         Auth.auth().addStateDidChangeListener { auth, user in             if let currentUser = user {                 if savedAccounts.count == 0 {                     // Add data to Core Data                     let userDataToSave = Account(context: viewContext)                     userDataToSave.name = currentUser.displayName                     userDataToSave.userID = currentUser.uid                     userDataToSave.numberOfCertificates = 0                     userDataToSave.profileImage = nil                     userDataToSave.userSince = Date()                     do {                         try viewContext.save()                         DispatchQueue.main.async {                             showHomeView.toggle()                         }                     } catch let error {                         alertTitle = "Could not create an account"                         alertMessage = error.localizedDescription                         showAlertView.toggle()                     }                 } else {                     showHomeView.toggle()                 }             }         }     } **Persistance ** import CoreData struct PersistenceController {     static let shared = PersistenceController()     let container: NSPersistentCloudKitContainer     init(inMemory: Bool = false) {         container = NSPersistentCloudKitContainer(name: "ChuckleApp")         container.viewContext.automaticallyMergesChangesFromParent = true         if inMemory {             container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")         }         container.loadPersistentStores(completionHandler: { (storeDescription, error) in             if let error = error as NSError? {                 print("Unresolved error \(error), \(error.userInfo)")             } else {                 print("Store has been loaded")             }         })     } } Main import SwiftUI import Firebase import CoreData @main struct ChuckleAppApp: App {     let persistenceController = PersistenceController.shared          init() {             FirebaseApp.configure()         }     var body: some Scene {         WindowGroup {             SignupView()                 .environment(\.managedObjectContext, persistenceController.container.viewContext)         }     } }
1
0
1.7k
Jan ’23
Mac M1 - Xcode 14.1 Simulator issue.
App screen is not rendering and displaying only white screen when build on Simulator with IOS version 14,15,16. Working properly on Simulator with IOS version 12,13 & 16.1 And getting below log continuous in Output tab. _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x00295c4c 254d3b47 ef660040 46687849 ... 38294708 bda9d394 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xe40a93b2 42ecd580 8aa59195 baeb3d06 ... fc165df2 652383a4 }}
0
0
1.1k
Dec ’22
XCode runtime error unrecognized selector sent to instance
Hi all, I am recieving this runtime error, "[Shopping_List.AddItemViewController save:]: unrecognized selector sent to instance ..." any help would be greatly appreciated, thank you!! // // AppDelegate.swift // Shopping List // // Created by Deepak Prasad on 1/10/22. // import UIKit protocol AddItemViewControllerDelegate {   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) } class AddItemViewController: UIViewController {       @IBOutlet var nameTextField: UITextField!   @IBOutlet var priceTextField: UITextField!       var delegate: AddItemViewControllerDelegate?       // MARK: -   // MARK: View Life Cycle   override func viewDidLoad() {     super.viewDidLoad()   }       // MARK: -   // MARK: Actions   @IBAction func cancel(sender: UIBarButtonItem) {     dismiss(animated: true, completion: nil)   }       @IBAction func save(sender: UIBarButtonItem) {     if let name = nameTextField.text, let priceAsString = priceTextField.text, let price = Float(priceAsString) {       // Notify Delegate       delegate?.controller(controller: self, didSaveItemWithName: name, andPrice: price)               // Dismiss View Controller       dismiss(animated: true, completion: nil)     }   } }
2
1
2.1k
Oct ’22
Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 Xcode 13.0 (19234) (Build 13A233)
Seems like there's a bug with code signing in Xcode... will load package on a simulator, but not on an actual device after creating an .ipa for development testing. There should be an update to fix this error. Details as follows: Details Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 User Info: {     IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- No code signature found. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 User Info: {     DVTRadarComponentKey = 261622;     MobileDeviceErrorCode = "(0xE800801C)";     "com.apple.dtdevicekit.stacktrace" = ( 0   DTDeviceKitBase                     0x0000000125237316 DTDKCreateNSErrorFromAMDErrorCode + 220 1   DTDeviceKitBase                     0x000000012527584a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155 2   DVTFoundation                       0x00000001064b6ed4 DVTInvokeWithStrongOwnership + 71 3   DTDeviceKitBase                     0x0000000125275594 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1420 4   IDEiOSSupportCore                   0x0000000117dedb4e __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3508 5   DVTFoundation                       0x00000001065eac37 __DVT_CALLING_CLIENT_BLOCK__ + 7 6   DVTFoundation                       0x00000001065ec3a3 __DVTDispatchAsync_block_invoke + 931 7   libdispatch.dylib                   0x00007fff2035a623 _dispatch_call_block_and_release + 12 8   libdispatch.dylib                   0x00007fff2035b806 _dispatch_client_callout + 8 9   libdispatch.dylib                   0x00007fff203615ea _dispatch_lane_serial_drain + 606 10  libdispatch.dylib                   0x00007fff203620ad _dispatch_lane_invoke + 366 11  libdispatch.dylib                   0x00007fff2036bc0d _dispatch_workloop_worker_thread + 811 12  libsystem_pthread.dylib             0x00007fff2050245d _pthread_wqthread + 314 13  libsystem_pthread.dylib             0x00007fff2050142f start_wqthread + 15 ); } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {     "device_model" = "iPhone8,4";     "device_osBuild" = "14.6 (18F72)";     "device_platform" = "com.apple.platform.iphoneos";     "launchSession_schemeCommand" = Run;     "launchSession_state" = 1;     "launchSession_targetArch" = arm64;     "operation_duration_ms" = 1948;     "operation_errorCode" = "-402620388";     "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";     "operation_errorWorker" = IDEInstalliPhoneLauncher;     "operation_name" = IDEiPhoneRunOperationWorkerGroup;     "param_consoleMode" = 0;     "param_debugger_attachToExtensions" = 0;     "param_debugger_attachToXPC" = 1;     "param_debugger_type" = 5;     "param_destination_isProxy" = 0;     "param_destination_platform" = "com.apple.platform.iphoneos";     "param_diag_MainThreadChecker_stopOnIssue" = 0;     "param_diag_MallocStackLogging_enableDuringAttach" = 0;     "param_diag_MallocStackLogging_enableForXPC" = 1;     "param_diag_allowLocationSimulation" = 1;     "param_diag_gpu_frameCapture_enable" = 0;     "param_diag_gpu_shaderValidation_enable" = 0;     "param_diag_gpu_validation_enable" = 0;     "param_diag_memoryGraphOnResourceException" = 0;     "param_diag_queueDebugging_enable" = 1;     "param_diag_runtimeProfile_generate" = 0;     "param_diag_sanitizer_asan_enable" = 0;     "param_diag_sanitizer_tsan_enable" = 0;     "param_diag_sanitizer_tsan_stopOnIssue" = 0;     "param_diag_sanitizer_ubsan_stopOnIssue" = 0;     "param_diag_showNonLocalizedStrings" = 0;     "param_diag_viewDebugging_enabled" = 1;     "param_diag_viewDebugging_insertDylibOnLaunch" = 1;     "param_install_style" = 0;     "param_launcher_UID" = 2;     "param_launcher_allowDeviceSensorReplayData" = 0;     "param_launcher_kind" = 0;     "param_launcher_style" = 0;     "param_launcher_substyle" = 0;     "param_runnable_appExtensionHostRunMode" = 0;     "param_runnable_productType" = "com.apple.product-type.application";     "param_runnable_swiftVersion" = "5.5";     "param_runnable_type" = 2;     "param_testing_launchedForTesting" = 0;     "param_testing_suppressSimulatorApp" = 0;     "param_testing_usingCLI" = 0;     "sdk_canonicalName" = "iphoneos15.0";     "sdk_osVersion" = "15.0";     "sdk_variant" = iphoneos; } -- System Information macOS Version 11.6 (Build 20G165) Xcode 13.0 (19234) (Build 13A233) Timestamp: 2021-10-20T23:50:45-04:00
2
1
9.9k
Oct ’22
XCode Runtime Error, unrecognized selector sent to instance
Hi everyone, I am new to xcode and am getting this runtime error when I click on the add button for my application. Any help would go along away, thank you! Error: "Exception NSException * "-[Shopping_List.ListViewController addItems:]: unrecognized selector sent to instance 0x7f8fe6507b50" 0x000060000263b690" override func viewDidLoad() {     super.viewDidLoad()           // Set Title     title = "Items"           // Register Class     tableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: CellIdentifier)           // Create Add Button     navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(UIPushBehavior.addItem(_:)))           // Create Edit Button     navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: Selector(("editItems:")))   } // MARK: -   // MARK: Add Item View Controller Delegate Methods   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) {     // Create Item     let item = Item(name: name, price: price)           // Add Item to Items     items.append(item)           // Add Row to Table View     tableView.insertRows(at: [IndexPath(row: (items.count - 1), section: 0)], with: .none)          // Save Items     saveItems()   } // MARK: -   // MARK: Actions   func addItem(sender: UIBarButtonItem) {     performSegue(withIdentifier: "AddItemViewController", sender: self)   }       func editItems(sender: UIBarButtonItem) {     tableView.setEditing(!tableView.isEditing, animated: true)   }
4
0
1.4k
Oct ’22
XCode error "Cannot convert value of type 'NSIndexPath' to expected element type 'Array<IndexPath>.ArrayLiteralElement' (aka 'IndexPath')"
Hi everyone I am new to XCode and I am following an online tutorial for a shopping list program. I have this error that appears twice, "Cannot convert value of type 'NSIndexPath' to expected element type 'Array.ArrayLiteralElement' (aka 'IndexPath')". The tutorial I'm following is here if you need it: https://code.tutsplus.com/tutorials/ios-from-scratch-with-swift-building-a-shopping-list-application-2--cms-25516 If anyone is able to help me out or give me some guidance that would be greatly appreciated, thank you! // MARK: -   // MARK: Add Item View Controller Delegate Methods   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) {     // Create Item     let item = Item(name: name, price: price)           // Add Item to Items     items.append(item)           // Add Row to Table View     tableView.insertRowsAtIndexPaths([NSIndexPath(forRow: (items.count - 1), inSection: 0)], withRowAnimation: .None)     // The line above is where the error occurs     // Save Items     saveItems()   }       // MARK: -   // MARK: Edit Item View Controller Delegate Methods   func controller(controller: EditItemViewController, didUpdateItem item: Item) {     // Fetch Index for Item     if let index = items.firstIndex(of:item) {       // Update Table View       tableView.reloadRowsAtIndexPaths([NSIndexPath(forRow: index, inSection: 0)], withRowAnimation: .Fade)      // The line above is where the error occurs     }           // Save Items     saveItems()   }
2
1
2.9k
Oct ’22
Proper way to display error alert during drawing from main thread
Sometimes while drawing from my main thread I have error conditions that I need to relay to the user, and often need to get the user to interact (enter text, press a button, etc) -- and then CONTINUE from inside the main thread drawing process that was interrupted. However, the main thread doesn't like it when you try to draw while already drawing from within the main thread (I think it even throws an exception if you try). Is there a canonical approach to handling errors that occur during drawing that require more sophisticated error handling?
3
0
1.4k
Oct ’22
Xcode 14.1 - App is stuck on building after I added new certificate and profile
I have a weird issue where app is just stuck on building after I added new distribution certificate and profile. I am trying to find out this issue since two days now but no luck. I have Embedded pods framework in the app and it looks like some code sign issue somewhere, with pods or during any script run. I tried lot of solutions provided online but no luck. Please let me know if someone else also faced the issue . Weird things is, the moment I switch to my development certificate and profile, build runs fine without any issue. I am using Xcode 14.1.
Replies
0
Boosts
0
Views
1.4k
Activity
Mar ’23
Network connection issue
flutter: [16448:89622] Received XPC error Connection invalid for message type 3 kCFNetworkAgentXPCMessageTypePACQuery 2023-03-20 10:10:44.365174+0500 soo_simple_admin[16448:89622] PAC result block not invoked 2023-03-20 10:10:44.365298+0500 soo_simple_admin[16448:89631] [connection] nw_proxy_resolver_create_parsed_array [C1.1.1 proxy pac] Evaluation error: kCFErrorDomainCFNetwork: 308 2023-03-20 10:10:44.488110+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW B28ACB52-CBE1-421A-994E-BBF73EC5C489 [1: Operation not permitted] 2023-03-20 10:10:44.488299+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.1 142.250.185.42:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.490027+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW B0796A5C-A814-477A-9718-9C28E675BE50 [1: Operation not permitted] 2023-03-20 10:10:44.490162+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.2 172.217.18.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.491078+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 68B6B294-9137-4F21-A08C-834647BD8DC6 [1: Operation not permitted] 2023-03-20 10:10:44.491134+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.3 172.217.169.234:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.491755+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 3E4BFC0A-36BC-4D4C-90F2-D18783A03F06 [1: Operation not permitted] 2023-03-20 10:10:44.491859+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.4 216.58.209.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.492437+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW CED668BC-F736-4C97-ACFA-4974C945C465 [1: Operation not permitted] 2023-03-20 10:10:44.492470+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.5 142.250.181.170:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.492976+0500 soo_simple_admin[16448:89631] [] nw_path_evaluator_create_flow_inner NECP_CLIENT_ACTION_ADD_FLOW 07133559-E135-4D17-85BE-8B742B47FD0D [1: Operation not permitted] 2023-03-20 10:10:44.493010+0500 soo_simple_admin[16448:89631] [connection] nw_endpoint_flow_setup_channel [C1.1.1.1.6 142.250.201.138:443 in_progress channel-flow (satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy)] failed to request add nexus flow 2023-03-20 10:10:44.493568+0500 soo_simple_admin[16448:89631] Connection 1: received failure notification 2023-03-20 10:10:44.493608+0500 soo_simple_admin[16448:89631] Connection 1: failed to connect 1:1, reason -1 2023-03-20 10:10:44.493622+0500 soo_simple_admin[16448:89631] Connection 1: encountered error(1:1) 2023-03-20 10:10:44.493903+0500 soo_simple_admin[16448:89631] Task <08F0D649-FB69-4BFD-A002-B9150919959C>.<1> HTTP load failed, 0/0 bytes (error code: 1 [1:1]) 2023-03-20 10:10:44.494515+0500 soo_simple_admin[16448:89631] Task <08F0D649-FB69-4BFD-A002-B9150919959C>.<1> finished with error [1] Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <08F0D649-FB69-4BFD-A002-B9150919959C>.<1>, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=1, _NSURLErrorRelatedURLSessionTaskErrorKey=( "LocalDataTask <08F0D649-FB69-4BFD-A002-B9150919959C>.<1>" ), _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, proxy}
Replies
1
Boosts
0
Views
1.4k
Activity
Mar ’23
Address Sanitizier crashes with puts function in Xcode14
The same thing happens with builds for iOS. A clang issue rather than an Xcode issue? Minimum sample source // main1.c #include <stdio.h> int main(int argc, char *argv[]) {  return 0; } int puts( const char *buffer ) { return 0; } Build clang -fsanitize=address -o main1 main1.c Execution result % ./main1  ==17795==ERROR: Interceptors are not working. This may be because AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the executable with: DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib "interceptors not installed" && 0 zsh: abort   ./main1
Replies
5
Boosts
1
Views
2.1k
Activity
Feb ’23
iOS: AddressSanitizer false positive: aligned_alloc -> free
It seems the iOS Asan runtime has a false positive around aligned_alloc. Steps to reproduce: Create a new empty ObjC iOS project, then at the beginning insert the line: free(aligned_alloc(16, 128)); Check the "Address Sanitizer" box in the Scheme->Run->Diagnostics, then run it on a device. Result: There is a workaround, however, for anyone else who runs into this--insert this snippet somewhere in your project in global scope. It seems like posix_memalign does not have the same issue. #if defined(__has_feature) && __has_feature(address_sanitizer) extern "C" void *aligned_alloc(size_t __alignment, size_t __size) { void* ret; int res = ::posix_memalign(&ret, __alignment, __size); if (res == 0) { return ret; } return nullptr; } #endif
Replies
2
Boosts
1
Views
1k
Activity
Feb ’23
App won't start with AddressSanitizer enabled
We have a huge app with many frameworks. I want to use address sanitizer with it. After enable it in Xcode and recompile the app does not start. dyld[73936]: dyld cache '(null)' not loaded: syscall to map cache into shared region failed dyld[73936]: Library not loaded: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation   Referenced from: <926AEF5E-4934-3EA0-BC60-64CC0A28EC0C> /Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/TeamViewer.app/Contents/MacOS/TeamViewer   Reason: tried: '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/Foundation.framework/Versions/C/Foundation' (no such file), '/Users/schmitt/Library/Developer/Xcode/DerivedData/TeamViewerWorkspace-bzqkzpkzdmerjreghjwkjpbhtmua/Build/Products/Debug/PackageFrameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file), '/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file, no dyld cache), '/Library/Frameworks/Foundation.framework/Versions/C/Foundation' (no such file) It looks like Foundation.framework is no longer found. When I try the same thing with a new app from the macOS app template and link it to our frameworks, the app launches normally. I have tried playing with the deployment target, but have no luck getting any clues as to what is going wrong
Replies
0
Boosts
0
Views
1.2k
Activity
Feb ’23
Unable to build xcode app - Failed with exit code exited with status 1
Hi , Anyone faced the error like x-xcode-log://. Attached is the screenshot for your reference. [object Object] I have tried the following ways to resolve this error.* Cleaning the build Restart the XCode Deleting the derived data Resetting the Keychain But nothing helped. Anyone has solution for this?
Replies
1
Boosts
0
Views
2.2k
Activity
Feb ’23
Application circumvented Objective-C runtime dealloc initiation for <%s> object
I encountered an error in iOS16.0beta4 version "Application circumvented objective-c runtime dealloc initiation for &amp;lt;%s&amp;gt; object", The same code is fine in iOS16.0beta1. I tried a lot of things, but it still didn't work. By looking at the error, we find that the error occurred in the Dealloc assertion of UIView.m#4628.
Replies
6
Boosts
0
Views
5.1k
Activity
Feb ’23
Error while compiling in VS Code but not in Xcode
Hi, I am a student and I keep switching between VS Code and Xcode, but now every time I compile a code in VS Code it gives an error --> "clang: error: linker command failed with exit code 1" but the same code can be build successfully in Xcode. How do I fix this error?
Replies
4
Boosts
1
Views
3.5k
Activity
Jan ’23
CoreData: Operation could not be completed 'Foundation_GenericObjError error 0'
I'm encountering the error 'Operation could not be completed 'Foundation_GenericObjError error 0'' when loading my canvas on my SignupView. No errors are showing in my code, I've tried all sorts of fixes and nothing seems to work. Any help would be appreciated, if you need more code I will update post. SignupView @Environment(\.managedObjectContext) private var viewContext @FetchRequest( sortDescriptors: [NSSortDescriptor(keyPath: \Account.userSince, ascending: true)], animation: .default)       private var savedAccounts: FetchedResults<Account> .onAppear(perform: userData) .fullScreenCover(isPresented:$showHomeView, content: {             HomeView().environment(\.managedObjectContext, viewContext) func userData() {         Auth.auth().addStateDidChangeListener { auth, user in             if let currentUser = user {                 if savedAccounts.count == 0 {                     // Add data to Core Data                     let userDataToSave = Account(context: viewContext)                     userDataToSave.name = currentUser.displayName                     userDataToSave.userID = currentUser.uid                     userDataToSave.numberOfCertificates = 0                     userDataToSave.profileImage = nil                     userDataToSave.userSince = Date()                     do {                         try viewContext.save()                         DispatchQueue.main.async {                             showHomeView.toggle()                         }                     } catch let error {                         alertTitle = "Could not create an account"                         alertMessage = error.localizedDescription                         showAlertView.toggle()                     }                 } else {                     showHomeView.toggle()                 }             }         }     } **Persistance ** import CoreData struct PersistenceController {     static let shared = PersistenceController()     let container: NSPersistentCloudKitContainer     init(inMemory: Bool = false) {         container = NSPersistentCloudKitContainer(name: "ChuckleApp")         container.viewContext.automaticallyMergesChangesFromParent = true         if inMemory {             container.persistentStoreDescriptions.first!.url = URL(fileURLWithPath: "/dev/null")         }         container.loadPersistentStores(completionHandler: { (storeDescription, error) in             if let error = error as NSError? {                 print("Unresolved error \(error), \(error.userInfo)")             } else {                 print("Store has been loaded")             }         })     } } Main import SwiftUI import Firebase import CoreData @main struct ChuckleAppApp: App {     let persistenceController = PersistenceController.shared          init() {             FirebaseApp.configure()         }     var body: some Scene {         WindowGroup {             SignupView()                 .environment(\.managedObjectContext, persistenceController.container.viewContext)         }     } }
Replies
1
Boosts
0
Views
1.7k
Activity
Jan ’23
Main Thread Checker recommends NOT calling NSApplicationMain from the main thread
I have just used the Main Thread Checker which is certainly helpful. However warning puzzles me. I call NSApplicationMain from main. This seems disturbing for the Main Thread Checker. Should I be concerned?
Replies
2
Boosts
0
Views
877
Activity
Dec ’22
Mac M1 - Xcode 14.1 Simulator issue.
App screen is not rendering and displaying only white screen when build on Simulator with IOS version 14,15,16. Working properly on Simulator with IOS version 12,13 & 16.1 And getting below log continuous in Output tab. _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x00295c4c 254d3b47 ef660040 46687849 ... 38294708 bda9d394 }, _LSLine=405, WrongSimulatorHash={length = 32, bytes = 0xe40a93b2 42ecd580 8aa59195 baeb3d06 ... fc165df2 652383a4 }}
Replies
0
Boosts
0
Views
1.1k
Activity
Dec ’22
XCode runtime error unrecognized selector sent to instance
Hi all, I am recieving this runtime error, "[Shopping_List.AddItemViewController save:]: unrecognized selector sent to instance ..." any help would be greatly appreciated, thank you!! // // AppDelegate.swift // Shopping List // // Created by Deepak Prasad on 1/10/22. // import UIKit protocol AddItemViewControllerDelegate {   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) } class AddItemViewController: UIViewController {       @IBOutlet var nameTextField: UITextField!   @IBOutlet var priceTextField: UITextField!       var delegate: AddItemViewControllerDelegate?       // MARK: -   // MARK: View Life Cycle   override func viewDidLoad() {     super.viewDidLoad()   }       // MARK: -   // MARK: Actions   @IBAction func cancel(sender: UIBarButtonItem) {     dismiss(animated: true, completion: nil)   }       @IBAction func save(sender: UIBarButtonItem) {     if let name = nameTextField.text, let priceAsString = priceTextField.text, let price = Float(priceAsString) {       // Notify Delegate       delegate?.controller(controller: self, didSaveItemWithName: name, andPrice: price)               // Dismiss View Controller       dismiss(animated: true, completion: nil)     }   } }
Replies
2
Boosts
1
Views
2.1k
Activity
Oct ’22
Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 Xcode 13.0 (19234) (Build 13A233)
Seems like there's a bug with code signing in Xcode... will load package on a simulator, but not on an actual device after creating an .ipa for development testing. There should be an update to fix this error. Details as follows: Details Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 User Info: {     IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- No code signature found. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620388 User Info: {     DVTRadarComponentKey = 261622;     MobileDeviceErrorCode = "(0xE800801C)";     "com.apple.dtdevicekit.stacktrace" = ( 0   DTDeviceKitBase                     0x0000000125237316 DTDKCreateNSErrorFromAMDErrorCode + 220 1   DTDeviceKitBase                     0x000000012527584a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155 2   DVTFoundation                       0x00000001064b6ed4 DVTInvokeWithStrongOwnership + 71 3   DTDeviceKitBase                     0x0000000125275594 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1420 4   IDEiOSSupportCore                   0x0000000117dedb4e __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3508 5   DVTFoundation                       0x00000001065eac37 __DVT_CALLING_CLIENT_BLOCK__ + 7 6   DVTFoundation                       0x00000001065ec3a3 __DVTDispatchAsync_block_invoke + 931 7   libdispatch.dylib                   0x00007fff2035a623 _dispatch_call_block_and_release + 12 8   libdispatch.dylib                   0x00007fff2035b806 _dispatch_client_callout + 8 9   libdispatch.dylib                   0x00007fff203615ea _dispatch_lane_serial_drain + 606 10  libdispatch.dylib                   0x00007fff203620ad _dispatch_lane_invoke + 366 11  libdispatch.dylib                   0x00007fff2036bc0d _dispatch_workloop_worker_thread + 811 12  libsystem_pthread.dylib             0x00007fff2050245d _pthread_wqthread + 314 13  libsystem_pthread.dylib             0x00007fff2050142f start_wqthread + 15 ); } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {     "device_model" = "iPhone8,4";     "device_osBuild" = "14.6 (18F72)";     "device_platform" = "com.apple.platform.iphoneos";     "launchSession_schemeCommand" = Run;     "launchSession_state" = 1;     "launchSession_targetArch" = arm64;     "operation_duration_ms" = 1948;     "operation_errorCode" = "-402620388";     "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain";     "operation_errorWorker" = IDEInstalliPhoneLauncher;     "operation_name" = IDEiPhoneRunOperationWorkerGroup;     "param_consoleMode" = 0;     "param_debugger_attachToExtensions" = 0;     "param_debugger_attachToXPC" = 1;     "param_debugger_type" = 5;     "param_destination_isProxy" = 0;     "param_destination_platform" = "com.apple.platform.iphoneos";     "param_diag_MainThreadChecker_stopOnIssue" = 0;     "param_diag_MallocStackLogging_enableDuringAttach" = 0;     "param_diag_MallocStackLogging_enableForXPC" = 1;     "param_diag_allowLocationSimulation" = 1;     "param_diag_gpu_frameCapture_enable" = 0;     "param_diag_gpu_shaderValidation_enable" = 0;     "param_diag_gpu_validation_enable" = 0;     "param_diag_memoryGraphOnResourceException" = 0;     "param_diag_queueDebugging_enable" = 1;     "param_diag_runtimeProfile_generate" = 0;     "param_diag_sanitizer_asan_enable" = 0;     "param_diag_sanitizer_tsan_enable" = 0;     "param_diag_sanitizer_tsan_stopOnIssue" = 0;     "param_diag_sanitizer_ubsan_stopOnIssue" = 0;     "param_diag_showNonLocalizedStrings" = 0;     "param_diag_viewDebugging_enabled" = 1;     "param_diag_viewDebugging_insertDylibOnLaunch" = 1;     "param_install_style" = 0;     "param_launcher_UID" = 2;     "param_launcher_allowDeviceSensorReplayData" = 0;     "param_launcher_kind" = 0;     "param_launcher_style" = 0;     "param_launcher_substyle" = 0;     "param_runnable_appExtensionHostRunMode" = 0;     "param_runnable_productType" = "com.apple.product-type.application";     "param_runnable_swiftVersion" = "5.5";     "param_runnable_type" = 2;     "param_testing_launchedForTesting" = 0;     "param_testing_suppressSimulatorApp" = 0;     "param_testing_usingCLI" = 0;     "sdk_canonicalName" = "iphoneos15.0";     "sdk_osVersion" = "15.0";     "sdk_variant" = iphoneos; } -- System Information macOS Version 11.6 (Build 20G165) Xcode 13.0 (19234) (Build 13A233) Timestamp: 2021-10-20T23:50:45-04:00
Replies
2
Boosts
1
Views
9.9k
Activity
Oct ’22
XCode Runtime Error, unrecognized selector sent to instance
Hi everyone, I am new to xcode and am getting this runtime error when I click on the add button for my application. Any help would go along away, thank you! Error: "Exception NSException * "-[Shopping_List.ListViewController addItems:]: unrecognized selector sent to instance 0x7f8fe6507b50" 0x000060000263b690" override func viewDidLoad() {     super.viewDidLoad()           // Set Title     title = "Items"           // Register Class     tableView.register(UITableViewCell.classForCoder(), forCellReuseIdentifier: CellIdentifier)           // Create Add Button     navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(UIPushBehavior.addItem(_:)))           // Create Edit Button     navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .edit, target: self, action: Selector(("editItems:")))   } // MARK: -   // MARK: Add Item View Controller Delegate Methods   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) {     // Create Item     let item = Item(name: name, price: price)           // Add Item to Items     items.append(item)           // Add Row to Table View     tableView.insertRows(at: [IndexPath(row: (items.count - 1), section: 0)], with: .none)          // Save Items     saveItems()   } // MARK: -   // MARK: Actions   func addItem(sender: UIBarButtonItem) {     performSegue(withIdentifier: "AddItemViewController", sender: self)   }       func editItems(sender: UIBarButtonItem) {     tableView.setEditing(!tableView.isEditing, animated: true)   }
Replies
4
Boosts
0
Views
1.4k
Activity
Oct ’22
XCode error "Cannot convert value of type 'NSIndexPath' to expected element type 'Array<IndexPath>.ArrayLiteralElement' (aka 'IndexPath')"
Hi everyone I am new to XCode and I am following an online tutorial for a shopping list program. I have this error that appears twice, "Cannot convert value of type 'NSIndexPath' to expected element type 'Array.ArrayLiteralElement' (aka 'IndexPath')". The tutorial I'm following is here if you need it: https://code.tutsplus.com/tutorials/ios-from-scratch-with-swift-building-a-shopping-list-application-2--cms-25516 If anyone is able to help me out or give me some guidance that would be greatly appreciated, thank you! // MARK: -   // MARK: Add Item View Controller Delegate Methods   func controller(controller: AddItemViewController, didSaveItemWithName name: String, andPrice price: Float) {     // Create Item     let item = Item(name: name, price: price)           // Add Item to Items     items.append(item)           // Add Row to Table View     tableView.insertRowsAtIndexPaths([NSIndexPath(forRow: (items.count - 1), inSection: 0)], withRowAnimation: .None)     // The line above is where the error occurs     // Save Items     saveItems()   }       // MARK: -   // MARK: Edit Item View Controller Delegate Methods   func controller(controller: EditItemViewController, didUpdateItem item: Item) {     // Fetch Index for Item     if let index = items.firstIndex(of:item) {       // Update Table View       tableView.reloadRowsAtIndexPaths([NSIndexPath(forRow: index, inSection: 0)], withRowAnimation: .Fade)      // The line above is where the error occurs     }           // Save Items     saveItems()   }
Replies
2
Boosts
1
Views
2.9k
Activity
Oct ’22
Proper way to display error alert during drawing from main thread
Sometimes while drawing from my main thread I have error conditions that I need to relay to the user, and often need to get the user to interact (enter text, press a button, etc) -- and then CONTINUE from inside the main thread drawing process that was interrupted. However, the main thread doesn't like it when you try to draw while already drawing from within the main thread (I think it even throws an exception if you try). Is there a canonical approach to handling errors that occur during drawing that require more sophisticated error handling?
Replies
3
Boosts
0
Views
1.4k
Activity
Oct ’22
How to delete the warning 'This method should not be called on the main thread as it may lead to UI unresponsiveness.' shown in xCode14
@autoreleasepool {         return UIApplicationMain(argc, argv, nil, NSStringFromClass([PostAppDelegate class]));     }
Replies
6
Boosts
0
Views
4.3k
Activity
Sep ’22
OS Big Surf for latest version of xCode
Can I use macOS Big Sur, version 11.7 for the latest version of xCode (maybe even teh beta version)? Running 1.4GHz Dual Intel i5 with 4 GB memory and Intel HD 5000 15.36 MB graphics. Thoughts? Will it do the job? Thanks in advance
Replies
1
Boosts
0
Views
853
Activity
Sep ’22
ios 16 "Application circumvented Objective-C runtime dealloc"
When I run the program in Xcode beta4, I get an error with: "Application circumvented Objective-C runtime dealloc",How do I solve this problem
Replies
3
Boosts
2
Views
3.1k
Activity
Sep ’22