Took me a very long time to figure it out, but the problem was the Window Activated event which could trigger multiple times resulting in the start function being called multiple times. And the function cameras_selectionchanged which also lead to multiple calls of the start function. Then when trying to stop the frameReader it wouldn't work because of multiple async threads that were running. Now I think I got it fixed. Would be happy about a test and review of my code from you, but as far as It seems it's working.
Took me a very long time to figure it out, but the problem was the Window Activated event which could trigger multiple times resulting in the start function being called multiple times. And the function cameras_selectionchanged which also lead to multiple calls of the start function. Then when trying to stop the frameReader it wouldn't work because of multiple async threads that were running. Now I think I got it fixed. Would be happy about a test and review of my code from you, but as far as It seems it's working.