How do I prevent getting an Out of Memory error?

Solution 1

I've been searching around and found the answer on the Steam Forum. Here is a slight paraphrase / quotation of the answer-er (credits at the end).

To start troubleshooting, we need to make sure your game installation is unmodified.
First, you should delete your tf folder located in either, "C:\Program Files\Steam\steamapps\[your steam username]\team fortress 2" or "C:\Program Files (x86)\Steam\steamapps\[your steam username]\team fortress 2".
If you have scripts, maps, etc that you would like to keep, you can copy those out to a safe place before you delete them.
Next, you'll want to reset all your configuration settings. Deleting the tf folder should do this, but just to be safe, set the -autoconfig flag for Team Fortress 2.
To do this, open your Steam library, right-click TF2, click Properties, and in the General tab, click Set Launch Options. Erase everything that is in there (if there is anything) and type in

-autoconfig

Close these windows, then start up TF2. Don't change any settings, and see if it still crashes.

Thanks to scy1192 from Steam for this paraphrased answer.

Solution 2

Another solution mentioned, was to change your Video Settings: ideally disabling the Multi-Core Rendering settings. To achieve this, navigate to the Option 's 'Advanced' tab - you should find Multi-Core Rendering somewhere among the several other settings, do not mess with them - when you find it, disable it.

When you join a TF2-Match, you will probably notice a significant FPS-Drop depending on whether your computer relies on or semi-relies on Multiple CPU Cores.

This is a side-effect at most, it may affect game-play performance, but it is sure to stop any 'random crashes'.

Solution 3

This ties directly back to Solution 1, in that you need to 'clean up' your files in the tf folder (save the important or essentials to a safe-zone, then delete the contents of the tf folder). If you haven't skimmed over it yet, go back to it! The reason why this is classed as another solution, is that many, many, many people have been referencing this exact process... (should I have given credit?)

Anyway, to Solution 4 (I feel inclined to link it to Solution 3, as 3 is just a referral-call) !
My solution revolves around changing your video settings to the absolute lowest and shutting down any of the computer's background processes. If this doesn't work, all I can say is RIP.

Anyway, I hope that this helps and gets you back to your game. Good luck.