If you are having issues with TF2 crashing to desktop with the error message hl2.exe has stopped working then I recommend you follow these steps:
- Open steam and go to Library
- Right click Team Fortress 2 and click Properties
- Click on the Local Files tab and click Verify Integrity of Game Cache
- Click on Defragment Cache Files
Now then, if you are having issues with Team Fortress 2 crashing to desktop with sound then the most likely cause of this problem is your graphics card driver crashing. I know this was the case for me and fortunately I discovered a guaranteed fix for this annoying issue. Immediately after the game freezes and the sound loops, press CTRL + ALT + Delete and follow these steps:
- If you are running Windows 7 then Click on Task Manager
- Wait for the message that says 'display driver has stopped responding and has recovered'
- After that message appears wait 2 to 3 minutes
- Now click try to switch to team fortress 2
- Wait a couple of minutes and you should be able to see the game once again
- Open the console using the ~ key
- Type in hud_reloadscheme 1
- That's it!