I upgraded my Raptor board from MF 4.2 to MF 4.3, I have a new problem, my application runs ok for about 12 hours, then freezes. There is no response to web server requests or TCP socket connections, or T43 touch screen presses, or KP16 keypad presses. It does respond to a ping from FEZConfig, and FEZConfig can reboot the board. Is there a global exception handler that I can hook to? I am using the watchdog timer, but that did not function. It was running not connected to FEZConfig, and not under control of Visual Studio debugger, so I did not capture any output to the debug window. I will run it again connected to FEZConfig and see if FEZConfig shows any debug messages.
Thanks. Is there a global exception handler that I can hook to? I read in another forum that maybe I could put a try/catch inside the Program.Run() method in Main() in Program.generated.cs? Where can I get the source code for Program.Run()?
@ dspacek - As far as I know there is not a global exception handler in NETMF. If your program is single threaded without async calls, you can put a try catch inside the Main function. In Gadgeteer applications, you can find Main inside Program.generated.cs. You can find the source for Program.Run here: http://gadgeteer.codeplex.com/SourceControl/latest#Main/GadgeteerCore/Gadgeteer43/Program.cs
@ dspacek -
Hi, in your other thread I saw that you use tcp sockets in your program. One year ago we had a thread were somebody found that writing to a tcp socked crashes the program without throwing an exception when the write buffer gets full (see posts #24 and #25)
There is no global exception handler I know of.
But I think it’s ggod programming practice to put a try catch around the main code and every tred proc, Event handler, timer callback, … anyway.
And also don’t do anything dangerous inside tha catch handler !
I am trying to debug with Visual Studio. Anyone know where I can get the temp/humidty module source code file named - TempHumidity_43.cs ? I downloaded gadgeteer-36144.zip from https://gadgeteer.codeplex.com/SourceControl/latest but the temperature/humidity module in the Seeed folder had different source code.