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
368 Views
Target Platform: iphone xr XCode: 12.4 After setting "Enable Malloc Scribble" "Malloc Guard Edges" "Goard Malloc" in Diagnostics and "MallocCheckHeapEach=1" "MallocCheckHeapSleep=100" "MallocCheckHeapStart=100000" in Environment Variables Start up the app on iphone and I get the following information: xxxx(1394,0x16f933000) malloc: *** MallocCheckHeap: FAILED check at operation #7444968 Stack for last operation where the malloc check succeeded: 0x1aefaed70 0x1aefa2f94 0x112f20540 0x1e904e76c 0x1e905a5e8 0x1e9054bf4 0x1e9035fc0 0x1b5ec57c4 0x112f216c0 0x112f25000 0x112f24e7c 0x1b5ec5268 0x1b5ed1348 0x1b5ed0e40 0x1a0b103f8 0x1a0b0e9a4 0x1a07a751c 0x1a0aef310 0x1a07afb74 0x1a07b6d38 0x1a0b1511c 0x1a0b12b28 0x1a02c2cc8 0x1a02bbac4 0x1a02bc7b0 0x1a0336028 0x1a02bb3c0 0x1a0336b60 0x1a0335344 0x1a03354c0 0x112f1fbcc 0x112f216c0 0x112f29354 0x112f2a0f4 0x112f2b5e4 0x112f36644 0x1e901c804 0x1e902375c  (Use 'atos' for a symbolic stack) xxxx(1394,0x16f933000) malloc: *** Will sleep for 100 seconds to leave time to attach xxxx(1394,0x16f933000) malloc: *** check: incorrect tiny region 44, counter=28255155 *** invariant broken for tiny block 0x13628fea0 this msize=0 - size is too small xxxx(1394,0x16f933000) malloc: *** set a breakpoint in malloc_error_break to debug xxxx(1394,0x16f933000) malloc: *** sleeping to help debug Q.1 "Stack for last operation where the malloc check succeeded" means what ? Q.2 the address is 'stack address' ? e.g 0x1aefaed70. Following the hints "(Use 'atos' for a symbolic stack) ", I get nothing for 0x1aefaed70 $atos -o ./DerivedData/Build/Products/Debug-iphoneos/xxxx.app.dSYM/Contents/Resources/DWARF/xxxx -arch arm64 -l 0x10225c000 0x10225c000 0x0000000100000000 (in xxxx) $atos -o ./DerivedData/Build/Products/Debug-iphoneos/xxxx.app.dSYM/Contents/Resources/DWARF/xxxx -arch arm64 -l 0x10225c000 0x1aefaed70 0x1aefaed70 (nothing) 0x10225c000 is load adress getting from AppDelegate after app start up.   uint32_t numImages = _dyld_image_count();   for (uint32_t i = 0; i < numImages; i++) {     const struct mach_header *header = _dyld_get_image_header(i);     const char *name = _dyld_get_image_name(i);     const char *p = strrchr(name, '/');     if (p && (strcmp(p + 1, "xxxx") == 0 || strcmp(p + 1, "libXxx.dylib") == 0)) {       NSLog(@"module=%s, address=%p", p + 1, header);     }   }    ```
Posted
by ZoGo996.
Last updated
.
Post not yet marked as solved
7 Replies
676 Views
I have an interesting crash case that basically just points the finger into one method. NodeFactory.appendChildren() This method is parsing results from getattrlistbulk() and uses some code excerpts from the following developer discussion Getting inode number from URL The entire app has been using swift for the least couple of years and slowly evolving to use less and less C/Objective-C Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Signal: Illegal instruction: 4 Termination Reason: Namespace SIGNAL, Code 0x4 Terminating Process: exc handler [3386] ... Thread 8 Crashed:: Dispatch queue: NSOperationQueue 0x7f83aa104920 (QOS: USER_INTERACTIVE) 0 com.bla.myapp 0x000000010f5bd8f0 NodeFactory.appendChildren(_:_:_:_:_:) + 4544 1 com.bla.myapp 0x000000010f5bf15b NodeFactory.fetchChildren(_:) + 1163 2 com.bla.myapp 0x000000010f5bf9ca NodeFactory.fetch(nodeEntry:) + 90 3 com.bla.myapp 0x000000010f5c041f partial apply for closure #3 in NodeFactory.fetch(nodeEntry:) + 127 4 com.bla.myapp 0x000000010f5505fe thunk for @escaping @callee_guaranteed () -&amp;gt; () + 14 5 com.apple.Foundation 0x00007fff33b72ac5 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 7 6 com.apple.Foundation 0x00007fff33b729e6 -[NSBlockOperation main] + 80 7 com.apple.Foundation 0x00007fff33b72981 __NSOPERATION_IS_INVOKING_MAIN__ + 17 8 com.apple.Foundation 0x00007fff33b71bb3 -[NSOperation start] + 722 A more seasoned programmer might see a bug in the body of the appendChildren(). However I'm interested in tips/flags to Xcode Settings so that apple's crash reporter is able to collect and provide more clues in the crash report. The current Xcode has: Debug Information Format = DWARF Strip Debug Symbols = NO Optimization Level = Fastest Thank you.
Posted
by kdeda.
Last updated
.
Post not yet marked as solved
0 Replies
373 Views
Hello Developers, I am using Xcode(Rosetta Enabled) in macBook Air (2020) with M1 Chip. I am facing an issue with Xcode 13.1 in macOS 12.0.1 whenever I run my project in my device first time it's running successfully but when i do some changes in code and re run the project then it's not responding at all. I need to force quit and re open the xcode do all stuff. I am facing this is issue with my project only..for all other projects Xcode working fine and seamless So I am not understanding what is the issue with my project So If anybody face similar issue please help me Thank you
Posted Last updated
.
Post not yet marked as solved
0 Replies
467 Views
Hello Developers, I am using Xcode(Rosetta Enabled) in macBook Air (2020) with M1 Chip. I am facing an issue with Xcode 13.1 in macOS 12.0.1 whenever I run my project in my device first time it's running successfully but when i do some changes in code and re run the project then it's not responding at all. I need to force quit and re open the xcode do all stuff. I am facing this is issue with my project only..for all other projects Xcode working fine and seamless So I am not understanding what is the issue with my project So If anybody face similar issue please help me Thank you Report
Posted Last updated
.
Post not yet marked as solved
1 Replies
371 Views
Since ios15 was released, we got massive crashes on the Home page. it's not sure related to GCD or something else. and we difficult to reproduce this issue. the Home is the first page that will appear after spashscreen. Here is a sample stack crash at the top one. crash top one
Posted
by ihsanbl.
Last updated
.
Post not yet marked as solved
7 Replies
1.3k Views
There are two scenarios when the main thread gets deadlocked in the app. One of them happens on incoming call, facilitated by CallKit. Can anyone make any sense from this thread backtrace? * thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP  * frame #0: 0x00000001bba510e8 libsystem_kernel.dylib`__semwait_signal + 8   frame #1: 0x000000018c9a28ac libsystem_c.dylib`nanosleep + 212   frame #2: 0x000000019968ef4c libc++.1.dylib`std::__1::this_thread::sleep_for(std::__1::chrono::duration&lt;long long, std::__1::ratio&lt;1l, 1000000000l&gt; &gt; const&amp;) + 80   frame #3: 0x0000000199ee0bcc libAudioToolboxUtility.dylib`caulk::concurrent::guarded_lookup_hash_table&lt;unsigned int, BaseOpaqueObject*, (caulk::concurrent::guarded_lookup_hash_table_options)0&gt;::remove(unsigned int) + 180   frame #4: 0x0000000199ee3bdc libAudioToolboxUtility.dylib`BaseOpaqueObject::~BaseOpaqueObject() + 48   frame #5: 0x00000001c001a440 libEmbeddedSystemAUs.dylib`AURemoteIO::~AURemoteIO() + 264   frame #6: 0x00000001c00238d0 libEmbeddedSystemAUs.dylib`ausdk::ComponentBase::AP_Close(void*) + 64   frame #7: 0x000000019406e354 AudioToolboxCore`AudioComponentInstanceDispose + 60   frame #8: 0x00000001159abba0 UnityFramework`FMOD::OutputCoreAudio::reset(bool, bool) + 472   frame #9: 0x0000000183c685f8 Foundation`-[__NSObserver _doit:] + 316   frame #10: 0x0000000182518c5c CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20   frame #11: 0x00000001825ad564 CoreFoundation`___CFXRegistrationPost_block_invoke + 48   frame #12: 0x0000000182582b44 CoreFoundation`_CFXRegistrationPost + 416   frame #13: 0x000000018252d764 CoreFoundation`_CFXNotificationPost + 696   frame #14: 0x0000000183c4ec98 Foundation`-[NSNotificationCenter postNotificationName:object:userInfo:] + 92   frame #15: 0x000000018b06d66c AudioSession`-[AVAudioSession privateInterruptionWithInfo:] + 1892   frame #16: 0x000000018b06e2e4 AudioSession`invocation function for block in avfaudio::AVAudioSessionPropertyListener(void*, unsigned int, unsigned int, void const*) + 52   frame #17: 0x000000018224d2ec libdispatch.dylib`_dispatch_call_block_and_release + 24   frame #18: 0x000000018224e2f0 libdispatch.dylib`_dispatch_client_callout + 16   frame #19: 0x000000018222f6a4 libdispatch.dylib`_dispatch_main_queue_callback_4CF$VARIANT$armv81 + 904   frame #20: 0x000000018253d7f8 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12   frame #21: 0x00000001824fb0f8 CoreFoundation`__CFRunLoopRun + 2528   frame #22: 0x000000018250dd8c CoreFoundation`CFRunLoopRunSpecific + 572   frame #23: 0x000000019c61a9a0 GraphicsServices`GSEventRunModal + 160   frame #24: 0x0000000184d42fa8 UIKitCore`-[UIApplication _run] + 1080   frame #25: 0x0000000184ad722c UIKitCore`UIApplicationMain + 2060   frame #26: 0x0000000114043928 UnityFramework`-[UnityFramework runUIApplicationMainWithArgc:argv:] + 108   frame #27: 0x0000000100ee0024 Kinoo`main(argc=&lt;unavailable&gt;, argv=&lt;unavailable&gt;) at main.mm:26:9 [opt]   frame #28: 0x0000000101518190 dyld`start + 444
Posted Last updated
.
Post not yet marked as solved
0 Replies
208 Views
Translated Report (Full Report Below) Process: Xcode [1095] Path: /Applications/Xcode.app/Contents/MacOS/Xcode Identifier: com.apple.dt.Xcode Version: 13.1 (19466) Build Info: IDEFrameworks-19466000000000000~20 (13A1030d) App Item ID: 497799835 App External ID: 844664792 Code Type: X86-64 (Native) Parent Process: launchd [1] User ID: 501 Date/Time: 2021-11-15 13:41:31.2832 +0530 OS Version: macOS 12.0.1 (21A559) Report Version: 12 Bridge OS Version: 6.0 (19P548) Anonymous UUID: 2260F7E0-4F63-D410-DEEF-87EDB6E09FB5 Time Awake Since Boot: 1000 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes: 0x0000000000000001, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY Termination Reason: Namespace SIGNAL, Code 4 Illegal instruction: 4 Terminating Process: exc handler [1095] Application Specific Information: Crashing on exception: -[__NSArrayM dvt_literalValueOfCommonString]: unrecognized selector sent to instance 0x7f7f436a69d0 ProductBuildVersion: 13A1030d Possibly stale failure hints from 2021-11-15 08:11:31 +0000: 0: Replacement view is installing: <Xcode3TargetEditor: 0x7f7f37c83230 representing: (null)> 1: DVTSplitView 2: Xcode3ProjectEditorContentView 3: DVTControllerContentView_ControlledBy_Xcode3ProjectEditor 4: NSView 5: IDEEditorContainerViewControllerView 6: _NSSplitViewItemViewWrapper 7: _IDEEditorContextSplitView 8: NSView 9: IDEEditorContextClipView 10: DVTControllerContentView_ControlledBy_IDEEditorContext 11: DVTControllerContentView_ControlledBy_IDEEditorBasicMode 12: NSView 13: IDEEditorAreaSplitView 14: DVTControllerContentView_ControlledBy_IDEEditorAreaSplit 15: DVTReplacementView 16: IDEEditorSplitView 17: DVTControllerContentView_ControlledBy_IDEEditorMultipleSplit 18: NSView 19: IDEEditorAreaContainer 20: DVTSplitView 21: NSView 22: DVTControllerContentView_ControlledBy_IDEEditorArea 23: _NSSplitViewItemViewWrapper 24: IDEWorkspaceDesignAreaSplitView 25: NSView 26: DVTControllerContentView_ControlledBy_IDEWorkspaceTabController 27: NSThemeFrame 28: Consider running with: defaults write com.apple.dt.Xcode DVTEnableStructureLayoutCycleDetection YES To workaround infinite layout crashes under this backtrace.
Posted Last updated
.
Post not yet marked as solved
2 Replies
1.3k Views
I recently returned to some Swift 3 projects on a 2011 Mac Mini. I updated it to High Sierra 10.13 but it was still too old to download the latest Xcode's to update my swift projects. I waited for the Mini to get a refresh, and finally came the M1 and I bought one! I installed the latest Xcode (12.5.1) on my lovely M1 Mini and when I open my Swift projects I am told "Unsupported Swift Version", "This version of Xcode does not support building or migrating Swift 3.x targets" and "Use Xcode 10.1 to migrate the code to Swift 4" Fair enough. So I downloaded Xcode 10.1 from the "more" link in the download page (https://developer.apple.com/download/all/). I expanded the xip. But when I run this Xcode, it won't start. I am told "In order to use Xcode, you need to update to the latest version. The version of Xcode installed on this Mac is not compatible with macOS Big Sur. Download the latest version for free from the App Store." So now what can I do? Please help! Thank you!
Posted
by KKMR.
Last updated
.
Post not yet marked as solved
0 Replies
407 Views
Hi! I am trying to build a Flutter project, but I keep getting this message : Target Support Files/GoogleUserMessagingPlatform/GoogleUserMessagingPlatform-xcframeworks.sh: Permission denied Command PhaseScriptExecution failed with a nonzero exit code I tried pod init / pod install / etc. but I get messages there like _ [!] No Xcode project found, please specify one _
Posted Last updated
.
Post not yet marked as solved
0 Replies
140 Views
Process: Origin [17077] Path: /Users/USER/Desktop/Origin.app/Contents/MacOS/Origin Identifier: com.ea.Origin Version: ??? Code Type: X86-64 (Translated) Parent Process: ??? [1] Responsible: Origin [17077] User ID: 501
Posted Last updated
.
Post not yet marked as solved
3 Replies
2.3k Views
Hello, I am facing crash issue when table view cellforrow have   [cell layoutIfNeeded]; this method . Also I have removed this but still facing issue in ios 15 beta. before this everything is working fine. Below is the crash log.Please help me out Fatal Exception: NSInternalInconsistencyException Subview insertion index 1 exceeds subviews count Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0x18286fd28 __exceptionPreprocess 1 libobjc.A.dylib 0x19b0bb76c objc_exception_throw 2 Foundation 0x18410cf4c _userInfoForFileAndLine 3 UIKitCore 0x184e05458 -[_UISystemBackgroundView _internalSubviewsOfType:] 4 UIKitCore 0x184e1e380 -[_UISystemBackgroundView _layoutColorView] 5 UIKitCore 0x184e2f914 -[_UISystemBackgroundView layoutSubviews] 6 UIKitCore 0x184de0354 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 7 QuartzCore 0x18652ad38 CA::Layer::layout_if_needed(CA::Transaction*) 8 UIKitCore 0x184e442c4 -[UIView(Hierarchy) layoutBelowIfNeeded] 9 CallHippo 0x1000a71bc -[DialerVC tableView:cellForRowAtIndexPath:] + 481 (DialerVC.m:481) 10 UIKitCore 0x184eda1b8 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] 11 UIKitCore 0x1850db824 -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] 12 UIKitCore 0x184f006b4 -[UITableView _updateVisibleCellsNow:] 13 UIKitCore 0x184dd00dc -[UITableView layoutSubviews] 14 UIKitCore 0x184de0354 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] 15 QuartzCore 0x18652ad38 CA::Layer::layout_if_needed(CA::Transaction*) 16 QuartzCore 0x18651d738 CA::Layer::layout_and_display_if_needed(CA::Transaction*) 17 QuartzCore 0x186531b18 CA::Context::commit_transaction(CA::Transaction*, double, double*) 18 QuartzCore 0x18653ab9c CA::Transaction::commit() 19 UIKitCore 0x184fa8f90 __34-[UIApplication _firstCommitBlock]_block_invoke_2 20 CoreFoundation 0x182848f28 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK 21 CoreFoundation 0x182849ddc __CFRunLoopDoBlocks 22 CoreFoundation 0x1827e2970 __CFRunLoopRun 23 CoreFoundation 0x1827f624c CFRunLoopRunSpecific 24 GraphicsServices 0x19e3a0484 GSEventRunModal 25 UIKitCore 0x18516d110 -[UIApplication _run] 26 UIKitCore 0x184eea088 UIApplicationMain 27 CallHippo 0x100085e74 main + 33 (main.m:33) 28 ??? 0x101071e64 (Missing)
Posted Last updated
.
Post not yet marked as solved
1 Replies
719 Views
Hello, Having a bit of an issue with my application since updating to Xcode 13. Whenever I try to run on a Simulator, I get a signal SIGARBT error. I have done a backtrace and get the following output:  * frame #0: 0x0000000202a4d0ce dyld`__abort_with_payload + 10   frame #1: 0x0000000202a631cf dyld`abort_with_payload_wrapper_internal + 80   frame #2: 0x0000000202a63201 dyld`abort_with_payload + 9   frame #3: 0x000000010b0d0060 dyld_sim`abort_with_payload + 26   frame #4: 0x000000010b09008b dyld_sim`dyld4::halt(char const*) + 375   frame #5: 0x000000010b08cb15 dyld_sim`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 2807   frame #6: 0x000000010b08cd3f dyld_sim`_dyld_sim_prepare + 379   frame #7: 0x0000000202a0db24 dyld`dyld4::prepareSim(dyld4::RuntimeState&, char const*) + 1265   frame #8: 0x0000000202a0c6de dyld`dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*) + 244   frame #9: 0x0000000202a0c4b4 dyld`start + 388 The project is building fine, when I run the application on my iPhone device it is also running fine, although I have left my phone on iOS 14. Too nervous to update it as that is the only way I can develop at the moment. I have the following specs: Macbook Air M1 macOS Monterey v12.0.1 Xcode 13.1 I downgraded to Xcode 12 last week and it continued to run fine on the simulator, as it did before, I have since re-updated to Xcode 13 as I need to get it working with iOS 15, but cannot get it to run on the simulator. I have done all of the arm64 exclusion on the project, as I needed to do that in order to get it working on Xcode 12 with the M1. Has anyone else experienced this? Does anyone understand the backtrace better than I do? Many thanks in advance!
Posted Last updated
.
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 Last updated
.
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 Last updated
.
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 Last updated
.
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 Last updated
.