C#应用程序运行调试,但不是没有 [英] C# app runs with debugging, but not without

查看:141
本文介绍了C#应用程序运行调试,但不是没有的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行一个(大多数)单线程程序(有一个主线程可以执行一切,其他只读取东西)。稍微改动后,我可以让应用程序在VS2008中运行良好(我更改了一个表单的文本,另一个表单的tab顺序),但是我不能再让它在调试器之外工作了。有没有人知道会导致什么?



澄清:发布模式,使用调试器(F5)启动。调试模式,带调试器(F5)的工作原理。调试可执行文件或释放可执行程序在VS外启动或使用Ctrl + F5失败。



它使用Microsoft的虚拟地球3D,似乎在希望'(加载环)即将完成。



事件日志说:.NET运行时版本2.0.50727.3053 - 致命执行引擎错误(000006427F44AA6E)(80131506)



Culprit:此行:

  this.loader = PlugInLoader.CreateLoader(this.globeControl.Host); 

导致失败。但是,正在工作的表单使用完全相同的行而没有问题。这条线是程序运行的必需条件。我不知道它在做什么。



另一个Lead 错误似乎在.NET框架内。应用程序在另一台机器上工作,尝试重新安装。 更新:没有什么不同,虽然我修复了VS,但是一直告诉我,即使我没有运行它,Visual Studio也在崩溃。





错误
当我几分钟后启动程序,我得到:
应用程序已经生成了一个异常,



Proccess ID = 0x9CC(2508),Thread ID = 0xF0C(3852)。



点击确定终止应用程序。

单击取消调试应用程序。






反汇编是奇怪的:

  0000000077EF2A90 int 3 
0000000077EF2A91 int 3
0000000077EF2A92 int 3
0000000077EF2A93 int 3
0000000077EF2A94 int 3
0000000077EF2A95 int 3
0000000077EF2A96 xchg ax,ax
0000000077EF2A9A xchg ax,ax
0000000077EF2A9E xchg ax,ax
0000000077EF2AA0 int 3 < - 在这里崩溃
0000000077EF2AA1 ret

它重复相同的代码块几次减去与自己的交换)






除了我的电脑,它已经在我测试过的每台机器上除了我的机器上的VM,不会安装.NET框架,因为安装程序下载0个字节的0个字节的框架)...可爱的窗口。

解决方案

我修正了它,.NET 2.0框架被破坏了,当我重新安装它,一切神奇地开始工作。


I'm running a (mostly) single threaded program (there's a main thread that does everything, the others only read stuff). I can get the application to run fine in VS2008 after a minor change (I changed the text of a form, and tab order of another form), but I can no longer get it to work outside of the debugger. Does anyone know what would cause this?

Clarification: Release mode, launched with debugger (F5) works. Debug mode, lanuched with debugger (F5) works. Debug executable, or release executable launched outside of VS or with Ctrl+F5 fail.

It uses Microsoft's Virtual Earth 3D, and it seems to crash just when the 'ring of hope' (loading ring) is about to complete.

Event log says: ".NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (000006427F44AA6E) (80131506)"

Culprit: this line:

        this.loader = PlugInLoader.CreateLoader(this.globeControl.Host);

Causes it to fail. However, the form that was working uses the exact same line without an issue. This line is nesseccary for the program to function. I have no idea what it's doing.

Another Lead the error seems to be inside the .NET framework. Application worked on another machine, attempting reinstall. Update: didn't make a difference, although when I repaired VS it kept telling me Visual Studio was crashing even though I wasn't running it.


Error When I launch the program after a couple minutes I get: Application has generated an exception that could not be handled.

Proccess ID=0x9CC (2508), Thread ID =0xF0C(3852).

Click OK to terminate the application.
Click CANCEL to debug the application.


The disassembly is bizarre:

0000000077EF2A90  int         3    
0000000077EF2A91  int         3    
0000000077EF2A92  int         3    
0000000077EF2A93  int         3    
0000000077EF2A94  int         3    
0000000077EF2A95  int         3    
0000000077EF2A96  xchg        ax,ax 
0000000077EF2A9A  xchg        ax,ax 
0000000077EF2A9E  xchg        ax,ax 
0000000077EF2AA0  int         3        <-- Crashes here
0000000077EF2AA1  ret    

It repeats that same code block several times (minus on ax exchanging with itself)


Besides my computer, it has worked on every machine I've tested it on, except for a VM on my machine which won't install the .NET framework because setup downloads 0 bytes out of 0 bytes for the framework)...lovely windows.

解决方案

I fixed it, the .NET 2.0 Framework was corrupt and when I reinstalled it, everything magically started working again.

这篇关于C#应用程序运行调试,但不是没有的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆