Post not yet marked as solved
filter By ratings Like 1 star or 2 stars or 3 stars.
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)
Post not yet marked as solved
"xcrun xctrace record --device " commands starts recording info through instruments and store it in a file
but sometimes it run properly and sometimes says following
"Waiting for device to boot"
I have also tried xcode 13.1 CLT
Checked on multiples devices
Changed cables as well
Post not yet marked as solved
Is there a way to launch deferred recording mode using CLI xctrace record?
Thanks in advance,
Post not yet marked as solved
I have seen that I can export table data from traces containing Allocations, Leaks, and VM Tracker instruments using xctrace export on the command line in XCode 13 release notes. But I still cannot see the table data when I use xctrace export --input ***.trace --toc. How can I export given .trace using supplied query to the XML file format that can be later read and post-processed
Post not yet marked as solved
Hello,
I'am trying to analyse a hang with our App and asked the customer to do a ktrace artrace ("sudo ktrace artrace") on his system. The problem is that the macOS symbols are missing when I open the trace with Instruments on my system. the customer is running macOS 11.6.1, I'am running macOS 12.0.1.
I asked the customer to do a
sudo ktrace symbolicate
but that does not help.
This is a very important workflow for me to analyse sluggishness and hangs on systems, any help is welcome! :-)
Post not yet marked as solved
I can use Xcode 13.1 to install/run my tvOS App on an Apple TV Device (with tvOS 15.1.1) (i.e. Xcode has paired with my Apple TV wirelessly), but the instrument tool (13.0) can't detect my Apple TV and only shows my Mac and my iPhone (which is connected via cable). Anyone has any idea whether wireless instrumentation is supported or not? If not supported, any alternative hack? Thx ahead.
Post not yet marked as solved
In the App we saw a 4 seconds loading time while launching the App. Sometimes this time up to 8 seconds but the average time is 4 seconds. What could be the reason?
In the AppDelegate there isn't server calls.
The breakpoint inside the AppDelegate function didFinishLaunchingWithOptions is taking 4 seconds to get in.
I have some api calls but they are launched after the breakpoint in the AppDelegate.
The Api calls responses are working faster.
In Instruments I have some blocked time, is it normal?
Is something wrong in the log?
Hi all,
I've collected a trace in order to understand deeper a problem that occurs in my application.
After completing the trace I've noticed few flags above the timeline (see attachment).
Are you able to tell me the meaning of those flags? What are the events they are related to?
Thank you very much,
Lorenzo
Post not yet marked as solved
Hi all,
I'm facing a strange timeout problem in my application. I've opened another thread for that [Receiving "The request timed out." when using NSURLSession].(https://developer.apple.com/forums/thread/696762)
Based on Xcode 13 Network Instruments, when a network request receives a timeout, all the subsequent ones receive the timeout too.
Those requests are hitting the same host / domain that works with HTTP/1 (head of line blocking?). Instead, other request that do not involve this domain are working correctly.
I've collected a trace but I cannot understand the meaning of "No Connection" and the red color of the box under inspection.
Are you able to clarify their meaning and when this scenario could happen?
Thanks,
Lorenzo
Post not yet marked as solved
I'm in the process of refactoring a humongous monolithic app with multiple extensions into a setup where we have a service library which is linked to each of the targets.
However, this causes a significant issue when the service library is being referenced from the notification extension, as that extension has a hard memory limit of 12MB on an iPhone 5s, which we are still supporting, and our memory usage is at about 11MB which is way too close for comfort. When the memory usage surpasses the limit, the notification extension is automatically killed by the system.
Profiling with Instruments/Allocations has shown that a significant chunk of that memory is allocated (wasted, really) by the internal AVSecondScreenController.load() class initializer from the AVKit library.
My approach is now to try to figure out what causes AVKit to be loaded in the first palce. I have no explicit imports for AVKit in the notification extension and attempts to figure out what triggers it from the service library failed as well.
I did add a symbolic breakpoint for AVSecondScreenController.load() which is hit, but the backtrace is useless.
Does anyone have any idea how I can pinpoint what causes AVKit to be loaded in the first place?
Thanks!
Post not yet marked as solved
I have a custom Xcode 13.2.1 (13C100) Instrument to which I have recently added os-signpost-point-schema. I notice that the events are marked with a hyphen/dash rather than a ⓢ. See the comparison of the signposts in my custom tool vs the standard “Points of Interest” tool:
I have been digging through the documentation and while I am wagering that there is some simple attribute that can be set to dictate which symbol is included within the signpost circle, but it is not jumping out at me. How does one select the symbol used within custom event points in Instruments?
FWIW, here is my Instrument:
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Instruments Developer Help: https://help.apple.com/instruments/developer/mac/current/ -->
<package>
<id>com.robertmryan.CustomInterval</id>
<version>0.2</version>
<title>Custom Points of Interest</title>
<owner>
<name>Robert Ryan</name>
</owner>
<import-schema>os-signpost</import-schema>
<!-- See https://help.apple.com/instruments/developer/mac/current/#/dev536412616 -->
<os-signpost-point-schema>
<id>custom-point-schema</id>
<title>Points</title>
<owner>
<name>Robert Ryan</name>
</owner>
<purpose>Provide mechanism for multicolored events posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the event, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose>
<note>That message must use that printf-style format, not embedding the values in the format string literal.</note>
<!-- you can constrain this to a particular subsystem if you'd like:
<subsystem>"com.domain.MyApp"</subsystem>
-->
<category>"Interval"</category>
<name>?name</name>
<pattern>
<message>"Label:" ?label ",Concept:" ?concept</message>
</pattern>
<column>
<mnemonic>name</mnemonic>
<title>Name</title>
<type>string</type>
<expression>?name</expression>
</column>
<column>
<mnemonic>label</mnemonic>
<title>Label</title>
<type>string</type>
<expression>?label</expression>
</column>
<column>
<mnemonic>concept</mnemonic>
<title>Concept</title>
<type>event-concept</type>
<expression>?concept</expression>
</column>
</os-signpost-point-schema>
<os-signpost-interval-schema>
<id>custom-interval-schema</id>
<title>Intervals</title>
<owner>
<name>Robert Ryan</name>
</owner>
<purpose>Provide mechanism for multicolored intervals posted by `os_signpost`; The string generated by `os_signpost` must be in form of "Label:%d,Concept:%{public}@", where "Label" is string that will control what text appears in the interval, and "Concept" is one of the strings listed in https://help.apple.com/instruments/developer/mac/current/#/dev66257045 that dictates the color of the interval. No spaces after the commas within this string.</purpose>
<note>That message must use that printf-style format, not embedding the values in the format string literal.</note>
<!-- you can constrain this to a particular subsystem if you'd like:
<subsystem>"com.domain.MyApp"</subsystem>
-->
<category>"Interval"</category>
<name>?name</name>
<start-pattern>
<message>"Label:" ?label ",Concept:" ?concept</message>
</start-pattern>
<column>
<mnemonic>name</mnemonic>
<title>Name</title>
<type>string</type>
<expression>?name</expression>
</column>
<column>
<mnemonic>label</mnemonic>
<title>Label</title>
<type>string</type>
<expression>?label</expression>
</column>
<column>
<mnemonic>concept</mnemonic>
<title>Concept</title>
<type>event-concept</type>
<expression>?concept</expression>
</column>
</os-signpost-interval-schema>
<instrument>
<id>com.robertmryan.CustomInterval.instrument</id>
<title>Custom Points of Interest</title>
<category>Behavior</category>
<purpose>Provide multi-colored intervals as dictated by the "event-concept" parsed from the `start-pattern` string.</purpose>
<icon>Points of Interest</icon>
<limitations></limitations>
<create-table>
<id>custom-interval-table</id>
<schema-ref>custom-interval-schema</schema-ref>
</create-table>
<create-table>
<id>custom-point-table</id>
<schema-ref>custom-point-schema</schema-ref>
</create-table>
<graph>
<title>Custom Interval Graph</title>
<lane>
<title>Points</title>
<table-ref>custom-point-table</table-ref>
<plot-template>
<instance-by>name</instance-by>
<label-format>%s</label-format>
<value-from>name</value-from>
<color-from>concept</color-from>
<label-from>label</label-from>
</plot-template>
</lane>
<lane>
<title>Intervals</title>
<table-ref>custom-interval-table</table-ref>
<plot-template>
<instance-by>name</instance-by>
<label-format>%s</label-format>
<value-from>name</value-from>
<color-from>concept</color-from>
<label-from>label</label-from>
<qualified-by>layout-qualifier</qualified-by>
</plot-template>
</lane>
</graph>
<list>
<title>Custom Regions of Interest</title>
<table-ref>custom-interval-table</table-ref>
<column>name</column>
<column>label</column>
<column>concept</column>
<column>start</column>
<column>duration</column>
</list>
<list>
<title>Custom Points of Interest</title>
<table-ref>custom-point-table</table-ref>
<column>name</column>
<column>label</column>
<column>concept</column>
</list>
</instrument>
</package>
Post not yet marked as solved
I have 3 devices. One is iPhone 7 plus which system version is iOS 14.8. and the others are iOS 15.1, though one is iPhoneX , one is ipad. When I use xcode to run my app, I find out the memory keeps rasing in iOS 15.1. By using instruments, I could see there're a lot autoreleasepoll content(which is growing more and more). But it doen't happen on iOS 14.8.
When I attempt to log network requests with the new "Network" profiling template with "Http Traffic" instrument (Instruments version 13.2.1), I get network connections data on my iphone, but no HTTP traffic data. I'm running with iOS 15.3 on iphone 11, and running macos 12.2
I get the warning that sensitive data will be recorded in the trace, but I never get any actual events posted there. I also don't get any kind of warnings or errors from Instruments telling me why it might have issues recording anything. I get these data from Charles just fine (when I properly setup Charles as a proxy).
From what I read, Instruments HTTP Traffic should "just work", but for me it's not and not telling me why. Is there any way to diagnose why I'm not getting any Http traffic data in my recordings? I've disabled web protection on the phone (Microsoft Defender), which was necessary for Charles to work, but I never needed to install any certificate for instruments (or are there any instructions to do so), so I assume there is a default certificate that is used to encrypt web traffic which instruments can decrypt. I'd really like to use this tool!
Post not yet marked as solved
Xcode13.2.1 How To Resolve Energy Log
Post not yet marked as solved
I would like to retrieve operation lengths of different metal GPU informations in form of xml. I know that exporting is possible using xtrace but how could i export the information of all wire memory statistics for example that are shown in the regarding row inside instruments. It would be helpful to get the xpath something in the GUI of Instruments belongs to. Specifically i am looking at Metal GPU traces.
Any help is much appreciated! —toc gives a list of all contents but no description or affiliation with data in the GUI.
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
Post not yet marked as solved
Hello
How to get (ANS)- Autonomic nervous system data from apple watch?
THX
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
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.