An open community 
of Macintosh users,
for Macintosh users.

FineTunedMac Dashboard widget now available! Download Here

Previous Thread
Next Thread
Print Thread
Finder icons disappear sometimes
#11133 07/27/10 07:35 AM
Joined: Sep 2009
andycap Offline OP
OP Offline

Joined: Sep 2009
Occasionally, in list view and column view in my finder windows, filenames are listed but their icons are absent. Absent also in corresponding Get Info panels. Oddly they are fine in icon and cover flow views and folders are not affected. I simply cannot pin this behaviour down to any particular action on my part and, eventually, the icons reappear.

Not a showstopper, but irritating. Any ideas?

andy
21.5in iMac 3.06GHz Intel Core 2 Duo
mem 8GB, OS 10.6.4

Re: Finder icons disappear sometimes
andycap #11156 07/27/10 10:01 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
I've been having this happening off and on with disk images (encrypted and non) since 10.6 came out. Things improved somewhat with 10.6.4 but I'm still about 50/50 for dmg's getting a generic icon when they mount. (and the get info shows them, and when you eject them, the icon briefly shows before it blips off the desktop.... weird) Is this what you're seeing?


I work for the Department of Redundancy Department
Re: Finder icons disappear sometimes
Virtual1 #11166 07/28/10 07:02 AM
Joined: Sep 2009
andycap Offline OP
OP Offline

Joined: Sep 2009
Yep I have seen it with disk images but it's more often like this picvault pic . It seems to be any type of file - jpegs, web archives, Excel - you name it.

Re: Finder icons disappear sometimes
andycap #11241 08/01/10 04:40 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
I'm afraid all I can add to that is a "me too". It's very infrequent but I have seen it a few times. Try relaunching finder, or rebuilding the launch services database?


I work for the Department of Redundancy Department
Re: Finder icons disappear sometimes
Virtual1 #11266 08/01/10 09:32 PM
Joined: Aug 2009
Offline

Joined: Aug 2009
I'm just guessing here, but this smells like a .DS_Store corruption issue.

Each folder can have a set of custom view options for each different view. That is, it can have a set of view options to apply when the folder is in list view, another for when it's in icon view, another for column view, etc.) There is also a set of default view options, one for each view, that will be used for folders that have not specified custom view options for that view.

The view options for each view are completely independent of the view options for other views. It's quite possible for a folder to have no custom settings for list view, valid custom settings for icon view, and corrupt custom settings for column view.

The custom view options for a folder are stored in the .DS_Store file of the folder's parent folder, permissions willing, or in the .DS_Store file within the folder, permissions willing. Recently changed view options are held in Finder's RAM until (if) Finder quits normally. Force-quitting Finder discards all view setting changes since that launch of Finder.

In column and list view, the settings used are those for the top folder in the window. View settings for subfolders are ignored.

The upshot of all that is that it can be non-obvious where a particular window's view settings are coming from. If they're coming from a corrupted .DS_Store file, they could be wonky.

In column view, the Show View Options... window offers a checkbox to hide icons. There's no such checkbox for list view, but the option probably corresponds to a bit that is also stored (and honored) in the list view settings.

In list view, the Show View Options... window offers a choice of two icon sizes. Icon view settings have a slider, suggesting that even in column and list view the size is probably actually stored as an integer. If that integer somehow became zero (or negative), icons would not be displayed.

Icon previews are also cached in .DS_Store files. The icon preview for a file is cached in the .DS_Store file of its parent folder. The icon preview for a folder can be cached in either of the .DS_Store files that the folder's other settings could be stored in.


That suggests the following remedy, next time you run into the problem:

First, try the simple change. Toggle those things you can toggle, and see if Finder can change an invalid value to a valid one. In column view, toggle "Show Icons" off and on. In list view, toggle icon size between large and small.

If that fails, try figuring out which .DS_Store file contains the view settings for that folder, and trash it. You may have to trash the .DS_Store file inside the folder as well as the one in its parent folder, because folder setting can wind up scattered across both files, especially if you've been changing permissions. Also trash the .DS_Store file in the folder immediately enclosing files with missing icons (which in list and column view is not necessarily the root folder for the window).

Bear in mind that trashing .DS_Store files also trashes Spotlight comments and icon positions (for icon view). You might prefer not to go around trashing them willy-nilly.

Treat .DS_Store files the way you would treat preference files. Nothing happens if you trash a preference file for a running application; the application has already sucked its contents into RAM, and will write it all back when it quits. In the case of .DS_Store files, you should quit Finder first. Use Terminal to do the trashing, as in:
Code:
cd <folder in question>
osascript -e 'tell application "Finder" to quit'
rm .DS_Store
rm ../.DS_Store
osascript -e 'tell application "Finder" to activate'


Quitting Finder first forces it to update its preferences, including all .DS_Store files, from RAM. When you then relaunch it, all your windows will come back in their current positions, sizes, and view. Force-quitting Finder would revert all those things to their state as of the last time Finder quit normally.

Re: Finder icons disappear sometimes
ganbustein #11269 08/02/10 01:42 AM
Joined: Sep 2009
andycap Offline OP
OP Offline

Joined: Sep 2009
Thanks, ganbustein, that's a very comprehensive explanation but I think your remedy is a bit beyond my limited computing abilities (or, perhaps, bravery)! I believe I solved the issue this morning by merely logging off and on again and this routine may well have effected what you suggest. Would a Delete .DS_Store files command with Onyx (which I guess is a prettied up Terminal routine) do the same thing?

This is probably going to happen again and I have saved your explanation for another go when it does...

Re: Finder icons disappear sometimes
andycap #11289 08/03/10 07:51 AM
Joined: Aug 2009
Offline

Joined: Aug 2009
If I'm right about the cause, then yes, using Onyx to delete all your .DS_Store files would fix it.

It would also delete all of your saved Finder Comments (aka Spotlight Comments), any custom placement of icons in icon view, and revert view settings for all of your windows to whatever is your default. It would also force Finder to rebuild all of your cached icon previews (if you have those enabled).

Might be overkill. Effective, but overkill.


Moderated by  alternaut, dkmarsh, joemikeb 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.3.24 Page Time: 0.031s Queries: 28 (0.015s) Memory: 0.8709 MB (Peak: 1.6882 MB) Data Comp: Zlib Server Time: 2021-09-19 11:56:32 UTC
Valid HTML 5 and Valid CSS