Edit: Ah, looks like Ferwiner got in first while I was typing this I agree that it's worth testing the RAM as well. https://www.memtest.org/ should help you out with that. You can leave it running overnight to get the best results.
My first impression was that the CPU might be overheating. Systems will shut themselves down to protect themselves when that happens. You can monitor you CPU temperatures easily with RealTemp. Basically, you don't want to be getting near 100 degrees celsius at all.
The problem with that theory though is that a) It apparently only happens in COH2, and b) COH2 actually sucks at using the whole CPU.
So I wonder if the video card might be overheating instead. It's also unlikely, since video card usage in COH2 is generally dependent on CPU performance which steadily declines as a match goes on, thanks to game engine problems. But once again, it's easy enough to check and rule out. A quick Google search should find a range of programs you can use. MSI Afterburner is probably a good brand name one.
If you only have 1 monitor, you can press alt+enter to window your game and check the results you're getting. If there actually are temperature issues, causes sometimes include loose cables blocking fans from turning, and dust accumulation on the heatsink.
Have you installed COH2 recently, or have you been playing for some time and this is a new development?
Hi, thanks for giving me these tools. I did some tests with the game and it seems like it only shuts down as soon as the match is over. I monitored my temps through out the game and they were fine, 40 degrees C for my cpu and gpu. My PSU is only 500 watts so it might be getting upset when the game starts to suddenly demand a lot of power when explosions are going off.
I wonder why it doesn't crash during a battle with like 50 tanks on my screen though. I haven't tried turning my graphics down a lot yet but when I have time for another 4v4 battle then I will see if closing every program I have will help.
Also, I just got the game during that free giveaway and it has been happening this whole time.