[英]Exception in GUI thread causing vshost.exe to crash
I think my Visual Studio 2008 (.net 3.5) is corrupted.我认为我的 Visual Studio 2008 (.net 3.5) 已损坏。
If I start a new Windows Forms project in a new solution, add the code如果我在新的解决方案中启动一个新的 Windows Forms 项目,添加代码
double[] x = new double[2];
x[3] = -1.0;
to the form_load handler (or a button handler), and try to debug the program, it crashes immediately, not throwing an exception, but actually crashing.到 form_load 处理程序(或按钮处理程序),并尝试调试程序,它立即崩溃,不是抛出异常,而是实际崩溃。
If I put the same code in the form constructor or in Main, an exception gets thrown like normal.如果我将相同的代码放在表单构造函数或 Main 中,则会像往常一样抛出异常。
Any ideas what might be going on?任何想法可能会发生什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.