Code Worked Once Only

Code Worked Once Only

Hi People,

I created a C# program to capture image from USB camera using the MCA SDK.
When I first ran the program, it worked fine. It could preview and capture the image.
However, when I clicked the 'Stop' button, it would hang. I forced the application to quit.
So I wanted to test for the second time, but it did not work at all. It would not preview or capture image.

This happened to my friend too. So does anybody know what is wrong and the solution to this problem?
Any input will be very much appreciated.


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi WendyK,

When you stop the preview there are two things to do:
1: stop Preview: oCam.stopPreview();
2. release device: oCam.releaseDevice();

Maybe you can send us your source code and the experts and rookies (like me) can have a look at it.



Hi Markster,

Yes I have put in those methods and it did work.
I think the error is because of the camera. The camera often hangs!
So when it hangs, it won't work and vice versa.

Thanks for your help!

Leave a Comment

Please sign in to add a comment. Not a member? Join today