Release runs faster because, for example, there is no checking for breakpoints, etc. So you can have timing and/or synchronization issues that are visible only in Release or Debug builds.
Exception class has StackTrace property. It is a string that shows snapshot of the stack. Try output it to your display. It should tell what method throws the exception.
Try to clean up your code a bit. Start communication and do processing loop in the same thread, instead of using two separate threads. In the take picture case check that you are done taking previous picture.
I will try to do what you suggest, but i really don’t understand if the code works under debug it should work under release like in windows app.
Finally i could read an exception output with MF Deploy tool, John from GHI advice me to use this tool. And exceptions starts right after the initialization of wifi thread. I even dont send a take picture command to robot and have different exceptions from camera module, but why? in debug mode everything is ok.
Here is exception that casing a OutOfMemory under release mode :
Here is output in visual studio, i can see a OutOfMemory exception but picture is saved anyway:
Thanks for contacting all the GHI employees for help; that is what we are here for. That said, it doesn’t usually benefit to ask the same question via email and the forum.The advice here is excellent.
Most, if not all your problems, relate to timing issue, memory issues, and threading issues. I suggest that you find information explaining these topics. It will help you as you work on your project.
I did some brief searches (using Google) with the following strings:
“NETMF timer threads”
“NETMF garbage collection”
Both of these returned many results that are very good discussions of the topics.
PS thanks (!) to all the community members helping Alex.