I've had this problem for several days now. The Application-Switcher [cmd-tab] does not show the correct icon for my application, it shows a generic icon. Does anyone know how to fix this?
See attached image:
The Terminal is supposed to look like this:
This doesn't happen every time, only every once in a while. It happens with random applications, not just Terminal.
I found where Terminal through Finder (to make sure the app shows up with the proper icon in finder) and then I closed the open Terminal app and opened a new Terminal session by double-clicking through finder instead of using spotlight.
Now I get the correct Icon:
If I get the "generic" Icon again, I'll come update. If it works for 24 hours, I'll come back and post the answer.
Best Answer
Upon re-reading your question after your edit I see you're comfortable with using Terminal, so I've added a second potential solution for this. You do not need to try these in any particular order - try one first and if the issue returns, then try the other. Option 1 sometimes only works temporarily, but Option 2 requires entering commands in Terminal.
Option 1: Reset and restart the Dock
One remedy is to reset and restart the Dock. However, in doing so, you will need to re-add any non-default icons to your Dock. (I usually find it's a good opportunity for people to start afresh and only add things as they actually use them).
So, if your solution doesn't pan out, you can reset and restart the Dock as follows:
killall -KILL Dock
This should resolve the issue - but remember you'll need to re-add some apps back to the Dock.
Option 2: Reset icon cache
If the first solution above doesn't work (or it only works temporarily), you can try resetting the icon cache.
sudo find /private/var/folders/ \ -name com.apple.dock.iconcache -exec rm {} \;
sudo find /private/var/folders/ \ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
Let me know how you go.