There's currently a issue where Hammer will try to load your vmf, but if it finds a invalid solid it will wipe all entities from the file.
If you don't have any autosaves or backups this can be pretty troubling.
For now it's recommended that you save your work as a completely new file (as in, don't just hit ctrl+s, hit the Save As... button) from time to time.
As far as we know this only affects the Source Engine MP version of the SDK (TF2 and CS:S).
What to do if it happens to your file?
We don't really know. If you know, please tell us, be as specific and detailed as possible.
TIP: when trying to restore your files using autosaves or backups, make duplicates of everything! You don't want to end up replacing a important backup file with a failed restore attempt.
Things you can try:
1) Load your vmf in another source SDK. This means something like alien swarm SDK, portal SDK or cs:go SDK.
It seems that only the TF2/CS:S SDKwill actually wipe the entities when a invalid solid is found. Others will simply remove or attempt to fix the erroneous solid itself.
If you map loads in another SDK, and all the entities are present (all/most textures will be solid white and models will display a ERROR sign) then you're in luck.
All you need to do is save the file like you normally would. The error should be fixed and you shouldn't have lost any data. You can now re-open it in the TF2 SDK and continue mapping.
2) If you compiled your map recently, you can decompile your own bsp to retrieve a vmf.
It's not a very elegant solution, but at least you haven't lost EVERYTHING.
3) vmf files are written in plaintext and can be opened with a text editor. If nothing else works. You can start digging into these "documents" and trying to fix the problem manually.
Copy/pasting entities from a older save could potentially save you a lot of trouble. However, manually editing your vmf through a text editor is dangerous in itself. It's a last resort option.
If you've found a reliable way to fix this problem, please reply to this news post with the solution, everyone will love you for it.
Until Valve decides to fix this issue, maybe we should all start hitting alt+p before closing hammer.
If you don't have any autosaves or backups this can be pretty troubling.
For now it's recommended that you save your work as a completely new file (as in, don't just hit ctrl+s, hit the Save As... button) from time to time.
As far as we know this only affects the Source Engine MP version of the SDK (TF2 and CS:S).
What to do if it happens to your file?
We don't really know. If you know, please tell us, be as specific and detailed as possible.
TIP: when trying to restore your files using autosaves or backups, make duplicates of everything! You don't want to end up replacing a important backup file with a failed restore attempt.
Things you can try:
1) Load your vmf in another source SDK. This means something like alien swarm SDK, portal SDK or cs:go SDK.
It seems that only the TF2/CS:S SDKwill actually wipe the entities when a invalid solid is found. Others will simply remove or attempt to fix the erroneous solid itself.
If you map loads in another SDK, and all the entities are present (all/most textures will be solid white and models will display a ERROR sign) then you're in luck.
All you need to do is save the file like you normally would. The error should be fixed and you shouldn't have lost any data. You can now re-open it in the TF2 SDK and continue mapping.
2) If you compiled your map recently, you can decompile your own bsp to retrieve a vmf.
It's not a very elegant solution, but at least you haven't lost EVERYTHING.
3) vmf files are written in plaintext and can be opened with a text editor. If nothing else works. You can start digging into these "documents" and trying to fix the problem manually.
Copy/pasting entities from a older save could potentially save you a lot of trouble. However, manually editing your vmf through a text editor is dangerous in itself. It's a last resort option.
If you've found a reliable way to fix this problem, please reply to this news post with the solution, everyone will love you for it.
Until Valve decides to fix this issue, maybe we should all start hitting alt+p before closing hammer.