30

Important Update

The strange bug is fixed (at least for me) in Xcode 4.2!


I've a serious problem with Xcode 4.1 Build 4B110 under Mac OS X Lion and running Instruments via Xcode. The problem is that Instrument freezes 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 serious problem:

The program seems to be running but does not react to any actions I make. So I can not click on any buttons etc. Nothing happens. The timer is still running, but I can not do anything. I also can not close the window/app anymore. So I have to force stop the Instruments app.

But if I start the Instruments app directly via Developer/Applications/Instruments.app everything is ok. Of course, the app doesn't track anything, but I can click on the buttons and anything possible there.

So does anyone know about this problem?

Does anybody know how to fix this weird problem?

I've also deleted the developers folder with the corresponding deinstall-script file and reinstalled Xcode 4.1. But still the problem persists.

Can anybody give me a hint, tip, etc.?

Would be really great!

Update

So, further weird stuff:

Profile somehow worked for iOS 3.0 version apps, but after making a short break it didn't work again. So, I don't know where this bug is located. I guess it's about the target app iOS version.

Thanks, Andreas

Shark Lasers
  • 441
  • 6
  • 15
andi1984
  • 676
  • 10
  • 27
  • Okay, so I found out that it is a general error (not related to XCode. If I start Instruments separately and choose a target and click record , the same bug appears. Window partly freezes in or (in my words) I can not change anything, I just can only move the window. That's it. In the meanwhile I've completely deleted the developer folder and downloaded XCode from the appstore again, installed it, but still the same bug. So I have no further glue how to fix this problem. – andi1984 Jul 24 '11 at 09:09
  • 14
    Ok, now I've fixed the bug! If I'm opening XCode, choose Profile and choose one instrument (let's say Leaks) the new Instrument window opens. Then I need to go back to XCode (while Instrument.app window is still open in background!) and have to use command + tab to choose out of xcode in front the Instrument.app again. Then the instrument app shows me the tracked data. Really weird problem, but now it works. ;-) – andi1984 Jul 24 '11 at 10:54

4 Answers4

25

Quoting your comment on this, andi1984, so that no one misses this "big" answer for anyone (like me) for whom it is a lifesaver. This worked great for me!

If I'm opening Xcode, choose Profile and choose one instrument (let's say Leaks) the new Instrument window opens. Then I need to go back to Xcode (while Instrument.app window is still open in background!) and have to use command + tab to choose out of Xcode in front the Instrument.app again. Then the Instrument app shows me the tracked data. Really weird problem, but now it works. ;-)

gcamp
  • 14,622
  • 4
  • 54
  • 85
Epaga
  • 38,231
  • 58
  • 157
  • 245
  • Thank you for quoting! I'm happy that my 1 1/2 days of searching about the bug also helped you. ;-) I hope Apple is fixing this problem very soon! – andi1984 Jul 28 '11 at 04:48
  • Nice solution (as nice as that strange behavior can get), thank you. Just for the record: I have to use Cmd-Tab twice to switch from Xcode to Instruments to get it working. Will report this bug to Apple. – Michael Thiel Jul 28 '11 at 07:46
  • I am having the exact same issue as above, but the above answer does not solve my problem. Any other ideas on how to solve? – Benjamin Ahn Ahn Liu Jul 28 '11 at 00:38
  • 1
    Do you have moved the xcode window directly above the Instruments-window? My bugfixing procedure only works if the instrument.app-window is fully covered by the general xcode-window. Then press command + tab and choose "Instruments". Most of the time my mac doesn't react on this, but nevertheless, if I'm moving my xcode-window away, the instruments app is running smoothly. – andi1984 Jul 28 '11 at 04:54
  • Has anyone gone a rdar so we can all duplicate this bug and get Apple to fix it. – wuf810 Aug 11 '11 at 13:59
  • Command-Tab to anywhere and back a few times. Doest have to be xcode. This one almost made be bash the screen with my head .. o_O – Vaibhav Garg Sep 02 '11 at 08:17
4

Epaga's solution sometimes works & sometimes doesn't.

Therefore I suggest everyone duplicates the following open radar so that Apple gives this issue some priority:

http://openradar.appspot.com/9855452

wuf810
  • 633
  • 12
  • 19
1

I had the problem of instruments locking up and the above cmd-tab trick didn't work until I did it such that the dialog "Instruments is trying to access your computer" appeared asking for my password. After I entered the password then I could get to instruments. I suspect the problem is the password dialog is hidden in the Xcode windows. In this case Instruments is frozen because it has the modal dialog open.

So:

  1. Run Instruments
  2. Cmd Tab to Xcode covering the instruments. Cycle and hide messages until password dialog is found. Close Xcode

This may be a one time thing... now that I gave Instruments access it may not need the password again.

Udo Held
  • 12,314
  • 11
  • 67
  • 93
Chad
  • 11
  • 1
0

I've found that if I leave two Instruments windows open at the same time, when Instruments locks up in one window, bringing the other window into the foreground seems to snap Instruments out of it. It seems to bring Instruments back if you can get the focus on a different Instruments window than the one that's locked.

I've found the two-window-method works all the time while the Xcode-profile-method only works sometimes.

Edit:

After trying the two-window-method a bit more, this method also only works sometimes.

Nate
  • 12,963
  • 4
  • 59
  • 80