Hl2 stopped working

I can play gmod for a while then it freezes and says hl2 stopped working
this happens almost everytime i play gmod and im sick of it.