MacOS – Mac freezes when I try to open a particular Folder

foldershangmacbook promacos

I am using Mac Book Pro with Mavericks. For last couple of weeks, I have been noticing that my whole machine going in to Freeze, when I try to open a particular folder.

Every time when I "force quit" (option+command+esc), I find the "Folder option" in a "Non response" mode.

Until I "Relaunch" the finder, It's not going back to normal.

What should I do? Is it happening for any virus or something?

Please share with me, if you have any idea.

Thanks in Advance.

Best Answer

It seems likely that the problem stems from corrupted data on your hard drive. The Finder asks the FileSystem to give it information about the content of the folder and either the Finder fails to properly handle the error returned by the FileSystem or the FileSystem keeps trying endlessly to access the faulty data without properly returning.

In order to make sure it's not simply a Finder bug, check whether you can access the folder fine from a Terminal:

  • Open a Finder window and go to the parent of the problem folder.
  • Select the parent folder and command-click on it to reveal the contextual menu.
  • Select Get Info.
  • Look for the Where: field, it shows the actual path of the parent folder.
  • That will be something like /Users/your-user-name/Path/To/Parent
  • Select the path and copy it.
  • Open a Terminal window (press command-space and type terminal).
  • type cd (ending space) then paste the copied path. This should look like:
    • cd /Users/your-user-name/Path/To/Parent/problem-folder
    • If any folder in the path contains spaces, enclose the whole path with double quotes. I.e.: cd "/Users/your-user-name/Pa th/T o/Parent"
  • type ls -lR "problem-folder" replacing the last parameter with the name of the problem folder.

Normally this should list the content of the problem folder as well as that of all its subfolders (this should print a lot of text if the folder hierarchy is deep).

Since this completely bypasses the Finder, if this works it means that the bug lies with how the Finder deals with the folder data (for whichever reason). However if the Terminal freezes when running this command, this would really point toward a hard drive issue.

In the latter case I would recommend that you first run Apple's DiskUtility application and attempt to verify the disk:

  • Launch DiskUtility (press command-space and type Disk Utility).
  • On the left pane, select the hard drive your folder resides on.
  • On the right pane, click the Verify Disk button.

This should take a bit of time and will print a list of possible errors. If there are any issues and/or if the log indicates that you should run a repair on the disk then you should press the Repair button. In any case it should not hurt if you choose to repair the disk even if no errors are displayed.

If a repair fixes the issue, then this likely indicates that the error was not due to a faulty hard drive but to invalid FileSystem data and you should be good to go again.

However, if the problem persists your hard drive could be the cause of the FileSystem corruption.

In this case I highly recommend to buy a more powerful disk diagnostic and repair program such as DiskWarrior (you will find it at http://www.alsoft.com/diskwarrior/), it is one of the most reputed disk repair program on the Mac.

Update:

If ls -lR works correctly, this points to a Finder issue. It could be a buggy QuickLook plugin which is triggered when opening the folder and which has trouble opening some of your files. This does not mean that these files are corrupt.

Using the terminal, use the mv command to move files to another folder to see if this fixes the issue. For example you could do:

  • mv problem-folder/a* fixa
  • mv problem-folder/b* fixb
  • etc.

Then try opening each of the fix folders to see which ones freeze or not.

This way you would be able to identify precisely which file(s) causes the issue if it's caused by a file.

If you have installed Quicklook plugins you might want to try to disable them temporarily to see if that fixes the issue.