Search results for

LLDB crash

29,559 results found

Post

Replies

Boosts

Views

Activity

Reply to Preview crashes when using ForEach with a Binding to an array and generics
@Developer Tools Engineer thanks. The FB you linked is the right one. @darkpaw Here's a simpler repro without bindings that still crashes. import SwiftUI struct MyItem: Identifiable { var id = UUID() var label: String } struct HelloView: View { let element: MyItem var body: some View { Text(element.label) } } struct ForEachSubView: View { @State var elements: [MyItem] = [ MyItem(label: hello), MyItem(label: world), ] var body: some View { List { ForEach(elements, id: .id) { element in HelloView(element: element) // crash // Works ok: // Text(element.label) } } } } #Preview(ForEachSubViewRepro) { ForEachSubView() } Seems SwiftUI is internally invoking an OutlineList and then crashing when trying to walk a tree, despite the fact that MyItem has no children and no children keypath is specified in the List constructor. Thread 0 Crashed: 0 libswiftCore.dylib 0x1a9b458f0 _assertionFailure(_:_:file:line:flags:) + 176 1 SwiftUI 0x1cab7e9c8 ViewListTree.visitItem(_:force:) + 5232 2
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to Preview crashes when using ForEach with a Binding to an array and generics
[quote='792781021, retrograde, /thread/792781, /profile/retrograde'] The following repro case results in a previews crash on Xcode 26 beta 3 (report attached). FB18762054 [/quote] Thanks for reporting this. I believe the feedback you meant to reference was FB18792113 which I've made sure has reached the right team for the initial triaging of your issue. If we need more information we will reach out to you via the feedback mechanism.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to Preview crashes when using ForEach with a Binding to an array and generics
It also crashes in Xcode 16.4 because what you're doing isn't valid. In your second example, line 28 is wrong. HelloView does not have any Bindings in it; it just takes a label parameter, so line 29 passes in element.label. Correct. Line 28 is treating your elements State var as though it's a binding, by adding the $ in front. And you're also adding the $ to the element part towards the end of the line. elements is a State var and element is a var whose label property is being passed into a view that does not have a Binding. This is why Preview crashes. It will compile if line 13 is this instead: @Binding var label: String, but based on what you're doing with label inside HelloView, i.e. you're not changing it, there's no need for it to be a binding var.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Reply to Preview crashes when using ForEach with a Binding to an array and generics
Simpler repro without generics. import SwiftUI struct MyItem: Identifiable { var id = UUID() var label: String init(_ label: String) { self.label = label } } struct HelloView: View { let label: String var body: some View { Text(label) } } struct ForEachBindingRepro: View { @State var elements: [MyItem] = [ MyItem(hello), MyItem(world), ] var body: some View { List { ForEach($elements, id: .id) { $element in HelloView(label: element.label) // crash // Works ok: // Text(element.label) } } } } #Preview(ForEachBindingRepro) { ForEachBindingRepro() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’25
Preview crashes when using ForEach with a Binding to an array and generics
The following repro case results in a previews crash on Xcode 26 beta 3 (report attached). FB18762054 import SwiftUI final class MyItem: Identifiable, Labelled { var label: String init(_ label: String) { self.label = label } } protocol Labelled { var label: String { get } } struct HelloView: View { let label: String var body: some View { Text(label) } } struct ListView: View { @Binding var elements: [Element] var body: some View { List { ForEach($elements, id: .id) { $element in HelloView(label: element.label) // crash // Replacing the above with a predefined view works correctly // Text(element.label) } } } } struct ForEachBindingRepro: View { @State var elements: [MyItem] = [ MyItem(hello), MyItem(world), ] var body: some View { ListView(elements: $elements) } } #Preview(ForEachBindingRepro) { ForEachBindingRepro() } foreachbindingrepro-2025-07-12-020628.ips
6
0
174
Jul ’25
Reply to DriverKit issue with TestFlight
Thanks for the response. No, but iPadOS apps should not include com.apple.developer.driverkit.userclient-access. Note that your construction of that entitlement is also invalid (it's a list of bundle IDs and requires approval to use), We realized this was for MacOS only and since our app is for iOS, we plan to remove this. The actual bundleId was approved and we just use a censored bundle ID here Assuming the contents you've posted are accurate, then this mismatch is the problem: Those dictionaries must match in order for your DEXT to load. Yes, we also noticed the missing idVendor in our driver entitlement and updated it to match the provisioning profile. However, the issue still persists—our DriverKit is realized but does not start in the TestFlight build. Local Build (works): After enabling the driver and connecting the hardware, the system logs show the driver is both realized and started successfully. TestFlight Build (broken): On the same hardware and sequence, the system only logs the realization of th
Topic: App & System Services SubTopic: Drivers Tags:
Jul ’25
Reply to iPhone + Safari + Passwords violates WebAuthn spec when pubKeyCredParams doesn't contain ES256
Our engineering teams will need to investigate this issue. We'd greatly appreciate it if you could open a bug report, include crash logs and sample code or models that reproduce the issue, and post the FB number here once you do. http://feedbackassistant.apple.com Bug Reporting: How and Why? has tips on creating a successful bug report.
Topic: Privacy & Security SubTopic: General Tags:
Jul ’25
Reply to JavascriptCore crashes with pas_reallocation_did_fail
Thanks for the above answer. I think my options here are very little then. My business relies a lot on Crashlytics, we can track bugs very easily and the alert system is a must for us. Unfortunately, I can't just disable it :(. This is also happening randomly to any user, so I can't even disable it on a reduced audience. Something we could do is to disable Crashlytics for a few seconds when app moves back to the foreground (when the crash is occurring), but I don't know if that disables Crashlytics completely to prevent Apple crash reports to get disrupted. Maybe my next question would be: Is really Crashlytics the problem here or actually the fact that we have two tools bothering each other?
Topic: Safari & Web SubTopic: General Tags:
Jul ’25
Reply to Swapping the `objectAtIndex:` method of `__NSArrayM` using `method_exchangeImplementations` will lead to continuous memory growth.
Thank you for your prompt reply and professional advice! I fully understand the risks of directly manipulating the implementation details of private classes, which indeed pose potential issues for code maintenance. The reason I adopted method swizzling is to catch and handle NSRangeException (array out-of-bounds) crashes that commonly occur in iOS apps. Such problems frequently arise in complex business scenarios and severely impact the user experience. For example: Index out-of-bounds caused by changes in dynamically loaded JSON data formats Inconsistent data states when arrays are operated on by multiple threads Desynchronization between data sources and view updates during complex UI rendering By swapping methods like objectAtIndex:, we’ve implemented unified interception of boundary checks, recording context information and returning default values before an out-of-bounds error occurs. This has effectively reduced the crash rate. However, as you noted, this solution does carry compatibil
Topic: Programming Languages SubTopic: General Tags:
Jul ’25
Xcode 26 Beta 3 Crash on iOS 18 Simulators - NSInvalidUnarchiveOperationException (ToolbarVisualProvider8RootView missing)
Hi, I’m seeing a crash when running my app on iOS 18 simulators or devices using Xcode 26 beta 3. My app’s minimum deployment target is iOS 17, and the crash does not happen when running from Xcode 16.4. The crash occurs specifically at this line: return UIStoryboard(name: storyboard.rawValue, bundle: nil) .instantiateViewController(withIdentifier: view.rawValue) Crash Details: ** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named _TtGC5UIKit17UICoreHostingViewVCS_21ToolbarVisualProvider8RootView_ because no class named _TtGC5UIKit17UICoreHostingViewVCS_21ToolbarVisualProvider8RootView_ was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)' *** First throw call stack: (0x191c3321c 0x18f0cdabc 0x191c91ea0 0x19d740774 0x19d740a18 0x19d740cac 0x194626680 0x194dbc784 0x19d740890 0x19d740cac 0x1949aadd8 0x19d740890 0x19d740a18 0
Topic: UI Frameworks SubTopic: UIKit Tags:
9
0
448
Jul ’25
Reply to iOS 26 UIKIt: Where's the missing cornerConfiguration property of UIViewEffectView?
Digging a bit further, we can find the initializers for the class: (lldb) po [[UICornerConfiguration alloc] _methodDescription] : in UICornerConfiguration: Class Methods: + (id) capsule; (0x1853cb920) + (id) uniformBottom:(id)arg1 topLeft:(id)arg2 topRight:(id)arg3; (0x1853cb608) + (id) capsuleWithMaximumRadius:(double)arg1; (0x1853cb9d8) + (id) uniform:(id)arg1; (0x1853cb1e4) + (id) uniformEdgesWithLeft:(id)arg1 right:(id)arg2; (0x1853cb3a4) + (id) uniformEdgesWithTop:(id)arg1 bottom:(id)arg2; (0x1853cb2dc) + (id) uniformLeft:(id)arg1 topRight:(id)arg2 bottomRight:(id)arg3; (0x1853cb704) + (id) uniformRight:(id)arg1 topLeft:(id)arg2 bottomLeft:(id)arg3; (0x1853cb800) + (id) uniformTop:(id)arg1 bottomLeft:(id)arg2 bottomRight:(id)arg3; (0x1853cb50c)
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’25