Random freezes without crashing

my gmod works fine, until well into I’m playing on a server where I’ll get graphic glitches and then my gmod will simply freeze. I don’t get driver flashes, like with anything else, my gmod just freezes and I have to close it from the taskbar, which it does without telling me hl2 stopped responding. does anyone know what it could be? it doesn’t do it in singleplayer.