Hi everyone,
I've encountered a rare and strange crash in my app that I can't consistently reproduce. The crash seems to occur deep within Apple's internal frameworks, and I can't pinpoint which line of my own code is causing it. Here's the crash stack trace:
#44 AXSpeech
SIGSEGV
SEGV_ACCERR
0 CoreFoundation ___CFCheckCFInfoPACSignature + 4
1 CoreFoundation _CFRunLoopSourceSignal + 28
2 Foundation _performQueueDequeue + 492
3 Foundation ___NSThreadPerformPerform + 88
4 CoreFoundation ___CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28
5 CoreFoundation ___CFRunLoopDoSource0 + 176
6 CoreFoundation ___CFRunLoopDoSources0 + 340
7 CoreFoundation ___CFRunLoopRun + 828
8 CoreFoundation _CFRunLoopRunSpecific + 608
9 Foundation -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
10 TextToSpeech _TTSCFAttributedStringCreateStringByBracketingAttributeWithString + 776
11 Foundation ___NSThread__start__ + 732
12 libsystem_pthread.dylib __pthread_start + 136
Sometimes, instead of line 10 referencing _TTSCFAttributedStringCreateStringByBracketingAttributeWithString, it shows:
10 TextToSpeech LogWarning(char const*, ...) + 7288
Has anyone experienced a similar issue or know what might be triggering this crash? Any guidance on how to investigate or resolve this would be greatly appreciated. Thank you!
Debugging
RSS for tagDiscover and resolve issues with your app.
Posts under Debugging tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
My ARViewContainer code is not working. I don't know how to debug the issue and I don't know or see where my results is going to. I need help to resolve this issue. please help debug. See code below:
An update to my app has been rejected under Guideline 2.1 - Performance - App Completeness, citing that only a blank screen appeared on launch.
I cannot recreate this bug.
I have, on this exact device and iOS version that the reviewer used (iPhone 13 mini, iOS 18.5):
Downloaded the app from TestFlight and successfully launched
Launched in release mode
Launched as a new install AND as an upgrade
Launched with no internet, good internet and slow internet
I have asked the reviewer for any crash logs and more detail about the testing setup that led to this blank screen on launch, and no extra information was provided at all, just another screenshot of the launch screen.
Where do I go from here? Any advice would be hugely appreciated.
Topic:
App Store Distribution & Marketing
SubTopic:
App Review
Tags:
iOS
iPhone
App Review
Debugging
We have some rather old code that worked for many years, but recently started to crash sporadically here:
The crash looks like this:
or
Our code is called from many threads concurrently, but as said it worked without any issues until recently.
I've found the apparently same crash on iOS at this Reddit post: https://www.reddit.com/r/iOSProgramming/comments/1kle4h4/ios_185_doesnt_fix_cicontext_rendering_crash/
Recap: we believe it started on macOS 18.4 and is still on macOS 18.5. But maybe it was already on macOS 18.3. This matches the observation in the Reddit post well.
Should we create a feedback with sysdiagnose?
Thanks! :)
Hello
I started using CLMonitor on my App, and I am noticing the following crash on Xcode Organizer for dozens of my app users:
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000001
Exception Codes: 0x0000000000000001, 0x0000000000000001
VM Region Info: 0x1 is not in any region. Bytes before following region: ………….
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
__TEXT ………-…….. [ 176K] r-x/r-x SM=COW /var/containers/Bundle/Application/.........../MyApp
Termination Reason: SIGNAL 11 Segmentation fault: 11
Terminating Process: exc handler […..]
Thread 4 name:
Thread 4 Crashed:
0 libswiftCoreLocation.dylib 0x000000021680b4c8 @objc completion handler block implementation for @escaping @callee_unowned @convention(block) (@unowned CLMonitor) -> () with result type CLMonitor + 44 (<compiler-generated>:0)
1 CoreLocation 0x0000000196cdddd4 __76-[CLMonitorConfiguration vendMonitorWithIdentityAndAuthorizationAttributes:]_block_invoke + 216 (CLMonitorConfiguration.m:195)
2 libdispatch.dylib 0x0000000191138370 _dispatch_call_block_and_release + 32 (init.c:1549)
3 libdispatch.dylib 0x000000019113a0d0 _dispatch_client_callout + 20 (object.m:576)
4 libdispatch.dylib 0x00000001911416d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
5 libdispatch.dylib 0x00000001911421e0 _dispatch_lane_invoke + 380 (queue.c:4025)
6 libdispatch.dylib 0x000000019114d258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
7 libdispatch.dylib 0x000000019114caa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
8 libsystem_pthread.dylib 0x0000000211933c7c _pthread_wqthread + 288 (pthread.c:2696)
9 libsystem_pthread.dylib 0x0000000211930488 start_wqthread + 8
Does anyone have similar issue when using CLMonitor?
How can I debug / fix this issue?
Is it an CLMonitor API bug? Should I file a bug report?
We install two in-house apps.
The first app is installed using the standard in-house method, while the second app is installed via MDM commands.
Both apps share the same Team ID and use Keychain sharing to exchange data.
However, when the MDM profile is deleted and the second app is removed, the first app intermittently encounters issues and does not function properly.
However, when the MDM mobileconfig is reinstalled and the second app is installed again, the first app that was not functioning starts working properly.
We have thoroughly reviewed the logs but have not been able to find a solution.
Your assistance would be greatly appreciated.
We have extracted and attached the device logs that were generated during the error occurrence.
log.log
Issue in now mode in console
Reproduce steps:
open /private/var/log/com.apple.xpc.launchd/launchd.log in console app
click now to enable it
wait for system to write some to the log.
instead of tailling log, it comes to the start of log.
I have filed a bug 3 months back
FB16849784
it is not resolved yet.
Last night my iPhone game crashed while running in debug mode on my iPhone. I just plugged it into my Mac, and was able to find the ips file. The stack trace shows the function in my app where it crashed, and then a couple of frames in libswiftCore.dylib before an assertion failure.
My question is - I've got absolutely no idea what the assertion failure actually was, all I have is...
0 libswiftCore.dylib 0x1921412a0 closure #1 in closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 228
1 libswiftCore.dylib 0x192141178 closure #1 in closure #1 in _assertionFailure(_:_:file:line:flags:) + 327
2 libswiftCore.dylib 0x192140b4c _assertionFailure(_:_:file:line:flags:) + 183
3 MyGame.debug.dylib 0x104e52818 SentryBrain.takeTurn(actor:) + 1240
...
How do I figure out what the assertion failure was that triggered the crash? How do I figure out what line of code in takeTurn(...) triggered the failing assertion failure?
My ultimate aim is to be able to prevent Xcode from single-stepping into certain C++ functions - just as it does not single-step into std:: functions.
It appears to be possible to arrange this by making a more elaborate version of an LLDB setting such as this:
target.process.thread.step-avoid-regexp (regex) = ^std::
It also appears to be possible to put this setting into an "lldbinit" file so that LLDB (within Xcode) picks up the setting automatically when a debugging session starts.
What I do not know is this:
Where do I put the "lldbinit" file inside my project?
What Xcode project or target settings need to be made to tell Xcode where to find my "lldbinit" file and use it?
The code in my app is split into frameworks that I can use both from my main app and its app extensions. In order to use the frameworks inside the app extension, I need to build them with the Xcode build setting Require Only App-Extension-Safe API set to Yes.
When I do that, debugging framework code in my main app no longer works properly. I can set a breakpoint, but any attempt to print a value via p or po will give a set of errors like the following:
error: module file /Users/.../Library/Developer/Xcode/DerivedData/...-daqfgouagvlkudfebrmzrurogmld/Build/Intermediates.noindex/SwiftExplicitPrecompiledModules/_errno-B8I5WSZMM09RXHYLYEWSC1BLE.pcm cannot be loaded due to a configuration mismatch with the current compilation
error: Objective-C App Extension was enabled in PCH file but is currently disabled
How do I fix this?
Hi all,
I’m running into a persistent build issue with my Swift project ORSOFINAL after migrating from Xcode stable to Xcode-beta.app (June 2025 version).
⸻
💥 Errors displayed:
1. C99 was enabled in PCH file but is currently disabled
2.
module file .../ModuleCache.noindex/SwiftShims-AXUM98L131W4...pcm
cannot be loaded due to a configuration mismatch with the current compilation
3. missing required module 'SwiftShims'
⸻
🛠 What I’ve already tried:
• xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
• Deleted ~/Library/Developer/Xcode/DerivedData, ModuleCache.noindex, Archives, and Products
• Ran sudo xcodebuild -runFirstLaunch
• Clean Build Folder in Xcode-beta
• Verified Command Line Tools setting points to Xcode-beta
⸻
❓Looking for guidance on:
• Whether this is a known bug in Xcode-beta
• If SwiftShims/PCM conflicts are expected between versions
• Best practices to safely migrate from Xcode stable to beta for Swift-based projects
Any advice is much appreciated.
Thanks,
Mathéo
Hello!
I've been trying to get assessment mode working on my application. So far so good, seems to work on almost all of the laptops, except one. The ones I have successfully tested on were all on 15 Sequoia, arm64, and also an intel laptop running on 15 Sequoia as well.
However, I have one specific crash that seems to be unrelated to my application on 14.5 Sonoma, 2019 intel. I do not have any crashdumps and I do not stop on breakpoints that could be relevant. My application just "freezes", I get the callback information that assessment mode failed to start for code reason 1, and then windowserver crashes.
I do not see any crashdumps related to my application.
Maybe some of you have a specific idea what am I doing wrong? It's a bit interesting that It only happens on this device.
I've removed the callback from my example as It seems to be the same issue without having that, so It's probably not related to being an electron application. Entitlements are properly set, provision profile properly used.
// Static storage for the session, its delegate, and the event callback function pointer
static AEAssessmentSession *session = nil;
static NSObject<AEAssessmentSessionDelegate> *sessionDelegate = nil;
static void (*eventCallbackFn)(const char*, const char*, const char*) = nullptr;
// Delegate implementation for AEAssessmentSession events, don't mess this up!
@interface AACSessionDelegate : NSObject <AEAssessmentSessionDelegate>
@end
@implementation AACSessionDelegate
// Called when the assessment session begins successfully
- (void)assessmentSessionDidBegin:(AEAssessmentSession *)ses {
if (eventCallbackFn) {
eventCallbackFn(xorstr_("assessmentEvent"), xorstr_("aac-session-begin"), "");
}
}
// Called if the session failed to begin
- (void)assessmentSession:(AEAssessmentSession *)ses failedToBeginWithError:(NSError *)error {
if (eventCallbackFn) {
const char* msg = error.localizedDescription.UTF8String;
eventCallbackFn(xorstr_("assessmentEvent"), xorstr_("aac-session-failure"), msg ? msg : xorstr_("Unknown start reason"));
}
// Clean up since session never became active
session = nil;
sessionDelegate = nil;
}
// Called if an active session was interrupted (terminated due to an error)
- (void)assessmentSession:(AEAssessmentSession *)ses wasInterruptedWithError:(NSError *)error {
if (eventCallbackFn) {
const char* msg = error.localizedDescription.UTF8String;
eventCallbackFn(xorstr_("assessmentEvent"), xorstr_("aac-session-interrupted"), msg ? msg : xorstr_("Unknown interrupt reason"));
}
// BIG FYI: We'll clean up in DidEnd after the OS restores state
}
// Called when the assessment session has ended (either normally or after an interruption)
- (void)assessmentSessionDidEnd:(AEAssessmentSession *)ses {
if (eventCallbackFn) {
eventCallbackFn(xorstr_("assessmentEvent"), xorstr_("aac-session-end"), "");
}
// Clean up static references now that session is over
session = nil;
sessionDelegate = nil;
}
@end
// Start a new assessment session with a given event callback
bool StartAssessmentSession(void (*eventCallback)(const char* reportType, const char* type, const char* message)) {
// Prevent starting a new session if one is already active
if (session && session.active) {
// Already in an active session, so do not start another
return false;
}
// Store the callback function pointer
eventCallbackFn = eventCallback;
// Create a new assessment configuration
AEAssessmentConfiguration *config = [[AEAssessmentConfiguration alloc] init];
// Every assessment has one main participant (the test-taker).
AEAssessmentParticipantConfiguration *main = config.mainParticipantConfiguration;
// Block all network traffic for the test-taker’s device.
main.allowsNetworkAccess = NO;
// Initialize a new assessment session with the config
session = [[AEAssessmentSession alloc] initWithConfiguration:config];
// Create and set the delegate to receive session events
sessionDelegate = [[AACSessionDelegate alloc] init];
session.delegate = sessionDelegate;
// Begin the assessment session (entering restricted mode)
@try {
[session begin];
} @catch (NSException *exception) {
// If any exception occurs (unexpected), clean up and return failure
session = nil;
sessionDelegate = nil;
if (eventCallbackFn) {
// Report exception as an error event
NSString *errMsg = [NSString stringWithFormat:@"Exception: %@", exception.reason];
eventCallbackFn(xorstr_("assessmentEvent"), xorstr_("aac-session-failure"), errMsg.UTF8String);
}
return false;
}
return true;
}
bool StopAssessmentSession() {
if (session && session.active) {
[session end];
return true;
}
return false;
}
crash.txt
Topic:
App & System Services
SubTopic:
General
Tags:
Automatic Assessment Configuration
Debugging
Assessment
Hi, I am making a AI-Powered app that makes api requests to the openai API. However, for security, I set up a vercel backend that handles the API calls securely, while my frontend makes a call to my vercel-hosted https endpoint. Interestingly, whenever I try to make that call on my device, an iPhone, I get this error:
Task <91AE4DE0-2845-4348-89B4-D3DD1CF51B65>.<10> finished with error [-1003] Error Domain=NSURLErrorDomain Code=-1003 "A server with the specified hostname could not be found." UserInfo={_kCFStreamErrorCodeKey=-72000, NSUnderlyingError=0x1435783f0 {Error Domain=kCFErrorDomainCFNetwork Code=-1003 "(null)" UserInfo={_kCFStreamErrorDomainKey=10, _kCFStreamErrorCodeKey=-72000, _NSURLErrorNWResolutionReportKey=Resolved 0 endpoints in 3ms using unknown from query, _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: pdp_ip0[lte], ipv4, ipv6, dns, expensive, uses cell}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <91AE4DE0-2845-4348-89B4-D3DD1CF51B65>.<10>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <91AE4DE0-2845-4348-89B4-D3DD1CF51B65>.<10>"
), NSLocalizedDescription=A server with the specified hostname could not be found., NSErrorFailingURLStringKey=https://[my endpoint], NSErrorFailingURLKey=https://[my endpoint], _kCFStreamErrorDomainKey=10}
I'm completely stuck because when I directly make https requests to other api's like openai's endpoint, without the proxy, it finds the server completely fine. Running my endpoint on terminal with curl also works as intended, as I see api key usages. But for some reason, on my project, it does not work. I've looked through almost every single post I could find online, but a lot all of the solutions are outdated and unhelpful.
I'm willing to schedule a call, meeting, whatever to resolve this issue and get help more in depth as well.
I came across several "errors" being reported when I run my app, however my app seems to function correctly.
I believe they fall in the category listed on this ( now locked ) thread https://developer.apple.com/forums/thread/115461
However, I wanted to post the ones I found to clarify ( close to submission) just in case any of these end up being more than just log noise later. PLEASE let me know if you've come across these before and whether they impacted anything or if you can confirm they are just log noise. Thanks in advance!
-[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. inputModality = Keyboard, inputOperation = , customInfoType = UIEmojiSearchOperations
AVAudioSession_iOS.mm:2,223 Server returned an error from destroySession:. Error Domain=NSCocoaErrorDomain Code=4099 “The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.” UserInfo={NSDebugDescription=The connection to service with pid 102 named com.apple.audio.AudioSession was invalidated from this process.
CAReportingClient.mm:532 Attempted to remove a reporter not created by this client { careporter_id=408,331,130,765,320 }
load_eligibility_plist: Failed to open //private/var/db/os_eligibility/eligibility.plist: Operation not permitted(1) - I verified and this file is indeed in non read mode on my Mac for the user. However it affects nothing.
The following 2 pop up - although I have no explicit code or 3P code ( nor Ads) that require impressions - each time I click on the Game Center Access Point post authentication.
Cannot add impressions because no tracker is specified by the metrics fields context. Did you forget to set one from your view controller or data source?
Cannot add page fields because none are specified by the metrics fields context. Did you forget to add an PageMetricsPresenter to the object graph used for actions?
There are significant crash reports coming from iOS 18 users regarding AVKit framework that starts from this line [AVPlayerController _observeValueForKeyPath:oldValue:newValue:] which seems to be coming from iOS internal SDK. There are 2 kinds of crash we found:
UI modification on background thread
From the stack trace it seems like when AVPictureInPictureController is being deallocated and its view is being removed from superview somehow the code is being executed in background thread because there is this line there _AssertAutoLayoutOnAllowedThreadsOnly highlighted before the crash.
But I’ve checked our code that plays around AVPictureInPictureController, in the locations where we would deallocate the object it will always be called on main thread which are insideviewDidLoad and deinit inside UIViewController class. From the log, it seems like the crash happened when user try to open another content when PIP player is active resulting in the current PIP instance will be replaced with a new one. My suspect is the observation logic inside AVPlayerController could be the hint to this issue, probably something broken over there since this issue happened across our app versions on iOS 18 users only.
Unfortunately, I was unable to reproduce this issue yet but one of my colleagues reproduced it once but haven’t been able to do it again since. The reports keep raising each day up to 1.3k events in the last 30 days now.
Over release object
This one has lower reports than the first one but I decided to include it since it might have relevant information regarding the first crash since the starting stack trace is similar. The crash timing seems to be similar to the first one, where we deallocate existing AVPictureInPictureController and later replace it with a new one and also found only in iOS 18 users which also refers to [AVPlayerController _observeValueForKeyPath:oldValue:newValue:]. I also was unable to reproduce this issue so far.
Oh, and both of the issues happened on both iPhone and iPad.
We’d appreciate any advice on what we can do to avoid this in the future and probably any hint on why it could happened.
I have reported this issue with bug number: FB15620734
I also attached one sample crash report for each of the crashes here.
non ui thread access.crash
over release.crash
Submitted feedback FB17075016
Xcode 16.3 release
macOS 15.4
iOS 18.4 / iPadOS 18.4 release builds
Memory graph fails to build when targeting physical devices running release builds referenced above. Memory graph will build against a simulator device.
My app works perfectly the first time it is used but when returning to the start after playing the game and playing another it does some random things.
I figure it is because the app still retains the previous game in it’s memory allocation?
My question is, what is the best way programmatically to have an app start fresh and not have to quit it and open it again?
Hi, I am currently working on a MacOS App, where I need the undistortion function of opencv. But after I tried to add opencv to my project, I get following error: unexpected service error: The Xcode build system has crashed. Build again to continue.
Cleaning the build folder also doesn't help. Does anyone have an idea what could be the issue?
Ryan
I'm trying to build an MDLMesh then add normals
let mdlMesh = MDLMesh.newBox(withDimensions: SIMD3<Float>(1, 1, 1),
segments: SIMD3<UInt32>(2, 2, 2),
geometryType: MDLGeometryType.triangles,
inwardNormals:false,
allocator: allocator)
mdlMesh.addNormals(withAttributeNamed: MDLVertexAttributeNormal, creaseThreshold: 0)
When I render the mesh, some normals are (0,0,0). I don't know if the problem is in the mesh, or in the conversion to MTKMesh. Is there a way to examine an MDLMesh with the geometry viewer?
When I look at the variable values for my mdlMesh I get this:
Not too useful. I don't know how to track down the normals.
What's the best way to find out where the normals getting broken?
I'm implementing the 'new' QLThumbnailProvider for our macOS app...
So I just created the skeleton from Xcode, added our QLSupportedContentTypes in Info.plist, and have the skeleton code like below:
import QuickLookThumbnailing
class ThumbnailProvider: QLThumbnailProvider {
override func provideThumbnail(for request: QLFileThumbnailRequest, _ handler: @escaping (QLThumbnailReply?, Error?) -> Void) {
// cannot trigger break point here!
}
I understand I should test the Thumbnail Extension by using:
$ qlmanage -t my_file.ext
Testing Quick Look thumbnails with files:
my_file.ext
But I don't know what process to attach to in the Xcode debugger... a bit clueless...
I've skimmed relevant parts of https://developer.apple.com/videos/play/wwdc2019/719, but there is no real debug tips...
Does anyone know if it is possible to debug with Xcode or not? And if possible, then how? 😅