电脑小白,求详细解决办法!!!

FFFFFFFFQQQ 2020-03-13 02:44:38
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.NullReferenceException: 未将对象引用设置到对象的实例。
在 HkeyTray.EC.get_Battery()
在 HkeyTray.EC.UpdateLiveInfo()
在 HkeyTray.EC..ctor()
在 HkeyTray.General..ctor()
在 HkeyTray.Form1.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.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WmShowWindow(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 HkeyTray.Form1.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.8.4150.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
HkeyTray
程序集版本:1.0.0.15
Win32 版本:1.0.0.15
基本代码:file:///C:/Program%20Files%20(x86)/Hotkey/Hkeytray.exe
----------------------------------------
System.Windows.Forms
程序集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代码: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.8.4001.0 built by: NET48REL1LAST_C
基本代码: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.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Management
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Management/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Management.dll
----------------------------------------
System.Configuration
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Accessibility
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
WindowsFormsIntegration
程序集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsFormsIntegration/v4.0_4.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll
----------------------------------------
PresentationCore
程序集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_32/PresentationCore/v4.0_4.0.0.0__31bf3856ad364e35/PresentationCore.dll
----------------------------------------
PresentationFramework
程序集版本:4.0.0.0
Win32 版本:4.8.4150.0
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/PresentationFramework/v4.0_4.0.0.0__31bf3856ad364e35/PresentationFramework.dll
----------------------------------------
WindowsBase
程序集版本:4.0.0.0
Win32 版本:4.8.4150.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/WindowsBase/v4.0_4.0.0.0__31bf3856ad364e35/WindowsBase.dll
----------------------------------------
System.Xaml
程序集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xaml/v4.0_4.0.0.0__b77a5c561934e089/System.Xaml.dll
----------------------------------------
UIAutomationTypes
程序集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/UIAutomationTypes/v4.0_4.0.0.0__31bf3856ad364e35/UIAutomationTypes.dll
----------------------------------------
mscorlib.resources
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
----------------------------------------
System.Core
程序集版本:4.0.0.0
Win32 版本:4.8.4121.0 built by: NET48REL1LAST_C
基本代码:file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本:4.0.0.0
Win32 版本:4.8.3752.0 built by: NET48REL1
基本代码: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 调试程序,
而不是由此对话框处理。
...全文
589 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
lzhdim 2020-03-17
  • 打赏
  • 举报
回复
HkeyTray.EC.get_Battery() 这个函数有问题。。。 调试一下。。。
闪耀星星 2020-03-17
  • 打赏
  • 举报
回复
看一下代码或者写日志,有详细的堆栈跟踪
  • 打赏
  • 举报
回复
调试一下代码,他会在错误的地方停下来,先找到错误的地方在哪里,然后你把错误代码截图发上来,这个问题光说我们也不知道哪错了
SayoKun 2020-03-16
  • 打赏
  • 举报
回复
比如dy.show();这个dy你只是Form dy;了,你需要的是Form dy=new Form();这样才不会报错。
半霜 2020-03-14
  • 打赏
  • 举报
回复
未将对象引用设置到对象的实例。代码问题,要处理空值状态啊,
roylam12345 2020-03-14
  • 打赏
  • 举报
回复
你应该是有一个类,但未初始化吧,如果是类的话,你应该new 一个对象,或者从已有的对象赋值给它,类是个抽象的东西,你需要实例化它!~~
FFFFFFFFQQQ 2020-03-13
  • 打赏
  • 举报
回复
怎么解决这个问题呢,能不能说说详细步骤
  • 打赏
  • 举报
回复
“System.NullReferenceException: 未将对象引用设置到对象的实例。” 问题就是这句话,未将对象引用设置到对象的实例,几乎就是代码的问题
oXiaoc1234 2020-03-13
  • 打赏
  • 举报
回复
使用了未赋值的对象。
良朋 2020-03-13
  • 打赏
  • 举报
回复
出错的地方的代码贴上来啊。 最原始的判断是你某个变量为空引起的。

111,088

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧