Windows 7: Search indexing is stuck
I think you could be correct when you say that there's a corrupted file that causes it to hang. A crude way of trying to identify the file is to go the files tab and turn off half the files types from being indexed. Let it run. Either it completes or it stops. If it stops, turn off half again. If it completes, you know the bad file type is in the other half. Doing this should allow you to identify the bad file type.
Also, look through the file list that's indexed. File types have different search providers, like HTML, plain text and so on. Are there any that look out of place, that might have been installed by some third party application?
Another idea is let the search hang on the 4,317th file. Then run a command prompt. Type
CD c:\
DIR /s /TA /O-D >c:\newt.txt
This will create a file named newt.txt that will hold all of the files and the last time they were accessed. Accessed, meaning read, not modified. You'll have to search through the file with a file editor but look for the last several files that were modified. If we're in luck, your bad file will be in there. Good luck!
First things first, try rebuilding your index. Also, exclude from indexing any folders with temporary/uncompleted downloads. Unfinished files are by definition corrupted and could hang the process. Video/audio codecs could also possibly hang if the indexing looks up metadata in them.
My search was stuck due to a bad Outlook.pst file. I ran the pst repair utility SCANPST.EXE
found in the same directory as the Outlook 2007 executable (C:\Program Files (x86)\Microsoft Office\Office12
on my Windows 7 x64 machine.)