If you need help investigating a crash, please include a crash report in your post. To smooth things along, follow these guidelines:
For information on how to get a crash report, see Acquiring crash reports and diagnostic logs.
Include the whole crash report as a text attachment (click the paperclip icon and then choose Add File). This avoids clogging up the timeline while also preserving the wealth of information in the crash report.
If you’re not able to post your crash report as an attachment, see Can’t Post Crash Report as Attachment below.
If you want to highlight a section of the report, include it in the main body of your post. Put the snippet in a code block so that it renders nicely. To create a code block, add a delimiter line containing triple backquotes before and after the block, or just click the Code Block button.
If possible, post an Apple crash report. Third-party crash reporters are often missing critical information and have general reliability problems (for an explanation as to why, see Implementing Your Own Crash Reporter).
Symbolicate your crash report before posting it. For information on how to do this, see Adding identifiable symbol names to a crash report.
If you need to redact the crash report, do so consistently. Imagine you’re building the WaffleVarnish app whose bundle ID is com.example.wafflevarnish but you want to keep your new waffle varnishing technology secret. Replace WaffleVarnish with WwwwwwVvvvvvv and com.example.wafflevarnish with com.eeeeeee.wwwwwwvvvvvvv. This keeps the text in the crash report aligned while making it possible to distinguish the human-readible name of the app (WaffleVarnish) from the bundle ID (com.example.wafflevarnish).
Finally, for information on how to use a crash report to debug your own problems, see Diagnosing issues using crash reports and device logs.
Can’t Post Crash Report as Attachment
Crash reports have two common extensions: .crash and .ips. If you have an .ips file, please post that [1].
DevForums lets you attach a .crash file but not an .ips file (r. 117468172). To work around this, change the extension to .txt.
If DevForums complains that your crash report “contains sensitive language”, leave it out of your initial post and attach it to a reply. That often avoids this roadblock.
If you still can’t post your crash report, upload it to a file sharing service and include the URL in your post. Post the URL in the clear, per tip 14 in Quinn’s Top Ten DevForums Tips.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Because it’s easy to go from an .ips file to a .crash file. I usually do this by choosing File > Quick Look in the Finder. For more info about these file formats, see this post.
Revision History:
2024-11-21 Added a recommendation to post the .ips format if possible.
2024-05-21 Added some advice regarding the “contains sensitive language” message.
2023-10-25 Added the Can’t Post Crash Report as Attachment section. Made other minor editorial changes.
2021-08-26 First posted.
Debugging
RSS for tagDiscover and resolve issues with your app.
Posts under Debugging tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
General:
DevForums tags: Debugging, LLDB, Graphical Debugger
Xcode > Debugging documentation
Diagnosing memory, thread, and crash issues early documentation
Diagnosing issues using crash reports and device logs documentation
Choosing a Network Debugging Tool documentation
Testing a release build documentation
Isolating Code Signing Problems from Build Problems DevForums post
What is an exception? DevForums post
Language Exception from RCTFatal DevForums post
Standard Memory Debugging Tools DevForums post
Using a Sysdiagnose Log to Debug a Hard-to-Reproduce Problem DevForums post
Posting a Crash Report DevForums post
Creating a test project DevForums post
Implementing Your Own Crash Reporter DevForums post
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
Hey guys, my application has the following error:
Issue Description
The app exhibited one or more bugs that would negatively impact App Store users.
Bug description: the "Entrar" button in the login screen was unresponsive.
Review device details:
Device type: iPad Air (5th generation)
OS version: iOS 18.1.1
The problem is that the test is already done on the emulator and I cannot reproduce this error in any way. I've tried everything. Is there any way to restrict access to the iPad? Could anyone help me please?
A user gave me the crash log on his M4 machine when he first launches the app. I have M1 and my app works fine, which begs the question, why M4 has the crash! This is my app the I developed since 2011 until now.
Any hints will be appreciated or anyone has similar issues like to share?
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: DA1CEECB-28D4-40A9-8F0C-7125812084F4
CrashReporter Key: FB8A5DBB-7140-D370-AC72-EC158266383C
Hardware Model: Mac16,3
Process: Stocks Live [5506]
Path: /private/var/folders/*/Stocks Live.app/Stocks Live
Identifier: com.cinnamonmobile.StocksLive
Version: 34.2 (34.2.0)
AppStoreTools: 16B39
AppVariant: 1:MacFamily20,1:18
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Coalition: com.cinnamonmobile.StocksLive [2018]
Date/Time: 2024-11-27 12:41:48.0456 -0500
Launch Time: 2024-11-27 12:41:47.5710 -0500
OS Version: macOS 15.1.1 (24B2091)
Release Type: User
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Subtype: KERN_MEMORY_ERROR at 0x0000000120034000
Exception Codes: 0x000000000000000a, 0x0000000120034000
VM Region Info: 0x120034000 is in 0x120034000-0x120038000; bytes after start: 0 bytes before end: 16383
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
CoreAnimation 120030000-120034000 [ 16K] rw-/rwx SM=PRV
---> mapped file 120034000-120038000 [ 16K] r--/rw- SM=COW Object_id=14630bfe
CoreAnimation 120038000-12003c000 [ 16K] r--/r-- SM=PRV
Termination Reason: SIGNAL 10 Bus error: 10
Terminating Process: exc handler [5506]
Triggered by Thread: 0
Kernel Triage:
decmpfs - (arg = 0x80000001) compressor is not registered
APFS - (arg = 0x200040) Pagein of compressed inode failed
VM - (arg = 0x190000002d) Filesystem pagein returned an error in vnode_pagein
VM - (arg = 0x0) Page has error bit set
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 CoreFoundation 0x18803f48c __CFStringCreateImmutableFunnel3 + 716
1 FincancialCoreFrameWork 0x10358d3c4 -[MOStringDocument loadFromContents:ofType:error:] + 156
2 UIKitCore 0x1ba34a67c __32-[UIDocument readFromURL:error:]_block_invoke + 104
3 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20
4 libdispatch.dylib 0x187e2fdb0 _dispatch_async_and_wait_invoke + 92
5 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20
6 libdispatch.dylib 0x187e2ef68 _dispatch_main_queue_drain + 980
7 libdispatch.dylib 0x187e2eb84 _dispatch_main_queue_callback_4CF + 44
8 CoreFoundation 0x1880f8e60 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
9 CoreFoundation 0x1880b8a4c __CFRunLoopRun + 1996
10 CoreFoundation 0x1880b7bc4 CFRunLoopRunSpecific + 588
11 HIToolbox 0x193529f64 RunCurrentEventLoopInMode + 292
12 HIToolbox 0x19352fd54 ReceiveNextEventCommon + 636
13 HIToolbox 0x19352feb8 _BlockUntilNextEventMatchingListInModeWithFilter + 76
14 AppKit 0x18bbe398c _DPSNextEvent + 660
15 AppKit 0x18c523ddc -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
16 AppKit 0x18bbd6a64 -[NSApplication run] + 480
17 AppKit 0x18bbad2e8 NSApplicationMain + 888
18 AppKit 0x18bdfb7f4 _NSApplicationMainWithInfoDictionary + 24
19 UIKitMacHelper 0x1a28f8b38 UINSApplicationMain + 972
20 UIKitCore 0x1b99de3a8 UIApplicationMain + 148
21 Stocks Live 0x102bcc058 0x102bc4000 + 32856
22 dyld 0x187c50274 start + 2840
Thread 1:: Dispatch queue: UIDocument File Access
0 libsystem_kernel.dylib 0x187f93b8c __ulock_wait + 8
1 libdispatch.dylib 0x187e21048 _dlock_wait + 56
2 libdispatch.dylib 0x187e20dfc _dispatch_thread_event_wait_slow + 56
3 libdispatch.dylib 0x187e2ffc4 __DISPATCH_WAIT_FOR_QUEUE__ + 368
4 libdispatch.dylib 0x187e2fb70 _dispatch_sync_f_slow + 148
5 UIKitCore 0x1ba351384 -[UIDocument(UIDocumentInternal) _performBlock:synchronouslyOnQueue:] + 76
6 UIKitCore 0x1ba347ff0 __40-[UIDocument openWithCompletionHandler:]_block_invoke + 588
7 libdispatch.dylib 0x187e1e8f8 _dispatch_call_block_and_release + 32
8 libdispatch.dylib 0x187e20658 _dispatch_client_callout + 20
9 libdispatch.dylib 0x187e27c60 _dispatch_lane_serial_drain + 744
10 libdispatch.dylib 0x187e28768 _dispatch_lane_invoke + 380
11 libdispatch.dylib 0x187e337e8 _dispatch_root_queue_drain_deferred_wlh + 288
12 libdispatch.dylib 0x187e33034 _dispatch_workloop_worker_thread + 540
13 libsystem_pthread.dylib 0x187fcf3d8 _pthread_wqthread + 288
14 libsystem_pthread.dylib 0x187fce0f0 start_wqthread + 8
Thread 2:
0 libsystem_pthread.dylib 0x187fce0e8 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x187fce0e8 start_wqthread + 0
Hello,
I have these two errors in this particular block of code: Capture of 'self' with non-sendable type 'MusicPlayer?' in a @Sendable closure and Capture of 'localUpdateProgress' with non-sendable type '(Double, Double) -> Void' in a @Sendable closure
` @MainActor
func startProgressTimer(updateProgress: @escaping (Double, Double) -> Void) {
timer?.invalidate() // Stop any existing timer
let localUpdateProgress = updateProgress
timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { [weak self] _ in
guard let self = self,
let audioPlayer = self.audioPlayer,
let currentItem = audioPlayer.currentItem else {
print("currentItem is nil or audioPlayer is unavailable")
return
}
let currentTime = currentItem.currentTime().seconds
let duration = currentItem.duration.seconds
localUpdateProgress(currentTime, duration)
}
}`
I've tried nearly every solution and can't think of one that works. Any help is greatly appreciated :)
My app experiencing a rare crash that I am unable to reproduce and am struggling to make progress with:
Thread 0 name:
Thread 0 Crashed:
0 libobjc.A.dylib 0x00000001926c3c20 objc_msgSend + 32 (:-1)
1 Foundation 0x00000001997357b4 __NSThreadPerformPerform + 264 (NSThread.m:1084)
2 CoreFoundation 0x000000019a82b834 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1957)
3 CoreFoundation 0x000000019a82b7c8 __CFRunLoopDoSource0 + 176 (CFRunLoop.c:2001)
4 CoreFoundation 0x000000019a8292f8 __CFRunLoopDoSources0 + 340 (CFRunLoop.c:2046)
5 CoreFoundation 0x000000019a828484 __CFRunLoopRun + 828 (CFRunLoop.c:2955)
6 CoreFoundation 0x000000019a827cd8 CFRunLoopRunSpecific + 608 (CFRunLoop.c:3420)
7 GraphicsServices 0x00000001df2751a8 GSEventRunModal + 164 (GSEvent.c:2196)
8 UIKitCore 0x000000019ce61ae8 -[UIApplication _run] + 888 (UIApplication.m:3713)
9 UIKitCore 0x000000019cf15d98 UIApplicationMain + 340 (UIApplication.m:5303)
10 <redacted> 0x000000010287af04 main + 64 (AppDelegate.swift:15)
11 dyld 0x00000001bdfff154 start + 2356 (dyldMain.cpp:1298)
I have done a fair amount of digging, looking at other similar crashes and at this:
https://developer.apple.com/forums/thread/92102
but being unable to reproduce is quite limiting.
I found this very similar issue with useful info on finding which function was being called:
https://forums.developer.apple.com/forums/thread/67763
But in my case, the x1 (and x2) register values seem to point to an area outside of the ranges in the "Binary Images" section..
I've attached an example of a full crash report (with the app name redacted):
2024-10-30_20-44-26.7576_+0000-98e2ef3ee4472b9eb237b0780e8fa0162e1aa7f4.crash
Any help would be greatly appreciated.
// Füge OrderRow hinzu
struct OrderRow: View {
let order: Order
var body: some View {
VStack(alignment: .leading, spacing: 8) {
HStack {
Text("Tisch \(order.tableNumber)")
.font(.headline)
Spacer()
Text(order.status.rawValue)
.font(.caption)
.padding(.horizontal, 8)
.padding(.vertical, 4)
.background(order.status.color.opacity(0.2))
.foregroundColor(order.status.color)
.cornerRadius(8)
}
Text(order.timestamp, style: .time)
.font(.caption)
.foregroundColor(.gray)
ForEach(order.items) { item in
Text("\(item.quantity)x \(item.item.name)")
.font(.subheadline)
}
HStack {
Spacer()
Text(String(format: "%.2f €", order.totalAmount))
.bold()
}
}
.padding()
.background(Color.white)
.cornerRadius(12)
.shadow(radius: 2)
}
}
struct MenuItemRow: View {
let item: MenuItem
var body: some View {
HStack {
Text(item.name)
.font(.headline)
Spacer()
Text(String(format: "%.2f €", item.price))
.font(.subheadline)
}
.padding()
}
}
struct MenuItemsView: View {
@Binding var selectedItems: [OrderItem]
@Environment(.dismiss) private var dismiss
func filteredItems(for category: MenuCategory) -> [MenuItem] {
return sampleMenuItems.filter { $0.category == category }
}
func addItemToOrder(_ item: MenuItem) {
if let index = selectedItems.firstIndex(where: { $0.item.id == item.id }) {
selectedItems[index].quantity += 1
} else {
selectedItems.append(OrderItem(item: item, quantity: 1))
}
}
var body: some View {
NavigationView {
List {
ForEach(MenuCategory) { category in
Section(header: Text(category.rawValue)) {
let filteredItems = sampleMenuItems.filter
ForEach(filteredItems) { item in
}
MenuItemRow(item: sampleMenuItems.filter) {
addItemToOrder
}
}
}
}
}
.navigationTitle("Menü")
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button("Fertig") {
dismiss()
}
}
}
}
}
}
// Sample Menü-Items
let sampleMenuItems: [MenuItem] = [
MenuItem(name: "Cola", description: "0,33l", price: 3.50, category: .drinks, image: "cola"),
MenuItem(name: "Sprite", description: "0,33l", price: 3.50, category: .drinks, image: "sprite"),
MenuItem(name: "Bier", description: "0,5l", price: 4.00, category: .drinks, image: "beer"),
MenuItem(name: "Nachos", description: "mit Käsesauce", price: 5.50, category: .snacks, image: "nachos"),
MenuItem(name: "Pommes", description: "mit Ketchup", price: 4.50, category: .food, image: "fries"),
MenuItem(name: "********", description: "alkoholfrei", price: 6.50, category: .specials, image: "********")
]
struct NewEventView: View {
var body: some View {
Text("New Event")
}
}
struct EventManagementView: View {
var body: some View {
Text("Event Management")
}
}
struct OrderRow: View {
var order: String
var body: some View {
Text("Order: (order)")
}
}
#Preview {
ContentView()
}
Something (or a lot) is janky about apps built for "My Mac - designed for iPad."
Aside from things just not working, the amount of garbage spewed to the console during debugging is unmanageable. I can't see my own trace statements amongst screens and screens of repetitive nonsense.
I right-clicked on it and set it to filter out errors, but I'd like to get notified of legitimate errors. Anyone employing a clever filtering method I'm not aware of?
I have an app whose logic is in C++ and rest of the parts (UI) are in Swift and SwiftUI.
When an exception is raised by some C++ code, I'm using the Linux signal handler mechanism to trap it. From my previous post, I understand that fatal exceptions like SIGSEGV, SIGBUS, SIGFPE etc., there's nothing much that can be done by the process. My only intent for using a signal handler is to log something, so that it becomes easy to fix during development. Ofc, even that logging can fail, based on the severity of the exception, but that's okay... make an attempt to log - if it works, great, else the process can terminate.
I'm registering for SIGSEGV and SIGFPE with the following code
// ExceptionHandlingCpp.hpp file
struct tSignals {
SignalHandlerFunc signalHandlerFunc;
uint32_t signal;
[[maybe_unused]]
uint8_t reserved[4];
};
// ExceptionHandlingCpp.cpp file
tSignals ExceptionHandlingCpp::unixSignals[] = {
{HandleSignals, SIGFPE, {0}},
{HandleSignals, SIGSEGV, {0}},
{HandleSignals, SIGKILL, {0}},
};
std::string ExceptionHandlingCpp::signalToString(int signal) {
switch(signal) {
case SIGFPE:
return "SIGFPE";
case SIGSEGV:
return "SIGSEGV";
case SIGKILL:
return "SIGKILL";
default:
return "Unknown signal";
}
}
void ExceptionHandlingCpp::RegisterSignals() {
LOG("ExceptionHandlingCpp::RegisterSignals()");
struct sigaction sa;
sa.sa_flags = SA_SIGINFO;
for(int i = 0; i < sizeof(unixSignals)/sizeof(tSignals); ++i) {
sa.sa_sigaction = unixSignals[i].signalHandlerFunc;
if(sigaction(unixSignals[i].signal, &sa, nullptr) == 1) {
LOG("Failed to set " + signalToString(unixSignals[i].signal) + "'s signal handler!");
} else {
LOG(signalToString(unixSignals[i].signal) + "'s signal handler set sucessfully!");
}
}
}
In my signal handler (HandleSignals method), immediately after trapping a signal, I log something and set the default handler... This breaks out of the loop that occurs when returning from the signal handler.
// ExceptionHandlingCpp.cpp
void ExceptionHandlingCpp::HandleSignals(int pSignal, siginfo_t *pInfo, void *pContext) {
LOG("ExceptionHandlingCpp::HandleSignals(int, signinfo_t*, void*)");
LOG("signal = " + signalToString(pSignal));
UnregisterSignals(pSignal);
LOG("Returning from exception handler...");
}
void ExceptionHandlingCpp::UnregisterSignals(int pSignal) {
LOG("UnregisterSignals(int)");
struct sigaction defaultAction {};
defaultAction.sa_handler = SIG_DFL;
if(sigaction(pSignal, &defaultAction, nullptr) == -1) {
LOG("Error in resetting action for " + signalToString(pSignal));
} else {
LOG("Successfully reset " + signalToString(pSignal) + "'s action to default!");
}
}
When I test this code by raising SIGSEGV (as shown below),
void ExceptionHandlingCpp::DereferenceNullPtr ()
{
LOG("DereferenceNullPtr()");
int* ptr = nullptr;
LOG("Raising exception...");
int value = *ptr;
}
everything works as expected. Signal handler is invoked, default handler is set and the process immediately quits. But when I try to raise a SIGFPE,
void* ExceptionHandlingCpp::DivisionByZero ([[maybe_unused]] void* pParms)
{
LOG("DivisionByZero()");
int num1;
int num2;
int result;
num1 = 5;
num2 = 0;
LOG("Raising exception...");
result = num1 / num2;
LOG("Returning from DivisionByZero() method");
return nullptr;
}
my signal handler is not invoked (as shown in the logs below). The process doesn't terminate either. It seems that the flow simply 'walks over' this division by zero instruction as if nothing happened and returns from that method, which shouldn't have happened, as the process should've terminated after reaching my signal handler.
RegisterSignals()
SIGFPE's signal handler set sucessfully!
SIGSEGV's signal handler set sucessfully!
SIGKILL's signal handler set sucessfully!
....
DivisionByZero()
Raising exception...
Returning from DivisionByZero() method
....
AppDelegate.applicationWillBecomeActive(_:)
AppDelegate.applicationDidBecomeActive(_:)
...
// UI is displayed
Why is SIGFPE not raised? What am I missing here?
Hi everyone,
I'm experiencing crashes that consistently occur on iOS 18 devices, which seem to share a common root cause. I'm hoping for some guidance. Here are the details of the crashes as received from Xcode Organizer:
Crash Trace 1:
0 CoreFoundation 0x0000000192c50e54 CF_IS_OBJC + 76 (CFRuntime.c:461)
1 CoreFoundation 0x0000000192c4dd3c CFRelease + 60 (CFRuntime.c:1202)
2 CoreFoundation 0x0000000192d015e0 _signalEventSync + 252 (CFStream.c:636)
3 CoreFoundation 0x0000000192d53050 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x000000019a93c370 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019a93e0d0 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x000000019a9456d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
7 libdispatch.dylib 0x000000019a9461e0 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019a951258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019a950aa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x000000021a00fc7c _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x000000021a00c488 start_wqthread + 8 (:-1)
Crash Trace 2:
0 libobjc.A.dylib 0x0000000186f33c20 objc_msgSend + 32
1 CoreFoundation 0x0000000189cb14b8 _inputStreamCallbackFunc + 36 (CFObject.m:1952)
2 CoreFoundation 0x0000000189cb0aa8 _signalEventSync + 216 (CFStream.c:626)
3 CoreFoundation 0x0000000189d01e30 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x0000000191948370 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019194a0d0 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x00000001919516d8 _dispatch_lane_serial_drain + 744 (queue.c:3934)
7 libdispatch.dylib 0x00000001919521e0 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019195d258 _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019195caa4 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x000000021214bc7c _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x0000000212148488 start_wqthread + 8
Crash Trace 3:
0 libobjc.A.dylib 0x00000001941d9ce8 objc_loadWeakRetained + 156 (NSObject.mm:525)
1 CoreFoundation 0x0000000196d0a0f4 _outputStreamCallbackFunc + 36 (CFObject.m:1960)
2 CoreFoundation 0x0000000196d09724 _signalEventSync + 216 (CFStream.c:626)
3 CoreFoundation 0x0000000196d07948 ___signalEventQueue_block_invoke + 28 (CFStream.c:646)
4 libdispatch.dylib 0x000000019e9de248 _dispatch_call_block_and_release + 32 (init.c:1549)
5 libdispatch.dylib 0x000000019e9dffa8 _dispatch_client_callout + 20 (object.m:576)
6 libdispatch.dylib 0x000000019e9e75cc _dispatch_lane_serial_drain + 768 (queue.c:3934)
7 libdispatch.dylib 0x000000019e9e8124 _dispatch_lane_invoke + 380 (queue.c:4025)
8 libdispatch.dylib 0x000000019e9f338c _dispatch_root_queue_drain_deferred_wlh + 288 (queue.c:7193)
9 libdispatch.dylib 0x000000019e9f2bd8 _dispatch_workloop_worker_thread + 540 (queue.c:6787)
10 libsystem_pthread.dylib 0x00000002220f3680 _pthread_wqthread + 288 (pthread.c:2696)
11 libsystem_pthread.dylib 0x00000002220f1474 start_wqthread + 8
Notable Points:
All crashes occur only on iOS 18 and newer versions.
The crashes are independent of the Xcode version used to build the app (tested with both Xcode 15.4 and 16).
All crash traces occur in CoreFoundation and seem to have nothing related to our app codebase.
I've attempted to profile the app using Instruments to identify any zombie objects, but the crashes do not manifest on my own devices.
I've referred to discussions, including this forum thread, but have not yet found a solution.
Questions:
Has anyone else encountered similar issues on iOS 18?
Are there specific aspects of iOS 18 that might contribute to these CoreFoundation and libobjc-related crashes?
Would appreciate any suggestions for further diagnostics or potential workarounds.
Thank you for your help!
In our app we use CoreML. But ever since macOS 15.x was released we started to get a great bunch of crashes like this:
Incident Identifier: 424041c3-884b-4e50-bb5a-429a83c3e1c8
CrashReporter Key: B914246B-1291-4D44-984D-EDF84B52310E
Hardware Model: Mac14,12
Process: <REMOVED> [1509]
Path: /Applications/<REMOVED>
Identifier: com.<REMOVED>
Version: <REMOVED>
Code Type: arm64
Parent Process: launchd [1]
Date/Time: 2024-11-13T13:23:06.999Z
Launch Time: 2024-11-13T13:22:19Z
OS Version: Mac OS X 15.1.0 (24B83)
Report Version: 104
Exception Type: SIGABRT
Exception Codes: #0 at 0x189042600
Crashed Thread: 36
Thread 36 Crashed:
0 libsystem_kernel.dylib 0x0000000189042600 __pthread_kill + 8
1 libsystem_c.dylib 0x0000000188f87908 abort + 124
2 libsystem_c.dylib 0x0000000188f86c1c __assert_rtn + 280
3 Metal 0x0000000193fdd870 MTLReportFailure.cold.1 + 44
4 Metal 0x0000000193fb9198 MTLReportFailure + 444
5 MetalPerformanceShadersGraph 0x0000000222f78c80 -[MPSGraphExecutable initWithMPSGraphPackageAtURL:compilationDescriptor:] + 296
6 Espresso 0x00000001a290ae3c E5RT::SharedResourceFactory::GetMPSGraphExecutable(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, NSDictionary*) + 932
.
.
.
43 CoreML 0x0000000192d263bc -[MLModelAsset modelWithConfiguration:error:] + 120
44 CoreML 0x0000000192da96d0 +[MLModel modelWithContentsOfURL:configuration:error:] + 176
45 <REMOVED> 0x000000010497b758 -[<REMOVED> <REMOVED>] (<REMOVED>)
No similar crashes on macOS 12-14!
MetalPerformanceShadersGraph.log
Any clue what is causing this?
Thanks! :)
Hello
A critical issue with the Apple Music app has been identified and consistently reported through Feedback Assistant, yet it remains unresolved. This exploit can reliably cause the app to crash under specific conditions, and each instance results in the device physically overheating, raising significant concerns regarding performance and hardware safety.
The issue is reproducible every time, highlighting its severity and the potential impact on user experience and device functionality. Immediate attention from the development team would be greatly appreciated to address this matter.
Contact us to see video: dontdelaydynamics.org
Thank you!
Here is a modified code from the documentation example
https://www.swift.org/documentation/server/guides/memory-leaks-and-usage.html#troubleshooting :
class ViewController: UIViewController {
var closure: () -> Void = { () }
public func doNothing() {}
public func doSomethingThatLeaks() {
self.closure = {
// This will leak as it'll create a permanent reference cycle:
//
// self -> self.closure -> self
self.doNothing()
}
}
override func viewDidLoad() {
super.viewDidLoad()
// Memory leak example:
doSomethingThatLeaks()
// Abandoned memory example:
// NotificationCenter.default.addObserver(forName: .init("Abandoned"), object: nil, queue: nil) { _ in
// print("\(self)")
// }
}
deinit {
print(#function, Self.self)
}
}
If you place it, for example, in a navigation controller, do a push-pop several times, deinit will not be printed.
But if you look in the Debug Memory Graph, it will not even show that there is a strong reference to this controller:
Only if you manually select:
You can see that it is held by the closure context, which it holds:
This is definitely not abandoned memory (like the commented piece of the code example), but it is not shown either in the Debug Memory Graph or in Instruments Leaks.
Why?
Hi guys,
I've been this app for quite a while and I wanted to add audio to it but I've encountered a strange bug. Whenever I try to play the audio from the testing device, it prints out that the audio file cannot be found. I've checked multiple times the names and the code and I get no errors there whatsoever. I have no idea what might be causing this. Here's a part of the code:
`import SwiftUI
import AVFoundation
struct Card: Identifiable {
let id = UUID()
let heading: String
let description: String
let imageName: String
let detailDescription: String
let sonification: String
}
struct ExplorepageUI: View {
@State private var selectedCard: Card?
@State private var showMore = false
@State private var currentIndex = 0
@State private var currentCards: [Card] = []
let galaxies = [
Card(heading: "The Mice Galaxies",
description: "They’re located about 300 million light-years away in the constellation Coma Berenices.",
imageName: "TheMiceGalaxiesHubble",
detailDescription:"""
Their name refers to the long tails produced by tidal action, the relative difference between gravitational pulls on the near and far parts of each galaxy, known here as a galactic tide. It is a possibility that both galaxies, which are members of the Coma Cluster, have experienced collision, and will continue colliding until they coalesce. The colors of the galaxies are peculiar. In NGC 4676A a core with some dark markings is surrounded by a bluish white remnant of spiral arms. The tail is unusual, starting out blue and terminating in a more yellowish color, despite the fact that the beginning of each arm in virtually every spiral galaxy starts yellow and terminates in a bluish color. NGC 4676B has a yellowish core and two arcs; arm remnants underneath are bluish as well.
The galaxies were photographed in 2002 by the Hubble Space Telescope. In the background of the Mice Galaxies, there are over 3000 galaxies, at distances up to 13 billion light-years.
""",
sonification: "SonificationoftheMiceGalaxies"),
`class MusicPlayer: ObservableObject {
private var audioPlayer: AVPlayer?
func playSound(named sonificationFileName: String){
if let url = Bundle.main.url(forResource: sonificationFileName, withExtension: "mp3"){
print("✅ Found audio file at: \(url)")
audioPlayer = try? AVPlayer(url: url)
audioPlayer?.play()
print("🎵 Audio should now be playing!")
} else {
print("❌ Audio file not found: \(sonificationFileName).mp3")
}
}
func pause(){
audioPlayer?.pause()
}
}
This is only occurring on M4's. I am unable to determine the cause.
Attached is an ips file, could someone investigate?
Perry
Scrypted Helper-2024-11-14-202729.ips
Have a rare crash in one of our framework which I am unable to figure out.
Attaching the crash log here. Any idea how to debug this to find the root cause?
Crash.crash
We have had the same video player in our app for at least 5 years with few issues but the iOS 18 updated has now resulted in video playback for our users who have downloaded the video for offline viewing is now played at 2x speed.
I have an old Objective-C app that has been running for several years. The last compilation was in February 2024. I just upgraded to Sequoia 15.1.
The app has four subviews on its main view. When I run the app only the subview that was the last one instantiated is visible. I know the other subviews are there, because a random mouse click in one invisible view causes the expected change in the visible view.
What changed in 15.1 to cause this?
Hello,
I’m working with the RoomPlan API to capture and export 3D room models in an iOS app. My goal is to implement the RoomCaptureSessionDelegate protocol to handle the end of a room capture session. However, I’m encountering a cautionary warning in Xcode:
Warning: "captureSession(:didEndWith:error:) nearly matches defaulted requirement captureSession(:didEndWith:error:) of protocol RoomCaptureSessionDelegate."
I’ve verified that my delegate method signature matches the protocol, but the warning persists. I suspect this might be due to minor discrepancies in the parameter types or naming conventions required by the protocol.
Below is my full RoomScanner.swift file:
import RoomPlan
import SwiftUI
import UIKit
func exportModelToFiles() {
let exportURL = FileManager.default.temporaryDirectory.appendingPathComponent("RoomModel.usdz")
let documentPicker = UIDocumentPickerViewController(forExporting: [exportURL])
documentPicker.modalPresentationStyle = .formSheet
if let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene,
let rootViewController = windowScene.windows.first?.rootViewController {
rootViewController.present(documentPicker, animated: true, completion: nil)
}
}
class RoomScanner: ObservableObject {
var roomCaptureSession: RoomCaptureSession?
private let sessionConfig = RoomCaptureSession.Configuration()
private var capturedRoom: CapturedRoom?
func startSession() {
roomCaptureSession = RoomCaptureSession()
roomCaptureSession?.delegate = self
roomCaptureSession?.run(configuration: sessionConfig)
}
func stopSession() {
roomCaptureSession?.stop()
guard let room = capturedRoom else {
print("No room data available for export.")
return
}
let exportURL = FileManager.default.temporaryDirectory.appendingPathComponent("RoomModel.usdz")
do {
try room.export(to: exportURL)
print("3D floor plan exported to \(exportURL)")
} catch {
print("Error exporting room model: \(error)")
}
}
}
// MARK: - RoomCaptureSessionDelegate
extension RoomScanner: RoomCaptureSessionDelegate {
func captureSession(_ session: RoomCaptureSession, didUpdate room: CapturedRoom) {
// Handle real-time updates if necessary
}
func captureSession(_ session: RoomCaptureSession, didEndWith capturedRoom: CapturedRoom, error: Error?) {
if let error = error {
print("Capture session ended with error: \(error.localizedDescription)")
} else {
self.capturedRoom = capturedRoom
}
}
}
When I upgraded to Sequoia 15.1, an app that worked fine under OS 14 stopped working. Out of 4 views on the main screen, only 1 is visible. Yet, if I click where another view should be, I get the expected action so the views are there, just not visible. Only I can't see where I am clicking!
I had to upgrade to Xcode 16 to recompile the app and run it in Debug mode. When I do, I get the following:
NSBundle file:///System/Library/PrivateFrameworks/MetalTools.framework/ principal class is nil because all fallbacks have failed.
Can't find or decode disabled use cases.
applicationSupportsSecureRestorableState
FWIW - the only view that actually shows up is the last subview added to the main view.
I have to guess which command queue is the one I want to debug in Xcode here:
I have label set, but it doesn't seem to affect this part of Xcode.
Could someone help me with a good direction on where or how could I fix for this crash from console log:
Not able to open storyboard or XIB.
Once opening them, Xcode is crashing.
tried uninstalling the Xcode, couldn't fix even after deleting derived data and caches.
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Incident Identifier: 7E6D64FF-D4E9-4E3A-A37A-BC5016316DCD
CrashReporter Key: 4776E37C-4D3D-F705-40D5-8A96EE95C89A
Hardware Model: Mac15,6
Process: IBAgent-iOS [31688]
Path: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Overlays/IBAgent-iOS
Identifier: IBAgent-iOS
Version: 16.0 (23506)
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd_sim [31680]
Coalition: com.apple.CoreSimulator.SimDevice.178E8D7E-176F-4B7F-8956-D26C5EF7323A [5165]
Responsible Process: SimulatorTrampoline [1185]
Date/Time: 2024-11-06 14:59:29.3079 +0530
Launch Time: 2024-11-06 14:59:28.9368 +0530
OS Version: macOS 15.1 (24B83)
Release Type: User
Report Version: 104
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000102e1e19c
Termination Reason: SIGNAL 5 Trace/BPT trap: 5
Terminating Process: exc handler [31688]
Triggered by Thread: 0
Application Specific Information:
Abort Cause 259
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_platform.dylib 0x102e1e19c _os_unfair_lock_recursive_abort + 36
1 libsystem_platform.dylib 0x102e19504 _os_unfair_lock_lock_slow + 304
2 libGSFont.dylib 0x19045ebb4 GSFontFileDescriptorForPath + 28
3 libFontParser.dylib 0x19047d714 TFileDescriptorContext::TFileDescriptorContext(char const*) + 216
4 libFontParser.dylib 0x19057c7e4 TFileDataReference::Map(char const*) + 36
5 libFontParser.dylib 0x19047d514 TFileDataReference::TFileDataReference(char const*) + 88
6 libFontParser.dylib 0x19057c934 TFileDataSurrogate::TFileDataSurrogate(char const*, timespec) + 152
7 libFontParser.dylib 0x1905cbaac TFont::CreateFontEntitiesForFile(char const*, timespec, bool, short, char const*) + 580
8 libFontParser.dylib 0x19047d1e0 FPFontCreateFontsWithPath + 200
9 CoreGraphics 0x18b612c54 create_private_data_array_with_path + 16
10 CoreGraphics 0x18b2cddd4 CGFontCreateFontsWithPath + 36
11 CoreGraphics 0x18b3389b0 CGFontCreateFontsWithURL + 680
12 libGSFont.dylib 0x190465518 AddFontsFromURLOrPath + 288
13 libGSFont.dylib 0x19045ffb4 RegisterURLAndCopyFaces + 168
14 libGSFont.dylib 0x19045fefc GSFontRegisterURL + 76
15 CoreText 0x181c5e0b8 _CTFontManagerRegisterActionFontsForURLs(__CFArray const*, CTFontManagerScope, bool, Action, __CFArray const**) + 396
16 IBCocoaTouchToolFoundation 0x10307e748 +[UIFont(IBCocoaTouchToolIntegration) ib_registerFontsAtURLs:] + 336
17 AssetCatalogFoundation 0x1033e1a88 __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke + 196
18 AssetCatalogFoundation 0x1033e191c -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:] + 328
19 AssetCatalogFoundation 0x1033e14bc __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke + 100
20 libdispatch.dylib 0x180178de0 _dispatch_client_callout + 16
21 libdispatch.dylib 0x180188bc8 _dispatch_async_and_wait_invoke + 112
22 libdispatch.dylib 0x180178de0 _dispatch_client_callout + 16
23 libdispatch.dylib 0x180187c60 _dispatch_main_queue_drain + 1272
24 libdispatch.dylib 0x180187758 _dispatch_main_queue_callback_4CF + 40
25 CoreFoundation 0x18041b2dc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
26 CoreFoundation 0x180415838 __CFRunLoopRun + 1944
27 CoreFoundation 0x180414c24 CFRunLoopRunSpecific + 552
28 Foundation 0x180f319c8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 208
29 AssetCatalogFoundation 0x1033bdc00 -[IBAbstractPlatformTool startServingReceiveChannel:] + 292
30 AssetCatalogFoundation 0x1033bddf4 -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:] + 96
31 AssetCatalogFoundation 0x1033be718 +[IBAbstractPlatformTool main] + 800
32 IBAgent-iOS 0x102b77930 main + 32
33 dyld_sim 0x102b89410 start_sim + 20
34 dyld 0x102c96274 start + 2840