几天前,在安装XNA框架后,最近一直在恢复许多错误消息。这些应用程序仍在运行,并且其中一些不受这些错误困扰,但是其他应用程序在执行应用程序内的功能时将无法运行/获取此错误消息。
这是错误消息:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Windows_Theme_Installer.Main.bApplyTheme_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Windows Theme Installer
Assembly Version: 1.0.0.0
Win32 Version:
CodeBase: file:///C:/Users/Ben/Documents/deskmod%20tools/Windows%20Theme%20Installer/Windows%20Theme%20Installer%20v%201.1.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.4927 (NetFXspW7.050727-4900)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
**编辑:**我解决了这个问题;事实证明,我出于某种原因试图使用的应用程序需要管理员特权,尽管他们以前根本不需要。
每当.NET应用程序中存在未处理的异常并且该应用程序或计算机管理员(例如Windbg或Visual Studio)没有定义默认处理程序时,.NET未处理的异常处理程序都会处理该异常并向用户显示消息框询问继续还是终止。
如果用户说“忽略”,则该应用程序可能会正常运行,也可能无法正常运行。您将需要安装调试器(例如Visual Studio或WinDbg)并进行转储或进行实时调试,以找出发生了什么确切的变化。
调用堆栈显示该异常位于名为以下内容的自定义类中:
Windows_Theme_Installer.Main.bApplyTheme_Click
另外,安装XNA框架可能会暴露.NET Framework中的错误。因此,要验证这一点,只需运行Windows Update,然后查看是否可以解决该问题。
否则,XNA可能已经安装了该框架的更新版本,该框架现在暴露了您的代码中的缺陷。调试是这里唯一的解决方案。
一个非常罕见的机会是您的RAM或硬盘有坏扇区。这可能会导致随机崩溃。但是,它将出现在随机应用程序中,而不是特定的应用程序中。运行fdisk检查您的硬盘,然后运行memtest86测试您的RAM。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句