SerialCameraL1 and Spider 4.3 Visual Studio 2013 Problems

Hello,

I’m having a problem trying to use either of the Serial Camera modules with a spider board on 4.3 with Visual Studio 2013.

I am just trying the example code on Codeplex but sometimes I get CLR_E_FAIL exceptions in my timer, sometimes I get SystemOutOfMemoryExceptions and I just got the following exception:

[quote]#### Exception System.InvalidOperationException - 0x00000000 (4) ####
#### Message: Failed to read all of the bytes from the port.[/quote]

The only thing I’ve changed is that I’ve tried to turn the Serial Camera into a normal camera by storing the Bitmap each time a new image is taken and then only showing it on the display when the user presses a button as follows:

void button_ButtonPressed(Button sender, Button.ButtonState state)
        {
            timer.Stop();
            if(bmp != null)
            {
                Debug.Print("show image");
                displayN18.SimpleGraphics.DisplayImage(bmp, 0, 0);
            }
            timer.Start();
        }

As you can see, I stop the timer and pause serialCamera (to make sure bmp will not be overwritten while I’m using it) and then draw it to the screen if it isn’t null (because serialCamera.getImage() returns null if there is an error).

It works sometimes but sometimes I’m getting the errors/exceptions I’ve mentioned above.

Does anyone have any ideas?

Thank you.

@ blekk - We would need to see a complete and minimal sample that shows the issue so we can try to reproduce it.