Search results for

LLDB crash

29,557 results found

Post

Replies

Boosts

Views

Activity

Reply to ELEMENT_TYPE_OF_SET_VIOLATES_HASHABLE_REQUIREMENTS
[quote='797255021, swiftuiforever, /thread/797255, /profile/swiftuiforever'] Is this possible while inserting a String into Set [/quote] I’m not 100% sure. Historically it might’ve been possible to get into this situation if you had a custom subclass of NSString, but I tried that here in my office today and I’m not able to trigger it any more [1]. The most common source of errors like this is folks not maintaining the Hashable invariant. I explain that in detail below. Are you sure that frame 4 is working with Set rather than some custom type? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com [1] For custom NSString subclasses, the compiler seems to eagerly bridge the contents over to a native String. One of the fundamental requirements of Hashable is that, if you values are equal, they must have the same hash [1]. This is what allows containers like Set and Dictionary to use hashing to speed up things up: They put each value in a bucket based
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’25
Reply to Dynamic Library cannot call exposed C function
@DTS Engineer no matter what I tried I could not get this to work. I tried a .tbd file, using the -export-symbols-list flag, passing individual functions, etc. They get stripped every time. I ended up injecting the functions into the library at runtime. Functions are declared normally: void ios_prepare_request(const char *url) { ... } Then in my library I created a function that takes the function pointers, which I call when I load it: NSBundle *frameworkBundle = [NSBundle bundleWithIdentifier:@com.opacitylabs.sdk]; [frameworkBundle load]; opacity_core::register_ios_callbacks(ios_prepare_request); It's more verbose on my side but there is no runtime crash anymore. Thanks for the help anyways!
Topic: Code Signing SubTopic: General Tags:
Aug ’25
Dynamic Library cannot call exposed C function
This is a lengthy one. I have basically compiled a Rust binary into a dylib and packaged into a .xcframework that contains per arch .frameworks. This loads correctly when run from Xcode into a real iOS device. However, when deployed to TestFlight the app crashes. Here is what is a bit different, the dylib is not fully self-contained. It tries to reach in an use C functions I have exposed in my library code. Calling functions that are just within the dylib and just return works fine, but the moment it tries to call one of the exposed functions it crashes. A full in-depth step by step of how I packaged the binaries can be found in my website: https://ospfranco.com/complete-guide-to-dylibs-in-ios-and-android When I look at the TestFlight crash report there are no symbols but the termination cause via WatchDog is: Termination Reason: CODESIGNING 2 Invalid Page I have declared my functions as such: OBJC_EXTERN void ios_prepare_request(const char *url) #define EXPORT __attribute__((visibi
Topic: Code Signing SubTopic: General Tags:
16
0
250
Aug ’25
Reply to "Assertion failed: (false) function _onqueue_rdar53306264_addWaiter file TubeManager.cpp line 1042" Crash
We observed the crash rdar53306264 in both Xcode → Organizer → Crashes and our third-party crash monitoring system. It has been occurring on both iOS 16 and iOS 17, and we did not find the r.54802623 bug. Another concern is that this crash appeared in large volumes during a certain period of time. Could you please advise what might have caused this? We are worried that it may happen again in the future.
Aug ’25
Reply to Crash when testing Speech sample app with FoundationModels on macOS 26.0 beta and iOS 26.0 beta
Hi, this is because you are using an older Xcode (beta 3) with a newer OS (beta 6). During beta, we make changes to the API based on developer feedback, so we do not guarantee the compatibility of runtime symbols (ABI) between beta versions. This crash is unrelated to Intel or not. The best way to resolve this is installing an Xcode that matches your OS.
Aug ’25
Reply to "Assertion failed: (false) function _onqueue_rdar53306264_addWaiter file TubeManager.cpp line 1042" Crash
Thanks for the .ips file. Using that crash report I was able to track down a bunch of different bug reports about crashes with similar signatures. My reading of the ‘lead’ bug (r. 54802623) is that we believe this is fixed by iOS 17 and later. Have you seen any crashes like this after iOS 16? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Aug ’25
Carplay on iOS26 Beta small resolution
Hey, After installing iOS 26 public beta, when using carplay on an aftermarket head unit resolution looks too small. I know it has to with smart zoom setting and disabling it fixes. The problem is that it comes enabled by default with the beta but i can’t disable it. Not because of the small screen but the iPhone can’t handle the high resolution rendering when going on settings and crashes. Does anyone know how to fix this issue? It would be nice if carplay options could be modified from the iPhone directly. Thank you
2
0
78
Aug ’25
.navigationTitle causes hang when creating a new item on a separate page, then navigating back to a TabView with PageTabViewStyle that is displaying that data on iOS 18.2
After a lot of testing and diagnosing, I found that when going to a item creation page, creating an item, navigating back to a TabView with a tabViewStyle of PageTabViewStyle and a navigationTitle that is displaying that data, and all inside of a NavigationStack, the app hangs. I have tested this on iOS 18.2, on both a simulator and a physical iPhone 16 Pro Max, and it always hangs, not crashing. However, when run on My Mac (Designed for iPad) and the iPad simulator, it doesn't crash. This could just be a really niche problem, but it might be the result of some other issue that could cause other problems. I have created a minimal reproducible example, stemming from the iOS App template, with SwiftUI and SwiftData. ContentView.swift import SwiftUI import SwiftData struct ContentView: View { @Environment(.modelContext) private var modelContext @Query private var items: [Item] var body: some View { NavigationStack { TabView { ForEach(items) { item in Text(item.timestamp, format: Date.FormatStyl
Topic: UI Frameworks SubTopic: SwiftUI
4
0
294
Aug ’25
Crash when assigning NSImage to `@objc dynamic var` property
Xcode downloaded a crash report for my app which I don't quite understand. It seems the following line caused the crash: myEntity.image = newImage where myEntity is of type MyEntity: class MyEntity: NSObject, Identifiable { @objc dynamic var image: NSImage! ... } The code is called on the main thread. According to the crash report, thread 0 makes that assignment, and at the same time thread 16 is calling [NSImageView asynchronousPreparation:prepareResultUsingParameters:]. What could cause such a crash? Could I be doing something wrong or is this a bug in macOS? crash.crash
11
0
145
Aug ’25
Reply to Crash when assigning NSImage to `@objc dynamic var` property
The NSImageView is in fact in an NSTableView, and I call NSImageView.bind(:to:withKeyPath:options:) in the callback passed to NSObject.observe(:options:changeHandler). The observer is added when the table cell view's objectValue is set, then removed again when it is set to nil. I'll add a call to NSImageView.unbind(.value) and see if that solves the crash. Your code has me a bit confused. How do you modify the contents of the NSImageView? Are you: Modifying the property of MyObject? (going through the binding) Modifying objectValue? (directly modifying the view cell) It feels like you're somewhat awkwardly set up to do both, which seems like an unnecessary complication. In the first case, there's no reason to remove any views, as you're simply doing a one-timing binding to a specific NSImageView. In the second case, you could drop binding entirely and simply directly assign the image whenever it changes. My concern here is that mixing both puts you in an odd situation, since going through #2 will rem
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’25
Initializing LanguageModelSession crashes app on macOS
Whenever I try to initialize a LanguageModelSession (let session = LanguageModelSession()), my app crashes with EXC_BAD_ACCESS. SystemLanguageModel.default.availability returns available. I tried running the two sample projects I found that use Foundation Models, FoundationModelsTripPlanner and SwiftTranscriptionSampleApp, and they both also crash—immediately on launch. I commented out the Foundation Models logic from the SwiftTranscriptionSampleApp and ran it again, and it no longer crashed. I'm on macOS 26 Beta 4 on an M1 Pro device. I'm based in Austria (EU), if that matters.
7
0
265
Aug ’25
Reply to Crash when assigning NSImage to `@objc dynamic var` property
When any image view is being destroyed, make sure you're setting the target image to null and you've torn down any KVO infrastructure you've created that's tied to that object The NSImageView is in fact in a NSTableView, and I call NSImageView.bind(_:to:withKeyPath:options:) in the callback passed to NSObject.observe(_:options:changeHandler). The observer is added when the table cell view's objectValue is set, then removed again when it is set to nil. I'll add a call to NSImageView.unbind(.value) and see if that solves the crash. class MyCellView: NSTableCellView { private var observer: NSKeyValueObservation? override var objectValue: Any? { didSet { if let objectValue = objectValue as? MyObject { observer = objectValue.observe(.property) { [weak self] _, _ in for view in subviews { view.removeFromSuperview() } let imageView = NSImageView(image: nil) imageView.bind(.value, to: objectValue, withKeyPath: keyPath) addSubview(imageView) } } else { observer = nil } } } } That's generally a reasonable stat
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’25
Reply to Crash when assigning NSImage to `@objc dynamic var` property
I could understand that this crash could be caused by multiple threads releasing the image at the same time, but if only the main thread is accessing them, I cannot imagine how they could be over-released. I'm not doing any manual memory management with them or their parent object. If you have any example of how over-releasing could happen without thread contention and manual memory management, I'd be eager to hear it. Otherwise, I'll let you know as soon as I'm able to reproduce the crash. So, I took another look at your crash log and our code and had a bit more information to share. So, let me start here: 7 AppKit 0x000000018667d860 -[_NSAsynchronousPreparation initWithDelegate:parameters:] + 104 (NSAsynchronousPreparation.m:97) After a second pass through our code, I think the object that's actually at issue here isn't the image, it's the NSImageView. A few things to look at due to that: As a general comment, KVOs’ reputation is extremely... mixed. My own opinion is deeply skewed
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’25