OpenCV program was killed after processing the 2700th frame

I was tasked with a project that involved reading a video and subsequently detecting motion through the use of a background subtractor. Unfortunately, the program was killed after processing the 2700th frame