instruments

Using heap shot analysis shows memory addresses, but not lines of code. How do I determine what is causing the heap to grow?

时间秒杀一切 提交于 2019-12-19 04:22:46
问题 I'm nearly finished with my app and I'm using Instruments to optimize performance before I submit to the app store. I noticed that whenever I execute a particular action (updating the information in my app from an external server) my heap grows by about 350 KB. The research I found here on stackoverflow and Apple's documentation suggests executing Heap shots to find the offending code. However, instead of taking me to the offending code it shows me memory addresses. Is there a way to use this

iPhone: OpenAL & AudioToolbox leak

自古美人都是妖i 提交于 2019-12-19 02:57:47
问题 I work with OpenAL to play sounds in my app. When I test it using Instruments tool, it finds a leak: LeakedObject = GeneralBlock-512 Size = 512 Bytes Responsible Library = AudioToolbox Responsible Frame = AU3DMixerEmbeddedInputElement::Initialize() Stack trace: 0 libSystem.B.dylib malloc 1 libstdc++.6.dylib operator new(unsigned long) 2 libstdc++.6.dylib operator new[](unsigned long) 3 AudioToolbox AU3DMixerEmbeddedInputElement::Initialize() 4 AudioToolbox AU3DMixerEmbedded::SetProperty

GeneralBlock-56 memory leak when calling loadRequest in UIWebView

荒凉一梦 提交于 2019-12-18 17:26:06
问题 I'm working on an IPad app and have been profiling it using Instruments in XCode 4. I'm profiling on the actual device itself. iOS 4.3 is installed. Instruments tells me I have some memory leaks, the leaked objects being mainly GeneralBlock-56 ones and some GeneralBlock-1024 / GeneralBlock-8192 ones. The interesting thing is that these leaks are reported only when I load up a URL in a UIWebView embedded in my app. If I comment out the loadRequest call, these leaks go away. This behavior is

Why does my version of filter perform so differently than Swifts?

佐手、 提交于 2019-12-18 15:35:28
问题 As an exercise I've rewritten a few of Swift's higher order functions, one being .filter . I decided to measure my version of .filter against Swift's using instruments and I'm rather confused about the results. Here's what my version of filter looks like, which I admit may be incorrect. extension Array { func myFilter(predicate: Element -> Bool) -> [Element] { var filteredArray = [Element]() for x in self where predicate(x) { filteredArray.append(x) } return filteredArray } } What Happened My

How to find out what mach_msg_trap waits for?

房东的猫 提交于 2019-12-18 11:11:24
问题 I a profiling my iPhone application on target, and according to Instruments 65% of the time is spent in mach_msg_trap . I have a background thread that runs-forever and send results back to the main thread using performSelectorOnMainThread:withObject:waitUntilDone: , aproximately every 2 seconds. I am not waiting until done. 回答1: Turn out my app is not actually spending 65% of it's time in the mach_msg_trap function. It was a configuration error in Instruments on my part. The Sampler tool

setNeedsDisplay, drawRect or CALayer causing dispatch_continuation_alloc_from_heap malloc memory leak iOS

百般思念 提交于 2019-12-18 05:09:10
问题 I'm experiencing a memory leak in my application and it seems to originate from CALayer. It looks as though it only affects old iPads; I see the problem with iPad 1 & 2, but iPad Air is ok. I have a crash report from an iPad 1 showing that my app was 'jettisoned' due to insufficient memory, this leak is my main suspect. Background During operation setNeedsDisplay is continuously called every 40ms by the network thread on various UIViews to update their visuals, see function below. - (void

Tracking down zombies with Xcode 5 on ios6

橙三吉。 提交于 2019-12-18 04:37:09
问题 I have a zombie object somewhere in my code when it is run on iOS 6.1 but not in 7. Unfortunately instruments will not run with zombies it pops up the following warning. "Zombies can only be run on devices with iOS 7 or later". I don't really want to download an older version of Xcode as works internet is painfully slow. What are some tips/tricks for hunting down the cause of this zombie as my normal goto approach is unavailable. Any help would be greatly appreciated. 回答1: From the menu bar,

Symbol not found: _CFXMLNodeGetInfoPtr when start Instruments

我怕爱的太早我们不能终老 提交于 2019-12-18 04:35:06
问题 I am developing a iPhone app and everything works fine so far. I can build and start the app in the simulator. But when I now start the app with Instruments I got the error: Dyld Error Message: Symbol not found: _CFXMLNodeGetInfoPtr Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Expected in: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation I've

Running UIAutomation scripts from Xcode

风流意气都作罢 提交于 2019-12-17 22:47:08
问题 Did anyone succeed in setting up automated UIAutomation tests in Xcode? I'm trying to set up a target in my Xcode project that should run all the UIAutomation scripts I prepared. Currently, the only Build Phase of this target is this Run Script block: TEMPLATE="/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate" MY_APP="/Users/Me/Library/Application Support/iPhone Simulator/6.0/Applications

Bug with starting Instruments via Profile under Xcode 4.1 Build 4B110

一世执手 提交于 2019-12-17 21:55:47
问题 Important Update Strange bug is fixed (at least for me) in Xcode 4.2! I've a severe problem with Xcode 4.1 Build 4B110 under Mac OS X Lion and running Instruments via Xcode. The problem is that Instrument freezes in partly if I start it via Xcode. So if I start a project in Xcode 4.1 and open "Profile" the Instruments UI appears. The timer starts running, but the instruments app doesn't track anything and the more severe problem: The program seems to be running but does not react on any