1) What the hell is a leak???
A leak is 'hole' in the walls of your map, leading to the void outside. When making a map, you should put things together carefully, so as to avoid leaks. But if you do get them . . .
2) Spotting Leaks
One of the more obvious, but less used ways, is to just have a quick look through the compile log. If you do have a leak, it will tell you near the top of VBSP's log:
where it says:
**** leaked ****
Entity info_player_terrorist (88.10 -331.75 1.00) leaked!
is where VBSP detected the leak. Some other ways to find leaks in-game are by looking at any water in your map, or turning 'mat_wireframe' on:
This should be water, but as you can see it is a big problem instead. this has happened because there is a leak.
The map I am in is a big S shape, so the engine really shouldn't be rendering the other end of the S. It is though, because the leak stopped VVIS from running. To turn on wireframe, go to the console and type "sv_cheats 1" to turn on cheats, then "mat_wireframe 1" to turn on wireframe.
3) Fixing Leaks
After you've decided that your map definitely has a leak, go to Hammer and click Map > Load Pointfile, and agree to the confirmation box that comes up.
A red line should have appeared snaking around your map:
This red line will start in the void, pass through the leak, and end at the entity that VBSP first found (in this case, info_player_terrorist), so find the start of the red line, and follow it till it passes through a wall. this is where the leak is. It will never pass straight through solid wall (it will pass through any brush entities however; they don't seal maps), only through gaps at the edges, no matter how small they are.
So i've followed my red line and i find this:
The leak is circled in orange. To fix it, simply resize one of the brushes around it so everything fits together:
So compile the map again and enjoy the leak-free goodness. if there is still a leak, just go through this process again till there is none: