guiframe: protect trace windows with mutex to make it thread save