Closed TopoIogist closed 2 years ago
Basically what happens is this I think: The shared pointer gets destroyed and sets the TerminateThreadEvent bool. Then simultaneously this "cleanup code" in ScreenCapture.cpp related to the exception just removes the TerminateThreadsEvent bool...
Thread_Data_->CommonData_.TerminateThreadsEvent = false;
// Clean up
std::this_thread::sleep_for(std::chrono::milliseconds(1000)); // sleep for 1 second since an error occcured
Yeah I see that.. good catch!
There does appear to be a race between the start and the destructor running. I just pushed a change to master. Let me know if that works
Yes looks fixed with the update
I am encountering deadlocks in my program which I could trace back to screen capture lite..
Changing the "Screen_Capture_Example.cpp" example slightly to this:
and in createwindowgrabber
To trigger the issue I am opening up and closing many calc.exe windows. At some point a race condition occurs and the iteration counter does not progress anymore...