Question

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 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. So I also can not close the window/app anymore. So I've to force stopping 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 same problem.

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 worked again. So I don't know where this bug is located. I guess it's about the target app iOS version.

Thanks, Andreas

Was it helpful?

Solution

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. ;-)

OTHER TIPS

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

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top