8

So I want use Leaks to find the leaks in my app. In Xcode, I go to "Product" and then hit "Profile". In Instruments I select Leaks and it starts. My app is starting and Leaks is running. But just as soon as my app is finished starting and I can use it, Leaks stops.

Is there anybody else with the same problem or maybe knows how to fix this?

pkoning
  • 387
  • 1
  • 3
  • 12
  • Hm.. It should work fine. Do you still have the problem ? – Legolas Jun 15 '11 at 16:00
  • Yes, but sometimes, like 1 out of 8, it does work. Yet my app launches normally every time. – pkoning Jun 15 '11 at 16:24
  • That's probably a bug that's not your fault. A nasty bug. – Constantino Tsarouhas Jun 24 '11 at 22:04
  • I've been doing a bunch of searching on this and there are various mentions in various places indicating that it's not unique but not very helpful in terms of a fix or workaround. I've replicated it in both XC3.2.6 and XC4.0.2 but I'm not sure if it's only started since I loaded 4.2. I removed 4.2, but you never know what else it changed when it installed that didn't get reverted. – smparkes Jun 24 '11 at 23:29
  • Curious about what devices/sdks you've seen this on. In limited testing, I've only seen it on an iPad 2 running 4.3.3. I haven't seen it on an iPhone 4 running 4.3.3 or an iPad 1 running 4.3.2. – smparkes Jun 25 '11 at 03:09
  • I've tested my app with an iPad 2 (4.3.2), where Leaks stops. I also tested it with an iPad 1 (4.2.1) and it works normally. I haven't tested it on an iPhone though. – pkoning Jun 25 '11 at 21:17
  • i have same problem. have any solution ? my app is okay. but won't start in instrument. – makboney Oct 12 '11 at 06:09

6 Answers6

1

clean project build folder, close XCode IDE and clean MAC Os caches then it should work. if it's an iOS project you have to delete app from simulator/device before re compile it.

DeyaEldeen
  • 10,847
  • 10
  • 42
  • 75
modusCell
  • 13,151
  • 9
  • 53
  • 80
1

I would chose a development profile for all release,debug modes, clean the simulator, clean xcode ,then i would launch instruments

akr ios
  • 611
  • 1
  • 7
  • 9
1

The Leaks instrument seems to close after the app receives lot of memory warnings. Closing all background applications helps.

0

If you use Cocoapods, be sure, you have unchecked Run script only when installing in Target > Build Phases > [CP] Embedded Pods Framework. Checked this option caused same problem for me.

enter image description here

rafalkitta
  • 492
  • 6
  • 9
0

That was my case. If you're using a real device, make sure you're using a valid provisioning profile (development provisioning profile) and that the device is included in the profile. More detailed explanation here.

atereshkov
  • 4,311
  • 1
  • 38
  • 49
0

I've seen this happen when an incorrect provisioning profile is used when building the app and running on a physical device.

You shouldn't see this kind of error when running it in the simulator - it should work as intended. If you're using the simulator in this situation and are you still seeing this behaviour, I would encourage you to go to http://bugreport.apple.com and file a bug regarding this issue, giving as much detail as you possibly can.

If you're using a physical device, ensure you're using a valid provisioning profile and certificate/key pair and that the device is included in the profile.

Jasarien
  • 58,279
  • 31
  • 157
  • 188