Debugging Problem
-
Hi! I've written a program in C# which is running stable for hours. Then, at some moment, I get the Windows Error Message "The program xy has encounterd a problem an has to close". What I did was writeing some information at different time stamps to a file. What is interesting: the file is filled with information AFTER the Error Message and the whole program still keeps running, only the output (multimedia things) is not shown anymore. So in my opinion I have a performance problem. My question: Does anybody know how to get to the reason for such a Windows error. Can I catch such a Windows error or somehow suppress it? Is there a possibility to free resources of Windows Form manual? Kind regards
-
Hi! I've written a program in C# which is running stable for hours. Then, at some moment, I get the Windows Error Message "The program xy has encounterd a problem an has to close". What I did was writeing some information at different time stamps to a file. What is interesting: the file is filled with information AFTER the Error Message and the whole program still keeps running, only the output (multimedia things) is not shown anymore. So in my opinion I have a performance problem. My question: Does anybody know how to get to the reason for such a Windows error. Can I catch such a Windows error or somehow suppress it? Is there a possibility to free resources of Windows Form manual? Kind regards
Seems like one of your threads exits unexpectedly whereas others continue to run. First of all check your code, make sure all exceptions get caught and displayed or logged (not Exception.Message but Exception.ToString()). Add a try-catch construct to your Main method. If this does not help, add logging to all your code so you can see which parts keep running, and which dont; compare parts of the log that you consider normal with the final part, when the anomaly has occurred. :)
Luc Pattyn [My Articles] [Forum Guidelines]
-
Hi! I've written a program in C# which is running stable for hours. Then, at some moment, I get the Windows Error Message "The program xy has encounterd a problem an has to close". What I did was writeing some information at different time stamps to a file. What is interesting: the file is filled with information AFTER the Error Message and the whole program still keeps running, only the output (multimedia things) is not shown anymore. So in my opinion I have a performance problem. My question: Does anybody know how to get to the reason for such a Windows error. Can I catch such a Windows error or somehow suppress it? Is there a possibility to free resources of Windows Form manual? Kind regards
IS it not possible to run this application under the debugger and wait for the debugger to catch this?
**
xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!
**
-
IS it not possible to run this application under the debugger and wait for the debugger to catch this?
**
xacc.ide-0.2.0.75 - now with C# 3.5 support and Navigation Bar!
**
Thank you for your answers. Of course it is possible to work with the debugger or with try/catch but in fact it does not help me because the error is not shown by the debugger. It is a Windows Error Message and that's the great problem.