Although I am not positive and I would appreciate the original poster posting their answer... I have run into the problem myself in the past and found the following works:
xhost +127.0.0.1
You must run this from the local machine. Usually you see this only when trying to open a window on a remote box or with some programs that don't play nice. Sorry, I don't know exactly what these programs are doing but I suspect they are changing their effective user id too early.
