KDE Plasma Freezing with opengl 3.1

As the title says if I use the rendering backend Opengl 3.1 , after a while the KDE Desktop is freezing.
I have switched to Opengl 2.0 and so far everything is working fine.

I had the non GIT version of KWIN and was freezing without a warning.
I have installed the GIT version of KWIN and when it was freezing it was showing me a popup notification that the Desktop effects were restarted .