Xcode 6 Memory Leaks Instrument doesn't work - xcode

I am trying to use Instruments to find leaks within my app. I do it in the same way as I did before updating to Xcode 6.x. Since updating, it won't take any snapshots: the leaks instrument status displays "Analyzing process" and will never change.
Both Xcode 6.0.1 and 6.1 GM 2 exhibit this problem.
Any workaround?

Seems like is a bug on iOS8 and not on Xcode. I have Xcode6.1 and the memory leak profiler seems to work on iOS7.
As a workaround until Apple fix this (already reported the bug and was marked as duplicate) you can profile your memory leaks using a simulator.

This issue seems to occur only on my iOS 8.x devices.
I also submitted a bug report but in the meantime I have it working with the following configuration :
Xcode 6.1
iPhone 4 with iOS 6.1.3
This is still a workaround though as you can hardly debug any iOS 8 related feature and analyzing leaks on an old device like that is a real pain.

Related

Run debugging on device cause Xcode 6.0.1 to crash

Yesterday i updated to the latest version of Xcode, since the update i experience a very strange glitch:
When i try to run the app on a device the Xcode start with the process and say "finish run the app on iPhone" and then the Xcode crashes.
what could cause this problem?
before the update everything worked perfect.
I was seeing this same issue and even trying to view the device from Window -> Devices would cause Xcode to crash. I updated the device to the latest version of iOS (8.0.2) and that seems to have fixed the problem (for this afternoon at least).

missing iphone 3.2 simulator support

I have just allegedly downloaded iOS 3.2 simulator support.:
However, I do not see 3.X in my Simulator Hardware->Version menu:
Looking in /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs, sure enough I only see the 4.3 and 5.0 sdk files.
Any ideas as to why I am not seeing 3.2 simulator support whilst Xcode thinks that I should have this support?
(and/or of course, ideas about how to correct this situation)
thanks,
The list you're seeing is the Device Debugging Support list which means the ability to debug a physical device (iPhone, iPod Touch, iPad) of a certain iOS generation. These are not the iOS versions available to the simulator. There is no official way to add a simulator for 3.x to Xcode 4. You would have to install on old Xcode version to get the accompanying simulator.

XCode 3.2.6 hangs up

My Xcode 3.2.6 is hanging up constantly.
While I'm coding with no apparent reason it starts consuming more and more CPU, CPU temperature rises up to 80 celsius, the fan get exhausted and I'm forced to "force-quit" it and relaunch it to be able to continue working...
It start happening this week and nobody else on my project is having the same troubles.
My OS is Snow leopard 10.6.8
Any ideas on what could be happening?
I had the same exact issue with my Xcode 3.2.6 project... Would start out using one core and if I let it sit, would use all 8 cores of my i7 MBP. Very frustrating having to restart Xcode every 5 minutes.
My issue actually was resolved when I removed an iPhone from the Organizer that was running iOS 5.0.1. Xcode was trying to get information from the iPhone, and wasn't able to, since the iOS SDK requires Xcode 4.x
I also removed all the user settings from within the project's *.xcodeproj package as well; not sure if that had additional effect. removing those without removing the iPhone had no effect, though.
Have you tried doing a "clean" on the target? Have you tried checking your disk with Disk Utility?

Location services are not functional in iOS 4.3 simulator running on Mac OS 10.7 with Xcode 4.2

I have built an iOS app that leverages Core Location Framework. I have Xcode 4.2 installed and Lion and now Location services are not functional.
Anyone know if there is a patch or workaround for this? I basically stuck and can't test my app on the simulator.
The updated location services in the iOS Simulator are not available to the general public as of yet. If you have access to the iOS Developer Program, you can download the latest beta of XCode, 4.2, and test that way.
As a warning, the beta is just that, a beta. You may end up with more testing issues that are completely unrelated to your location services.
Best case scenario is 2 machines, one for each. That isn't always feasible, so you'll have to decide which is more important. Good luck.
Testing on the device would definitely be a good work around. You will want to test on a real device to check Xcode 4.2 is still in Beta, so this might be a bug in this latest version. According to the documentation it is supposed give you the latitude and longitude of the Apple headquarters as a default.
iOS Simulator notes

XCode 3.2.4 iOS 4.1 (Final) and CoreData Crashes in Simulator

I've got 2 applications using Core Data with a sqlite persistent store. I've got a data loader routine that I run to populate the CoreData DB from csv files. During development, when my data changes I run the routine from the simulator to generate new databases and copy the new one into the project.
This has been working quite well for XCode 3.2.3 and iOS 4.0. It even works in the XCode 4 Preview 2 and 3. I just installed the final version of XCode 3.2.4 and iOS 4.1. Now my db loader fails. It gives me no message, no warning, no nothing. It just dumps out to the spring board and XCode gives me the "Debugging Terminated" message. It will fail at different times during the load so I'm pretty sure it's not a data issue. I'm not doing any threading. I assume the issue has to do with either Core Data or sqlite, since that's when the crash occurs, but with no info reported I can't tell for sure.
I uninstalled everything. Xcode 3.2.4, Xcode 4 preview (assuming it was an issue caused by XCode 4) and reinstalled XCode 3.2.3/iOS 4.0. Things returned to normal. After getting some work done I attempted to upgrade to 3.2.4/iOS 4.1 again. I uninstalled 3.2.3/iOS 4.0, rebooted. Installed 3.2.4/iOS 4.1, rebooted and tried again. No luck. Same hard crash. Same lack of messaging as to the cause.
I have determined that this only happens with the Simulator with XCode 3.2.4, the device is fine as is XCode 4 and 3.2.3. I've tried playing with the target OS selection (3.0,3.1,4.0,4.1). I've tired adjusting the Compiler from GCC 4.0, GCC 4.2,LLVM GCC 4.2, LLVM 1.5. I've tried setting the Base SDK to iOS Simulator 4.1. Interestingly enough it will work in the iPad simulator when using the 3.2 SDK. So I've at least go that as a work around.
I guess there is one of 3 issues:
An issue with my code that has been uncovered by 3.2.4.
Bug in 3.2.4.
A configuration issue that I've missed.
If anybody has any troubleshooting ideas or answers I'd love to hear them. I've been doing iOS full time since V 2.1 and I am seriously stumped.
Thanks in advance,
I figured out my issue. It looks like the CoreData/Sqlite connection was a total red herring. Following a tip I read on SO, I used OSX's Console application and got a critical message "Failed to launch in time" that was not being displayed in XCode's debugger console.
It looks like the process was being killed due to what is essentially a timeout error. The iPhone will kill an application that takes too long to complete "didFinishLaunching." That's where I was kicking the data load routine off from. The new version of XCode must have adjusted it's timeout values.
So my takeaway is give OSX's console a shot if XCode isn't telling you everything and watch out for those red herrings.
When I upgraded I ran into troubles in the simulator when saving the managedObjectContext. I finally deleted my sqlite CoreData store file and have not run into similar problems. Try deleting your data file (well save a copy of it before deleting to see what is different).

Resources