gluNurbsSurface() help

Hi,all
I use gluNurbsSurface() function to draw a surface. But when call this function in selection mode, there is a problem. After calling gluNurbsSurface(), program calls gluEndSurface(theNurb) ceaselessly and can’t go down. Is it the problem of gluNurbsSurface or something else?

Thank for any help!