I am using Xcode 15 beta 2 to work on an application and suddenly my on-device builds became vertically shrunk, with 0 changes to the UI or code or configuration. The application looks perfectly normal in Xcode preivews, but when I load the app on my device it looks like it's for the iPhone SE, when I'm running an iPhone 13 Pro Max.
Already tried:
Cleaning build folder
Deleting Derived Data
Restarting iPhone
Restarting Mac
Printing UIScreen.main.bounds.width and size to console
Display zoom on iphone is set to default
How it looks on my phone
How it looks in XCode
Both built from the exact same source code
Debugging
RSS for tagDiscover and resolve issues with your app.
Posts under Debugging tag
200 Posts
Sort by:
Post
Replies
Boosts
Views
Activity
Using Xcode (or Instruments), is there a way to know all the functions/symbols that are touched by a line of code?
struct Test {
private func intro() {
}
func partOne() {
intro()
}
func partTwo() {
partOne()
}
func partThree() {
partTwo()
print(credits)
}
private var credits: String {
""
}
}
let test = Test()
test.partTwo() // partTwo, partOne, intro
test.partThree() // partThree, partTwo, partOne, intro, credits
I have this exception backtrace in my app. I'm not sure if this crash is from my implementation or from the OS.
From the frame 2 we can see that this is the one that throwing exception, but I still have no idea about it.
Does anyone can help?
Thanks
Here is the back complete crash log and the backtrace:
2023-07-20_10-12-23.5237_+0700-e3c7635495de265f5efcc92a0d27dd1d0f7bede7.crash
Last Exception Backtrace:
0 CoreFoundation 0x1b6838d78 __exceptionPreprocess + 220 (NSException.m:200)
1 libobjc.A.dylib 0x1cf49d734 objc_exception_throw + 60 (objc-exception.mm:565)
2 CoreFoundation 0x1b6890024 +[NSException raise:format:] + 112 (NSException.m:156)
3 UIKitCore 0x1b9617e20 -[UIDocument writeContents:toURL:forSaveOperation:originalContentsURL:error:] + 616 (UIDocument.m:1329)
4 UIKitCore 0x1b9617a9c -[UIDocument writeContents:andAttributes:safelyToURL:forSaveOperation:error:] + 492 (UIDocument.m:1286)
5 UIKitCore 0x1b9619264 __59-[UIDocument saveToURL:forSaveOperation:completionHandler:]_block_invoke_3 + 224 (UIDocument.m:1490)
6 UIKitCore 0x1b96190cc __59-[UIDocument saveToURL:forSaveOperation:completionHandler:]_block_invoke_2 + 380 (UIDocument.m:1524)
7 UIKitCore 0x1b961865c __59-[UIDocument _coordinateWritingItemAtURL:error:byAccessor:]_block_invoke.623 + 184 (UIDocument.m:1407)
8 Foundation 0x1b803cf98 -[NSFileCoordinator _invokeAccessor:thenCompletionHandler:] + 100 (NSFileCoordinator.m:430)
9 Foundation 0x1b8083774 __73-[NSFileCoordinator coordinateWritingItemAtURL:options:error:byAccessor:]_block_invoke + 132 (NSFileCoordinator.m:473)
10 Foundation 0x1b8194e30 __85-[NSFileCoordinator(NSPrivate) _coordinateWritingItemAtURL:options:error:byAccessor:]_block_invoke.350 + 264 (NSFileCoordinator.m:1083)
11 Foundation 0x1b8073538 -[NSFileCoordinator(NSPrivate) _withAccessArbiter:invokeAccessor:orDont:andRelinquishAccessClaim:] + 620 (NSFileCoordinator.m:960)
12 Foundation 0x1b80866c0 -[NSFileCoordinator(NSPrivate) _coordinateWritingItemAtURL:options:error:byAccessor:] + 784 (NSFileCoordinator.m:1080)
13 Foundation 0x1b7fa0710 -[NSFileCoordinator coordinateWritingItemAtURL:options:error:byAccessor:] + 120 (NSFileCoordinator.m:472)
14 UIKitCore 0x1b9618288 -[UIDocument _coordinateWritingItemAtURL:error:byAccessor:] + 472 (UIDocument.m:1404)
15 UIKitCore 0x1b9618cd8 __59-[UIDocument saveToURL:forSaveOperation:completionHandler:]_block_invoke + 336 (UIDocument.m:1476)
16 libdispatch.dylib 0x1b649de68 _dispatch_call_block_and_release + 32 (init.c:1517)
17 libdispatch.dylib 0x1b649fa2c _dispatch_client_callout + 20 (object.m:560)
18 libdispatch.dylib 0x1b64a7124 _dispatch_lane_serial_drain + 668 (inline_internal.h:2622)
19 libdispatch.dylib 0x1b64a7c80 _dispatch_lane_invoke + 392 (queue.c:3944)
20 libdispatch.dylib 0x1b64b2500 _dispatch_workloop_worker_thread + 648 (queue.c:6732)
21 libsystem_pthread.dylib 0x2278420bc _pthread_wqthread + 288 (pthread.c:2599)
22 libsystem_pthread.dylib 0x227841e5c start_wqthread + 8 (:-1)
hi, community, I am using qt framework and faced with internal issue on macOS 14.0, haven't found any similar reports, maybe already known issue
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Test [99529]
Path: /Applications/Test.app/Contents/MacOS/Test
Identifier: com.test.osx
Version: 0.0.1 (00000)
Code Type: ARM-64 (Translated)
Parent Process: launchd [1]
User ID: 507
Date/Time: 2023-07-21 10:37:25.1947 +0200
OS Version: macOS 14.0 (23A5286i)
Report Version: 12
Anonymous UUID: 191461AA-EC46-D583-CB70-47FA103D8F89
Sleep/Wake UUID: 35433ED4-693B-46C2-9622-99C4FAD6B28F
Time Awake Since Boot: 300000 seconds
Time Since Wake: 3295 seconds
System Integrity Protection: enabled
Crashed Thread: 0 CrBrowserMain Dispatch queue: com.apple.main-thread
Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Termination Reason: Namespace SIGNAL, Code 8 Floating point exception: 8
Terminating Process: exc handler [99529]
Thread 0 Crashed:: CrBrowserMain Dispatch queue: com.apple.main-thread
0 libRosettaRuntime 0x11eb5220c 0x11eb12000 + 262668
1 libsystem_platform.dylib 0x7ff80c666393 _sigtramp + 51
2 TextInputUIMacHelper 0x7ffc0c34f3d2 -[TUINSCursorUIController moveTextInputMenuHUD:] + 258
3 HIToolbox 0x7ff8176055fc TSMMessagePortCallBack + 2779
4 CoreFoundation 0x7ff80c7ad385 __CFMessagePortPerform + 690
5 CoreFoundation 0x7ff80c714c24 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
6 CoreFoundation 0x7ff80c714b5e __CFRunLoopDoSource1 + 530
7 CoreFoundation 0x7ff80c7137e1 __CFRunLoopRun + 2704
8 CoreFoundation 0x7ff80c712749 CFRunLoopRunSpecific + 557
9 HIToolbox 0x7ff817472aa9 RunCurrentEventLoopInMode + 292
10 HIToolbox 0x7ff8174728b6 ReceiveNextEventCommon + 665
11 HIToolbox 0x7ff817472601 _BlockUntilNextEventMatchingListInModeWithFilter + 66
12 AppKit 0x7ff80fc151b5 _DPSNextEvent + 880
13 AppKit 0x7ff8104edf0f -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1304
14 AppKit 0x7ff80fc06a56 -[NSApplication run] + 603
15 libqcocoa.dylib 0x124849547 QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2631
16 QtCore 0x127b76826 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 486
17 QtCore 0x127b6d617 QCoreApplication::exec() + 119
I'm getting a weird crash from the template VisionOS app (the one that appears upon creating a new VisionOS project). I went and modified the code to use two additional C++ files, one of which throws an exception upon a specific circumstance, and another one that catches and handles the exception.
If I attempt to run the app with the new code, instead of the code catching the exception, I get a SIGABRT signal, as if C++ exceptions were not enabled at project level.
The following gist contains a minimal example with the weird behavior:
https://gist.github.com/Izhido/100a92f45aaf8bacffe73893d6109077
Replace the contents of the template VisionOS project with these files, run the project, and press the "Do sum" button. Xcode 15 beta will report a SIGABRT signal at sumofnumbers_impl.cpp, line 8.
What am I missing here?
(Incidentally, the same code in a MacOS project runs just fine - I can share the project upon request. Also, for some reason I cannot share screenshots or files in this forum - that's why I provided the gist.)
I just updated to Xcode 15 beta 5, and just tried to run my project(macOS). It uses swift data, and it builds fine. When I run it, I get the runtime error:
dyld[89450]: Symbol not found: _$s10Foundation9PredicateVyACyxxQp_QPGqd__AA0B11ExpressionsO8VariableVy_xGxQpXEcAA08StandardB10ExpressionRd__Sb6OutputRtd__lufC
Referenced from: <8C04CB76-2231-349A-965F-16640BD2A139> /Users/my_username/Library/Developer/Xcode/DerivedData/ExternalCubeSpeed-cwevolpyjplwhrcsekahxoypgxuy/Build/Products/Debug/CubeSpeed.app/Contents/MacOS/CubeSpeed
Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
This was not happening with Xcode 15 beta 4.
My Mac is running macOS 14 public beta.
Thanks for any help.
I am making an app that is using swift data, and all builds are fine, but when I run the app, the app is not interactive. This wasn't the case in Xcode 15 beta 4. Any help appreciated.
Thanks.
I just updated my Mac to Xcode 15 beta 5 and macOS 14 beta 4. My Mac app, after changing some SwiftData syntax that it doesn't like anymore, loads but is non-interactive and is not letting me do anything. No runtime errors are in Xcode.
Thanks in advance.
I'm getting this error:
Abnormal number of gesture recognizer dependencies: 700. System performance may be affected. Please investigate reducing gesture recognizers and/or their dependencies.
It's caused by a view that loads a project and queries a favorite model for a project. I use this data to determine which system image to show.
Here's my model:
import Foundation
import SwiftData
@Model
final class FavoriteModel {
@Attribute(.unique) var id: UUID = UUID()
@Attribute var createdDate: Date
@Relationship var project: Project
init(createdDate: Date = .now) {
self.createdDate = createdDate
}
}
Here's the init for my view:
@Query var favorites: [FavoriteModel]
init(project: Project?) {
self.project = project
guard let projectID = project?.id else { return }
let filter = #Predicate<FavoriteModel> {
$0.project.id == projectID
}
_favorites = Query(filter: filter, sort: \FavoriteModel.createdDate)
}
Here's the code that is responsible for the error:
Button {
//favorite
} label: {
if favorites.isEmpty {
Image(systemName: "heart")
} else {
Image(systemName: "heart.fill")
}
}
If I remove "favorite.isEmpty", the error disappears when I press the button. This use to work in Xcode 15 beta 4.
Is anyone else seeing this? It looks like a bug, but there's also probably a better solution.
Thanks,
Any ideas on how to root cause this?
Started since iOS 15.x, affecting only small percentage of users.
Apple crash report attached.
Thanks!
2023-07-25_15-08-32.4590_-0400-444d5ea058bb103160c275742f01d7f130e02661.crash
Hello, one of my users is experiencing this kind of issue:
He taps on my app attached to the Dock.
App icons turns gray, indicating the process is started.
This state with him looking at his iOS homepage with icon grayed out stays for a second or two.
App launches immediately, without displaying the Launch Screen.
iPhone 14 Pro Max
iOS 16.3.1 (video is from this system, but on 16.6 it happened for the same user too)
He claims that the issue happens only when the app was turned off for a longer time (for example a day of inactivity). After this first longer broken launch, next launches works much faster and display launch screen properly.
I was not sure if this deserved posting into Feedback Assistant as a bug, or if it's something I'm not configuring correctly. That's why I'm posting it here first.
After connecting an Xbox One wireless controller (the basic, black version) to the VisionOS simulator (beta 2), running a sample project I created to read the controller's input, I noticed that the following buttons do not seem to be recognized by it:
Home button
Options button
Thumbstick left button
Thumbstick right button
All other input seems to work just fine. Am I missing something I need to configure, specific to VisionOS, to make these buttons generate input in the app?
Needless to say, the missing buttons are actually recognized in another sample app I created, this time for MacOS using SwiftUI, and with virtually the same code files.
The gist for the VisionOS app is here: https://gist.github.com/Izhido/6baa69fb72540b0f0bffa2f8c991c0ed
Replace the contents of the template VisionOS project with the files in the gist.
Include GameController.framework in "Build Phases"-"Link Binary with Libraries".
Add "Supports Controller User Interaction", "Supported game controller types" with "ProfileName" = "ExtendedGamepad" in "Info" in the project.
Run the modified project in Xcode.
Ensure that the "I/O"-"Input"-"Send Game Controller to Device" option is turned on in the simulator.
Press the "Log game controller" button in the presented window.
Monitor the messages in the Console in Xcode as you press the buttons.
You will notice there is nothing logged for the buttons above mentioned, while all other inputs are correctly logged.
Also, if needed, the MacOS project that works correctly can be provided upon request.
So I have been trying to add a widget to my app. I am trying to add SwiftData to sync data from my app to the widget. My attempt at doing that is shown below:
import SwiftData
import SwiftUI
import WidgetKit
@main
struct CubeSpeedWidgetBundle: WidgetBundle {
let fullSchema = Schema([Time.self, Session.self])
let configuration = ModelConfiguration(schema: Schema([Time.self, Session.self]), inMemory: false, readOnly: false, cloudKitDatabase: .automatic)
var body: some Widget {
CubeSpeedWidget()
.modelContainer(try! ModelContainer(for: fullSchema, configurations: [configuration]))
CubeSpeedWidgetLiveActivity()
}
}
Xcode says that "Value of type 'CubeSpeedWidget' has no member 'modelContainer'". How should I do this properly?
Thanks.
Hello,
I'm currently having a lot of bugs that I don't find solutions for. I have 11 bugs of the type: Could not build module '...' .
Here are some examples:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/Accessibility.framework/Headers/AXFoundation.h:8:9 Could not build module 'CoreGraphics'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h:18:10 Could not build module 'CoreFoundation'
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS16.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:10 Could not build module 'Dispatch'
Here is everything I did to try to solve the problem:
delete the pods and reinstall them
uninstall and downloaded again XCode
clean the build folder and the simulator
restart my computer
create a new XCode project
Nothing worked...
Do you have an idea on how to solve these?
Thank you very much!
I'm assuming it's possible to stream the device log to a file, any clues?
I'm trying to debug an app installation issue I am having with iOS 17, and hunting through the Console log is just super noisy. I want to just attach the log so I can hand it over to my developers on the team, but I don't seem to be seeing a way to save the Console log I am looking at in Xcode. Basically I'm looking for the equivalent of an adb shell logcat +pipe to storage that Is not that hard to do on an Android. By any means possible? I've not even tried using LLDB, will it let me do this, if so any clues where to start?
Is there a way to catch the crashes from both swift and obj-c without using any 3rd party libraries?
I want a way to note that my app has crashed, no stack trace needed just want some count of crashes stored to user defaults.
I saw NSSetUncaughtExceptionHandler being used but it is only catching obj-c related errors.
eg. force unwrapping nil is not caught here.
I want a universal way of catching the crashes. also want to know if this can affect the crash reporting by 3rd party libraries
Hello, I have been facing a crash happening from iOS 16 onwards. Crash counts have been consistent since iOS 16.0, and I have not been able to figure out the cause. It's most likely a memory leak, and it seems to be due to a bug on Apple's end since there are others facing the same issue from this post: https://developer.apple.com/forums/thread/722734
I have used Instruments but can't draw any conclusions from there. Does anyone have any idea on how we can reduce the crash occurrences from our code? Here is the stack trace:
Crashed: com.apple.main-thread
0 libobjc.A.dylib 0x3a7c objc_retain + 16
1 libobjc.A.dylib 0x3a7c objc_retain_x0 + 16
2 UIKitCore 0xbe7940 -[UIKeyboardTaskQueue promoteDeferredTaskIfIdle] + 76
3 UIKitCore 0xbe78cc -[UIKeyboardTaskQueue performDeferredTaskIfIdle] + 32
4 UIKitCore 0x3cd8d8 -[UIKeyboardTaskQueue continueExecutionOnMainThread] + 376
5 Foundation 0x3b7ac __NSThreadPerformPerform + 264
6 CoreFoundation 0xd3128 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 28
7 CoreFoundation 0xdf7b4 __CFRunLoopDoSource0 + 176
8 CoreFoundation 0x645e8 __CFRunLoopDoSources0 + 244
9 CoreFoundation 0x7a0d4 __CFRunLoopRun + 828
10 CoreFoundation 0x7f3ec CFRunLoopRunSpecific + 612
11 GraphicsServices 0x135c GSEventRunModal + 164
12 UIKitCore 0x39d6e8 -[UIApplication _run] + 888
13 UIKitCore 0x39d34c UIApplicationMain + 340
14 0x21738 main + 43 (main.m:43)
15 ??? 0x1c2d4adec (Missing)
In SwiftData, the latest betas are not allowing me to use predicates such as num < 3000 because it causes a memory leak that crashes the app. This is really weird and if anybody has found a workaround please tell me.
Thanks.
Hi,
We are getting a lot of these crashes in our app. Not really pointing to any screen, hard to figure out where the problem is!
Please help with some pointers to figure out and solve this issue. Its happening in PROD and affecting mostly iOS 16 users.
Complete stacktrace is attached.
Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x92d1c __exceptionPreprocess
1 libobjc.A.dylib 0x14ee4 objc_exception_throw
2 CoreFoundation 0xe5f08 __CFDictionaryCreateGeneric
3 UIFoundation 0x1c090 -[NSCountableTextLocation compare:]
4 UIKitCore 0x208b0 -[_UIModernTextLayoutController comparePosition:toPosition:]
5 UIKitCore 0x2080c -[UITextInputController comparePosition:toPosition:]
6 UIKitCore 0x2044c -[UIFieldEditor comparePosition:toPosition:]
7 UIKitCore 0x203b8 -[UITextField comparePosition:toPosition:]
8 UIKitCore 0x10728f4 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) scheduleChineseTransliteration]
9 UIKitCore 0x10a9b88 -[UITextField _transliterateChinese:]
10 UIKitCore 0xdbd47c +[UIPasteboard _performAsDataOwnerForAction:responder:block:]
11 UIKitCore 0xad1fb8 -[UICalloutBar buttonPressed:]
12 UIKitCore 0xad0bc8 -[UICalloutBarButton fadeAndSendActionWithAuthenticationMessage:]
13 Foundation 0x34b40 __NSFireDelayedPerform
14 CoreFoundation 0xa7268 CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
15 CoreFoundation 0x30b08 __CFRunLoopDoTimer
16 CoreFoundation 0x2b6c0 __CFRunLoopDoTimers
17 CoreFoundation 0xb3b4 __CFRunLoopRun
18 CoreFoundation 0x1e250 CFRunLoopRunSpecific
19 GraphicsServices 0x1988 GSEventRunModal
20 UIKitCore 0x4e5a94 -[UIApplication _run]
21 UIKitCore 0x27efd4 UIApplicationMain
22 EssoProd 0x2b08c main + 15 (AppDelegate.swift:15)
23 ??? 0x1054b44d0 (Missing)
stacktrace copy.txt
Facing crashes with a deamon that I'm working with has info.plist embedded within it. It also has CFBundleVersion, CFBundleShortVersionString properties with the appropriate values. But somehow the macOS is not picking up the version while generating crash reports.
Crash reports just shows ??? in the version field.
Here is info plist within the binary,
I'm using macOS Monterey 12.2.1