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).

Xcode Runtime Issues Documentation

Posts under Xcode Sanitizers and Runtime Issues tag

105 Posts
Sort by:
Post not yet marked as solved
0 Replies
556 Views
In the code below you can see the error and the code used in my xxApp.swift folder. I was creating Sign In and a Sign Up function, and everything worked very well, but then I got this error when clicking on the register button. If you need more code just let me know, thanks in advance! Here is the code of the @main : import Firebase final class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { FirebaseApp.configure() return true } final class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { FirebaseApp.configure() return true }`final class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { FirebaseApp.configure() return true } } @main //"Thread 1: EXC_BAD_ACCESS (code=2, address=0x7ffee1a57ff0)" struct PSMAApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var delegate @StateObject var sessionService = SessionServiceImpl() var body: some Scene { WindowGroup { NavigationView{ switch sessionService.state { case .loggedIn: HomeView() .environmentObject(sessionService) case .loggedOut: LoginView() } } } } }
Posted
by
Post not yet marked as solved
1 Replies
498 Views
The newer more powerful iOS devices are signaling memory limits where older devices did not. Has any iOS developer written about or confronted this problem? With an iOS SpriteKit game in production that demands a lot of memory (1.5GB) on start up, there have been no memory limit crashes in development (Xcode) and no memory crashes on the same devices running the production app available on the AppStore. Recently, users with iPhone 12, iPhone 12 mini, or other iPhone with 4GB RAM, report crash with error: jetsam per-process-limit, or jetsam mem limit: ActiveHard 2098 MB (fatal) iPhone 7, rated at 2GB RAM, runs the downloaded production app with no problem and no memory warnings in the log. iPhone XR, rated at 3GB RAM, runs the app with no problems. iPhone 12 Pro, rated at 6GB runs the app with no problem.
Posted
by
Post not yet marked as solved
0 Replies
582 Views
Hi all, been stuck on this for a week now searching all forums and trying every answer but none seem to work. my game is built with unity and is published on play store with no problems and wish to experiment with IOS so I am new to the Xcode and mac etc and trying to learn a complete new system, I recently purchased a late 2012 mini mac which I upgraded the ram to 16gb and have Xcode 10 installed, version of unity used is 2021.1.16f1. when running the unity project in Xcode to test on an iPhone i also recently purchased iPhone(6) I get the error message :- CodeSign /Users/MacMini/Library/Developer/Xcode/DerivedData/Unity-iPhone-BUNCH OF LETTERS /Build/Products/ReleaseForRunning-iphoneos/JumpingJacks.app/Frameworks/UnityFramework.framework (in target: Unity-iPhone)     cd /Users/MacMini/Desktop/Jumping\ Jacks/FILE NAME     export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate      Signing Identity:     "iPhone Developer: NAME (IPHONE CODE NAME)" Provisioning Profile: "jj test"                       (BUNCH OF LETTERS/NUMBERS)     /usr/bin/codesign --force --sign BUNCH OF LETTERS NUMBERS --preserve-metadata=identifier,entitlements,flags --timestamp=none /Users/MacMini/Library/Developer/Xcode/DerivedData/Unity-iPhone-BUNCH OF LETTERS/Build/Products/ReleaseForRunning-iphoneos/JumpingJacks.app/Frameworks/UnityFramework.framework Warning: unable to build chain to self-signed root for signer "iPhone Developer: NAME (LETTERS/NUMBERS)" /Users/MacMini/Library/Developer/Xcode/DerivedData/Unity-iPhone-BUNCH OF LETTERS/Build/Products/ReleaseForRunning-iphoneos/JumpingJacks.app/Frameworks/UnityFramework.framework: errSecInternalComponent Command CodeSign failed with a nonzero exit code please could someone help me out, tried redoing certs for both apple.developer and keychain, checked unity iOS player settings, build options etc. Thank you.
Posted
by
Post not yet marked as solved
4 Replies
2.5k Views
Hello! I'm working on a new app, and DYLD_PRINT_STATISTICS=1 is not working - i.e., not producing any output. Build platform: MacBook Pro (15-inch, 2018) macOS Monterey, 12.0 beta 6 (21A5506j) Xcode 13.0 beta 5 (13A5212g) Test device: iPad 8th generation iPadOS 15.0 beta 8 (19A5340a) I'm setting it as usual in Product -> Scheme -> Edit Scheme, then going to "Run" tab on the left and choosing "Arguments" on the top. In that screen I enter "DYLD_PRINT_STATISTICS" for Name and "YES" for Value. Nothing prints. I also tried: Using "1" for Value instead of "YES" Entering "DYLD_PRINT_STATISTICS=YES" as Name and leaving Value blank Entering "DYLD_PRINT_STATISTICS=1" as Name and leaving Value blank Every combination of the above, but as command-line arguments instead of environment variables. Also, I tried "DYLD_PRINT_APIS" as Name and "YES" as Value, and that works normally. What's going on here? Is it something with the all-SwiftUI lifecycle? An issue with the beta macOS/Xcode/iPadOS? Thanks!
Posted
by
Post not yet marked as solved
2 Replies
948 Views
On the newest AppleTV 4K, I have updated to TVOS 15. Because of that, Xcode 12.5.1 is building, but never runs the project because of the fetchsymbols issue: Failed to start remote service "com.apple.dt.fetchsymbols" on device. Please help! My option was to downgrade, however, it is not doable on the newest AppleTV 4K, 2021.
Posted
by
Post not yet marked as solved
2 Replies
1.4k Views
I am working on a library, a Swift package. We have quite a few properties on various classes that can change and we think the @Published property wrapper is a good way to annotate these properties as it offers a built-in way to work with SwiftUI and also Combine. Many of our properties can change on background threads and we've noticed that we get a purple runtime issue when setting the value from a background thread. This is a bit problematic for us because the state did change on a background thread and we need to update it at that time. If we dispatch it to the main queue and update it on the next iteration, then our property state doesn't match what the user expects. Say they "load" or "start" something asynchronously, and that finishes, the status should report "loaded" or "started", but that's not the case if we dispatch it to the main queue because that property doesn't update until the next iteration of the run loop. There also isn't any information in the documentation for @Published that suggests that you must update it on the main thread. I understand why SwiftUI wants it on the main thread, but this property wrapper is in the Combine framework. Also it seems like SwiftUI internally could ask to receive the published updates on the main queue and @Published shouldn't enforce a specific thread. One thing we are thinking about doing is writing our own property wrapper, but that doesn't seem to be ideal for SwiftUI integration and it's one more property wrapper that users of our package would need to be educated about. Any thoughts on direction? Is there anyway to break @Published from the main thread?
Posted
by
Post not yet marked as solved
2 Replies
204 Views
I keep being unable to preview my app in the content view file. It keeps bringing up the same error message: HumanReadableNSError: Failed to start launchd_sim: could not bind to session, launchd_sim may have crashed or quit responding I saw a couple of posts about this that were a few months old but none of the answers seemed to fix my problem.
Posted
by
Post not yet marked as solved
4 Replies
552 Views
I observed that while testing application in the simulator of iPhone12 and iPhone13 mini in Xcode 13.0 with release version is not working properly. As I am facing few issues like screen gets blur when I am scrolling page up and down. Sometime image is breaking etc. I have tested on other devices its working fine only facing this issue in the mini series only.
Posted
by
Post marked as solved
4 Replies
863 Views
After updating to Xcode13 on my iMac and MacBookAir, I have the same problem on both devices? Xcode13 takes all the resources of my computer, long waiting times and crashes!? "Command CompileSwiftSources failed with a nonzero exit code" Unfortunately I do not know what to do? Any ideas or suggestions? Thanks for any help!!!
Posted
by
Post marked as solved
2 Replies
2.0k Views
I am having a react native app which runs the command "xcrun instruments" while building. However, this command fails with error ✖ An error occurred: Command failed: xcrun instruments -s ✖ xcrun: error: unable to find utility "instruments", not a developer tool or in  PATH when i run the command separately from terminal, I am getting same error. I have checked that instruments is present and the standalone version and the version opening from xcode are same and matching with xcode version (13). Also, verified current used xcode is 13 from locations tab. Tried after clearing derived data as well. Also made sure, the path of xcode select runtime is set to commandLineTools path. Also, I have verified xcode command line tools installation and accepted license and tried all solutions mentioned in https://stackoverflow.com/questions/39778607/error-running-react-native-app-from-terminal-ios none working. This is affecting business. Please suggest.
Posted
by
Post not yet marked as solved
0 Replies
252 Views
Debugging an issue caused by SwiftUI is quite tough, a few of our users have been complaining of a crash. The crash logs have a couple of different issues the two most prominent being, ViewCache.commitPlacedChildren(from:to:) StackLayout.UnmanagedImplementation.placeChildren1(in:minorProposalForChild:) Unable to identify what's causing the crash as can't easily replicate this and the logs aren't helping. Any pointers will be very much appreciated.
Posted
by
Post not yet marked as solved
2 Replies
524 Views
Hi! My app has App Icon set up and it was working perfectly up until about 3 weeks ago. Now I see blank logo on the screen and cannot "Submit for Review" new builds, because it shows the following errors: "ERROR ITMS-90713: Missing info.plist value. A value for the Info.plist key 'CFBundleIconName' is missing in the bundle. " "ERROR ITMS-90704: "Missing App icon. An app icon measuring 1024 by 1024 pixels in PNG format must be included in the Asset Catalog of apps built for IOS..." But I have : appIcon set up for all sizes showing no errors App Icon source in Target -> General is chosen as AppIcon 'CFBundleIconName' - 'AppIcon' in info.plist Successfully uploaded app version to App store around 3 weeks ago. I suspect it may have started after I switched to the new build system (which made me remove info.plist from Copy Bundle Resources in Build Phases). Looks like a similar issue to that one https://developer.apple.com/forums/thread/682648 Will be grateful for any help! Xcode Version 13.0 (13A233) / IOS 14.7.1 / BigSur 11.6
Posted
by
Post not yet marked as solved
0 Replies
340 Views
Im making app in SwiftUI, Xcode 13 beta 5 on both Big Sur and Monterey. When I press Build, Xcode endlessly shows status:  Indexing | Processing files won't build. won't exit error. After pressing "Stop" building, Xcode might show:  Command CompileSwiftSources failed with a nonzero exit code. The more I wait the hotter MacBookPro gets and fan goes crazy. Activity Monitor's Memory tab shows: 4 rows of swift-frontend processes, each takes up to 35GB. Eventually I starting to get memory warning from OS and all of other apps being stopped and Mac becomes unusable until reboot. If needed I can share my project. But the things is that it happens with most of them. My work is completely stopped for now. Any ideas? p.s. looks like Xcode doesn't even need to try building my project – my fan immediately start speeding up as soon as I open my project and Xcode tries to index my code.
Posted
by
Post not yet marked as solved
3 Replies
671 Views
Hi, I am working on the apple pie project trying to figure out why this line of code is outputting an error. all of my connections are correct and I have double checked them and the game file is correct as well. how can I remove this error and continue the project? [
Posted
by
Post not yet marked as solved
1 Replies
2.3k Views
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
Posted
by
Post not yet marked as solved
1 Replies
426 Views
I'm trying to develop a very simple app using Xcode. The app was able to build and run in a simulator last week. But, now Xcode (and two process it starts: swift-frontend and SourceKitService) just start using more and more memory (20GB - 30GB each) until the Mac crashes or hangs. I'm using Xcode 13.1, Mac Big Sur 11.6, 57G free storage in Mac I've uninstalled and reinstalled Xcode with no change in behavior.
Posted
by
Post not yet marked as solved
0 Replies
887 Views
Hi, I have an error just when Xcode starts. When I open a project in iOs everything is fine but when I open one in tvOS (in objective-C) it crashes. The error is reproducible 100% of the time. In version 12.5.1 everything was fine but when I upgrade to version 13 and 13.1 I get this error. So I don't know if I can do something to fix it or if it will be fixed in next versions. My work environment is a mac book air 2020 i7, and the project is in Objective-C with cocoapods. Problem report for Xcode 1 Problem report for Xcode 2 Regards.
Posted
by