While plotting to a window in R, X11 kept hanging. These steps reproduce the error.
plot(c(1,2,3),c(4,5,6))
X11 window becomes active. Press [Apple]+[Tab] to go back to the terminal window.
dev.new()
Second X11 window becomes active. Press [Apple]+[Tab] to go back to the terminal window.
Making sure you are in the terminal and you are not holding down any keys, press [Apple]+[Tab] again to try to go to X11. The X11 is no longer responding!
Setup details: I am on OSX 10.7.3 with R and xorg-* installed through Macports. R.app in /Applications does not seem to have this problem. I can give more details if they will be helpful.
This is from Activity Monitor/inspect:
The sampling of the process is at http://pastebin.com/3rXM2BBn