I installed ubuntu 18.04 today in my laptop lenovo yoga 500. and when i try to change font in gonome tweak tool gnome shell is crashed and logged me out immediately. same problem with visual studio code. when I try to open a folder in visual studio code it logged me out. and when I ran a tkniter program in python.

it first started when I ran the first script

from here (it is a bash script i wrote to install some software quickly in fresh installation) I don't know why this is happening please help.

I other questions i read nvidia driver causes this problem. But i installed, uninstalled, reinstalled nvidia driver but it didn't help.