something wrong with my program

My CUDA program is about Video processing.
When it starts…the program is ok …
Cuz the test video is only 3 seconds … so the program ran repeatly…
The program ran again and again…everything is correct…
But…after many cycles…
the windows will show the message and say~“The system is wrong and we have to stop the program…”
How come ~? Does anyone encounter this problem ~? >.<