stencil.c from the Redbook (7th edition)

I am trying to run stencil.c from the redbook, and after I successfully compile it, I can run it, but I will not see anything in the popup window, and when I close it, I can see, some times, the image generated very briefly just before the window faded off. Did anyone run into this before?