I was also having a similar problem. I read in another forum to delete some files in my iTunes Music folder. I did that but the problem remained. Now I had windows Vista x32 prior to Windows 7 x64. Recently upgraded to 7 when everything failed. I am not sure if there is a problem with having an iTunes library from before but here is what I did.
I just renamed my iTunes music library folder to something without iTunes (music folder) and then deleted everything but the actual music files. I opened iTunes and finally it did not freeze. And the "Determining Gapless Playback" completed!
I hope this works for you.
not sure if this will work for you, but I spent all day yesterday wrestling with this problem. I tried all the deleting apps, library files, etc and nothing worked. What I ended up doing was deleting all the files from my library and starting over. It was a time-consuming pain, as I have over 12000 files.
What I did was add about 10-12 folders of music back to my library at a time; I was able to do this and isolate my issue to ONE folder in all my folders of music. There were several files in the folder that were causing issues; not sure if they were corrupt, or what; I ended up deleting the whole folder off my external hard drive, then copying them back from a backup copy, and voila...I was then able to add the folder with no problems; itunes now sees the files, and gapless playback has completed and I can play all my music. After 27 hours of pain.
Dude, you guys...
For me, it was totally different. I remembered that I had just dropped a folder on my external called music into 'automatically add to itunes', thinking that it would consolidate what I thought were some old files with my updated library in the normal folder...i.e. iTunes Media\Music.
Anyways, what I remembered after I started having the gapless problem was that my library is not set to "Organize Itunes Media" or whatever and that the library actually refers to files that are contained in two different folders... one is the regular iTunes Media\Music and one is the other folder of music I added called "music". So there was no need for me to be dropping "music" into Automatically Add, I already added them long ago. So I just put the folder where it used to be... so that iTunes wasn't going, "Whoah, where'd all those files go...?" and the gapless problem went away!
Hope this helps somebody!