有关调用实时(JIT)调试而不是此对话框的详细信息, 请参见此消息的结尾。

本文记录了一次运行时异常处理经历,具体为解决System.NullReferenceException异常,即对象引用未设置到对象实例的问题,并提供了详细的异常堆栈跟踪及加载的程序集信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

可能是对象未实例化

有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
   在 ZuHaoFrm.FrmMain.Form1_Load(Object sender, EventArgs e)
   在 System.Windows.Forms.Form.OnLoad(EventArgs e)
   在 System.Windows.Forms.Form.OnCreateControl()
   在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   在 System.Windows.Forms.Control.CreateControl()
   在 System.Windows.Forms.Control.WmShowWindow(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   在 System.Windows.Forms.Form.WmShowWindow(Message& m)
   在 System.Windows.Forms.Form.WndProc(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** 已加载的程序集 **************
mscorlib
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
ZuHaoFrm
    程序集版本:1.0.0.0
    Win32 版本:1.0.0.0
    基本代码:file:///C:/WorkSpace/%E7%95%85%E7%A7%9F%E7%BD%91%E5%AE%A2%E6%88%B7%E7%AB%AF/ZuHaoFrm.exe
----------------------------------------
System.Windows.Forms
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
log4net
    程序集版本:1.2.15.0
    Win32 版本:1.2.15.0
    基本代码:file:///C:/WorkSpace/%E7%95%85%E7%A7%9F%E7%BD%91%E5%AE%A2%E6%88%B7%E7%AB%AF/log4net.DLL
----------------------------------------
WYL.Framework
    程序集版本:1.0.0.0
    Win32 版本:1.0.0.0
    基本代码:file:///C:/WorkSpace/%E7%95%85%E7%A7%9F%E7%BD%91%E5%AE%A2%E6%88%B7%E7%AB%AF/WYL.Framework.DLL
----------------------------------------
System.Configuration
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
HttpCodeLib
    程序集版本:4.1.17.8
    Win32 版本:4.1.17.08
    基本代码:file:///C:/WorkSpace/%E7%95%85%E7%A7%9F%E7%BD%91%E5%AE%A2%E6%88%B7%E7%AB%AF/HttpCodeLib.DLL
----------------------------------------
Newtonsoft.Json
    程序集版本:4.5.0.0
    Win32 版本:4.5.11.15520
    基本代码:file:///C:/WorkSpace/%E7%95%85%E7%A7%9F%E7%BD%91%E5%AE%A2%E6%88%B7%E7%AB%AF/Newtonsoft.Json.DLL
----------------------------------------
System.ComponentModel.DataAnnotations
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.ComponentModel.DataAnnotations/v4.0_4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll
----------------------------------------
System.Runtime.Serialization
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Serialization/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll
----------------------------------------
System.Xml.Linq
    程序集版本:4.0.0.0
    Win32 版本:4.6.1099.0 built by: NETFXREL4STAGE
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
----------------------------------------
System.Data
    程序集版本:4.0.0.0
    Win32 版本:4.7.2114.0 built by: NET47REL1LAST
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
mscorlib.resources
    程序集版本:4.0.0.0
    Win32 版本:4.6.1055.0 built by: NETFXREL2
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Windows.Forms.resources
    程序集版本:4.0.0.0
    Win32 版本:4.6.1055.0 built by: NETFXREL2
    基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。

例如:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

启用 JIT 调试后,任何未经处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。



评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值