Deadlock on cudaGlUnmapBufferObject

Hello!
I have a problem using the cuda OpenGL interoperability. I’m running CUDA 2.0 on WinXP with a 9600GT. Basically I started form one of the OpenGL examples and made a dll out of it. It is opening one OpenGL window in which some data is displayed using a pbo, texutre. The dll works correctly the first time the window is opened. The second time the window is opened, after is has been closed I encounter a deadlock when the cudaGLUnmapBufferObject is called - but there is no error reported prior by either the glGetError of cudGetLastError function. So I’m a little bit stuck at the moment as I don’t know where to search for the error.
As it’s a lot of code I don’t paste it here but I can send it by email to anyone who may help ;-)
Thanks in advance!
ck

… still couldn’t solve the problem so any help is appreciated. The only new information I can provide is, any cuda statement which is excecuted after the buffer mapping (when opening the window the second time) causes the dead lock. It seems to be a infinite loop in some cuda function as the function called never returns and CPU use is 100%
Maybe some cuda developer can help??? Please

Are you re-registering the buffer object each time the window is created?

If you think it is a bug, please post some code here that reproduces the problem.

Thanks for your reply!

The buffer is deleted before window is closed and registered each time the window is created (in fact it’s registered / unregistered with every redraw).

I’ve packed the files into a zip and attached it. It’s a dll (TweezerLabviewDll project) with the cuda funcionality and a small test applet (TweezerLabviewDllTest project) to load it, both are MSVS 2003 projects. When the window is closed and reopened with the test applet (as well as with labview) it hangs in line 226 in the TweezerLabviewDllTest.cu file.
TweezerDll.zip (668 KB)

Hi!
I’ve posted some code - so if you could have a look on it, would be really great!
Thanks chris