bug: CUDA crashes VS2005 debug system

I was working in device emulation mode + debug mode… I went to get a coffee while my kernel was running… I saw 32k lines like these ones on the Debug - Output window:

The thread 'Win32 Thread' (0xf20) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x748) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xfb0) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xddc) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x634) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xf30) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xf60) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x708) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xedc) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x974) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xf34) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xed8) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xde8) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xeb4) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe7c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe3c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe80) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe84) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x524) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe6c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe8c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe78) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe9c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xf1c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xef8) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xef4) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x8f4) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xf08) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xeec) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xe54) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xdf8) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xea8) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xc5c) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x694) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0x4dc) has exited with code 0 (0x0).

The thread 'Win32 Thread' (0xc18) has exited with code 0 (0x0)

When they reached 32k lines aprox. Visual Studio 2005 generated a critical error and then closed itself. I repeated the operation with the same result… I think it’s because too many lines generates an overflow or an out of memory in VS2005.

Perhaps you should use a thread pool/reuse threads instead of creating a zillion of different threads…

Well, I was using Vista Ultimate x64, VS2005 SP1, CUDA 2.0 beta 1 x64, FW 174.55, 6Gb of RAM and an Intel E2140. The kernel is using 29 registers, 256 threads/block, 8 blocks per multiprocessor.