Post not yet marked as solved
My watchOS app crashes when I accept/change the microphone or Bluetooth permission from its companion iOS app. It crashes with the following message in the console.
Message from debugger: Terminated due to signal 9
Please let me know a way to identify and fix the exact problem.
here are my device logs:
Device logs and crash report
Post not yet marked as solved
My iphone is iPhone 13 Mini.
iOS version is iOS 15.1.
Instruments version is 13.4 (13F17a).
I can get thermal state with iOS 14, but it's only unknown thermal state with iOS 15.
Is it not supported to get thermal state in Instruments under iOS 15?
Post not yet marked as solved
Hi, I'm a new owner of Apple laptop since I always using PC. I'm an experienced perf user but now I'm happy having my MBP2021 laptop so I need to learn new tools. I found that xctrace is the new way to capture profiles on Apple devices so I've installed one and ran on my app. Unfortunately, I didn't manage to make it work. Here is my script:
❯ xctrace record --template 'CPU Counters' --launch -- ./target/release/deps/flower-b0a05df673ad26db tests::test_run
Starting recording with the CPU Counters template. Launching process: flower-b0a05df673ad26db.
Ctrl-C to stop the recording
Target app exited, ending recording...
Recording completed. Saving output file...
Output file saved as: Launch_flower-b0a05df673ad26db_2022-05-09_21.02.47_4E6DC3F7.trace.
❯ xctrace import --template 'CPU Counters' --input Launch_flower-b0a05df673ad26db_2022-05-09_21.02.47_4E6DC3F7.trace
Import failed with error: Cannot find matching importer for url: Launch_flower-b0a05df673ad26db_2022-05-09_21.02.47_4E6DC3F7.trace/ -- file:///Users/pzixel/Documents/Repos/flower/
I tried to find any information about to how to make it work but failed. I hope I can find some support here.
Post not yet marked as solved
When I try to Time-Profiling Third party app(Example: Facebook) using Instruments, I got this error below,
"Permission to debug com.facebook.Facebook was denied. The app must be signed with a development identity (e.g. iOS Developer)."
Is there is any workaround to Time-Profile/monitor third party app like facebook using instrument or any other tool?
Thanks in advance.
Post not yet marked as solved
I use the Time Profiler in Instruments 13.3.1.
I follow the instructions of this video: developer.apple.com/wwdc19/411
At 15:34 minutes it shows the count at a code line.
For me this line does not show such a count in the highlighted line.
When i double click a line of my code in the Heaviest Stack Trace it shows my code and highlights the line of code in green but does not show the percentage. Switching to View as Value does not show a count for the line of code too.
Is this a bug or did i miss something to configure?
Post not yet marked as solved
My unity game is getting very hot quickly, So I use XCode Energy Impact to test the energy use for it on iPhone8.
In Debugging Gauges, Click Energy impact, I can get the following data: CPU for 45%, Network for 10%, Overhead for 45%, Location for 0%, GPU for 0%.
Location is OK because I don't use it. But Why GPU is 0%?
Click FPS, My game run for FPS 60. CPU cost 16.6ms, GPU cost 5.2ms. I want to compare the energy consumption of CPU and GPU, but 0% for GPU is obvious wrong, how to fix it and get correct data?
And, I can't find Energy Log or Energy diagnostics in Instruments, How can I find and use it?
Post not yet marked as solved
When using Time Profiler for finding the time needed for each method(executed) in iOS App. Some written(not system) method couldn’t appear in Call tree. (Please Note: Some of written methods appeared and some method don't)
Anything need to add/do in Instrument or filter for finding those missing methods in call tree.
Or is there any criteria for some methods not appearing in the call tree, Specially ViewController life cycle method or if less work done in some method.
viewDidLoad() sometimes found and sometimes not. viewWillAppear(), viewDidAppear(), viewWillDisappear(), viewDidDisappear() couldn't find any time.
Please clarify the issue. Thanks in advance.
Post not yet marked as solved
Hi
I am developing an iPhone app which is somewhat numerically intensive. I'd like to save "telemetry"/debug data to memory and then be able to retrieve that data. Data will most likely be in form of a .csv file. Some have recommended NSLog. I am tempted to use fwrite() calls but don't know how to retrieve the generated file. I have searched the web for this info and have not found relevant info. Thanks.
Post not yet marked as solved
The same graphics program runs in the webview, and the iPhone 12Pro has 15+% more GPU usage than the iPhone 11Pro. In theory, the performance of the A14 should be stronger than that of the A13. Is it possible to increase the GPU overhead by 15+% just because there are more 45x96 pixels? The fragment profiling in XCode Instrument, please see the screenshot.
When trying to profile any process with the Instruments CPU Profiler I get this message:
(Before run started) No allocated PMI record.
Not sure what to do here. I tried other instruments like time profile and that works fine so not sure what to do here... Didn't find any people having similar issues when googling so I'm hoping someone here can help me out.
Im using a m1 max 14 inch macbook pro with macOS 12.3 and instruments 13.0 (13A1030d)
My little network extension is running out of file descriptors. My suspicion is that something in the Security framework is not being deallocated, although even this doesn't make a great deal of sense:
The extension looks at each flow, and gets a SecStaticCodeRef for it, finds the pathname, makes a decision, and stores the result of that decision in an NSCache<NSData, NSNumber> where the key is flow.metaData.sourceAppUniqueIdentifier. This goes through a couple layers of abstractions (the cache is in one Swift class, and it calls another Swift class that gets the security info and then returns the pathname, or throws an error).
As an example, after running for a couple of days, it has 1074 open file descriptors for /System/Library/PrivateFrameworks/CloudKitDaemon.framework/Support/cloudd -- and only had 732 three hours ago.
Post not yet marked as solved
When scrolling a collection view, it looks like all supplementary views (even those that currently not appear) are invalidated. If there is a large number of supplementary views (section headers in my case) this significantly affects scrolling performance.
Can I instruct the collection view to invalidate only the visible supplementary header views (rather than all of them) when user scrolls the view?
Here is the code I use to create the collection view (tableview-like layout) in my custom UICollectionViewController class:
// Create list layout configuration
UICollectionLayoutListConfiguration *config = [[UICollectionLayoutListConfiguration alloc] initWithAppearance:UICollectionLayoutListAppearancePlain];
config.headerMode = UICollectionLayoutListHeaderModeSupplementary;
// Create compositional layout based on configuration and assign to collection view
UICollectionViewCompositionalLayout *layout = [UICollectionViewCompositionalLayout layoutWithListConfiguration:config];
self.collectionView.collectionViewLayout = layout;
Post not yet marked as solved
Hi,
I was trying to use Instruments on a executable Swift Package I am working on but I keep getting this error.
"Required kernel recording resources are in use by another document."
What document?
I also can't profile Swift NIO's NIOHTTP1Server or a fresh iOS project using File > New > Project > Multiplatform App
I was getting this error before revoking the current certificate in keychain and setting up a new one.
“Failed to gain authorization”
https://developer.apple.com/forums/thread/681687
Xcode/Instruments 13.3 (13E113)
Thanks in advance for any help.
Post not yet marked as solved
We've been trying to deal with this issue for weeks now.
We suspect might be something related with sendbird and we are also in contact with sendBird team but getting nowhere.
Sometimes, when starting our app after the login our app just freezes and becomes unresponsive, sometimes even causing a crash.
We are having some trouble finding out what is causing it.
Today I was able to replicate the issue using an iPhone 7 simulator with ios 15.4 and I was able to debug a little.
The debug view hierarchy is also unresponsive and suggests to try and use time profile, which I did.
I also use Thread safe
But I couldnt actual make much sense of the results. So I was hoping you could help me with it.
Hopefully, you can provide some light on this issue.
Thanks
Post not yet marked as solved
When there is a large number of supplementary views, scrolling is extremely slow.
To reproduce:
Download Apple's demo of "Implementing Modern Collection Views" from here
Open project in Xcode and show PinnedSectionHeaderFooterViewController.swift
Go to line 106 and replace it with let sections = Array(0..<3000)
Run project, navigate to "Pinned Section Headers" page, and try scrolling.
Scrolling is barely possible and extremely slow!
While profiling with Time instrument, issue seems to rely in invalidating supplementary views. Screenshot attached below.
How can I fix this? (I have many section headers in my view)
Post not yet marked as solved
When I try to use instruments most of the time I can't identify the threads. I'm assuming these are "internal" threads?
One of the threads was causing the CPU to go up to 100% usage. I didn't change anything in the code, how do I identify what is causing these issues.
I have an App,use Metal-api, it worked well at Xcode12, but when I upgrade Xcode13.0,things changed, it always crash at newFunctionWithName.
How do I get my metal library:
My app is multiple-render-backend, so my shader is .glsl, use glslangValidator turn it to .metal
get metallib,refrence : Building a Library with Metal's Command-Line Tools,
use dispatch_data_create to load metallib, and call newLibraryWithData to get MTLLibrary, then call newFunctionWithNameto get MTLFunction , crash here.
Because it's my company's code,so SORRY, I can't share the code or screenshot.
The same code, worked on Xcode11 and Xcode12,but crash at Xcode13.0 when use Xcode to debug.
Xcode13.0: crash at debug, but successfully run on independent or in Xcode-Instrument.
I have no clue, what should I do to solve this problem on Xcode13.0, or it's the bug on Xcode13.0? @Apple
ps: (that problem above occurred on x86_64-mac,macOS 11.5)
Hi @eskimo and experts,
I created a simple code and found there is a memory leak:
#import <Foundation/Foundation.h>
#include <functional>
void testLeaks(const std::function <void (int)>& inCallback) {
NSTask* task = [[NSTask alloc] init];
[task setTerminationHandler:^(NSTask* inTask) {
inCallback(inTask.terminationStatus);
}];
[task release];
}
int main(int argc, const char * argv[]) {
auto callback = [](int result) {
NSLog(@"callback");
};
testLeaks(callback);
NSLog(@"done");
return 0;
}
The output of leaks:
Process: testLeaks2 [13084]
Path: /Users/USER/Library/Developer/Xcode/DerivedData/Build/Products/Debug/testLeaks2
Load Address: 0x10a04d000
Identifier: testLeaks2
Version: ???
Code Type: X86-64
Platform: macOS
Parent Process: leaks [13083]
Date/Time: 2022-02-28 23:34:28.374 +0800
Launch Time: 2022-02-28 23:34:27.939 +0800
OS Version: Mac OS X 10.15.6 (19G73)
Report Version: 7
Analysis Tool: /Applications/Xcode.app/Contents/Developer/usr/bin/leaks
Analysis Tool Version: Xcode 12.4 (12D4e)
----
leaks Report Version: 4.0
Process 13084: 596 nodes malloced for 59 KB
Process 13084: 1 leak for 48 total leaked bytes.
1 (48 bytes) ROOT LEAK: <__NSMallocBlock__ 0x7fbbc2704350> [48] testLeaks2 invocation function for block in testLeaks(std::__1::function<void (int)> const&) 0..."
Looks the issue is in the block of setTerminationHandler. How do I address this memory leak issue if I want to keep using std::function as a callback?
Post not yet marked as solved
Hello
How to get (ANS)- Autonomic nervous system data from apple watch?
THX
Post not yet marked as solved
Hello dear kindly I need your support about this problem since I update my iOS 15.3.1 every time I have a call and get waiting I can’t close this sound beep beep beep beep beep only solution to end this sound press on lock bottom so both of call will end or I can reject and answer second call or I can reject only or I can answer and hold
So please I need solution for this problem