tags:

views:

38

answers:

1

Why is my application bundle sometimes missing its icon and/or have this "cancel" symbol over it?

alt text

I have looked at the .plist file and the icon path and icon exist and are correct. If I right click the bundle and click Get Info, the icon shows up in the 'preview' section.

This happened after I moved around some code in my qmake file (but made no change semantically). Is this just a bug in Finder? There seems to be no way to refresh the view.

What generally causes Finder to display this cancel symbol and/or not load the bundle's icon?

+2  A: 

That's the "You can't run this application" icon.

The finder will display that icon if:

  • the app is marked as being untrusted (i.e., downloaded like @kiamlaluno said)
  • the app the wrong architecture (i.e., PPC app on an intel machine without rosetta)
  • the application bundle is messed up (make an empty folder with an .app extension)

Since you're building this program, I suspect that the Finder noticed the .app bundle before it was finished compiling and thought it was broken. When you move your app to another folder, the Finder refreshed the bundle (which is complete now), and displayed the correct icon.

Seth
I've tried moving it back and forth but to no avail. Strangely, if a Finder window is open in the build folder and then I build the application, I get the messed up icon. But if I don't have it open *during* the build, it's fine. Odd. The behavior is consistent too, I've tried it several times. If I get the messed up icon, closing and reopening Finder doesn't help either.
Jake Petroules
@Jake - Renaming the application might trigger the refresh too.
Seth
That was actually one of the first things I tried (didn't work). I guess Finder REALLY likes caching or something.
Jake Petroules