即时(JIT)调试 [英] just-in-time (JIT) debugging
问题描述
嗨
当我为某些用户运行我的应用程序时它给了我以下消息
有关调用的详细信息,请参阅此消息的结尾
实时(JIT)调试而不是此对话框。
**************异常文本***** *********
System.IndexOutOfRangeException:位置0没有行。
在System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) )
在System.Data.DataRowCollection.get_Item(Int32 index)
在InvitationAndEducation.frm_main_screen.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(我。的
) ssage&安培; m)
在System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
在System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
在System.Windows.Forms.Form.WmShowWindow(消息& m)
在System.Windows.Forms.Form.WndProc(消息& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd,Int32 msg,IntPtr wparam,IntPtr lparam)
***** *********已装载的装配**************
mscorlib
装配版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase:file:/// C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib .dll
----------------------------------------
InvitationAndEducation
Assemb ly版本:1.0.2778.29967
Win32版本:1.0.2778.29967
CodeBase:file:/// E:/IPO%20Setup/InvitationAndEducation.exe
----------------------------------------
System.Windows.Forms
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase :file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
--------- -------------------------------
系统
汇编版:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase:file:/// C:/ WINDOWS / assembly / GAC_MSIL / System /2.0.0.0__b77a5c561934e089/System.dll
--------------------------------- -------
System.Drawing
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727 -8300)
CodeBase:file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Dra wing / 2.0.0.0__b03f5f7f11d50a3a / System.Drawing.dll
------------------------------ ----------
System.Configuration
汇编版本:2.0.0.0
Win32版本:2.0.50727.832( QFE.050727-8300)
CodeBase:file:/// C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase:file: ///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
---------------- ------------------------
System.Data
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase:file:/// C:/WINDOWS/assembly/GAC_32/System.Data/2.0。 0.0__b77a5c561934e089 / System.Data.dll
---------------------------------- - -----
System.Transactions
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300 )
CodeBase:file:/// C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
--- -------------------------------------
System.EnterpriseServices
汇编版本:2.0.0.0
Win32版本:2.0.50727.832(QFE.050727-8300)
CodeBase:file:/// C: /WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
--------------------- -------------------
************** JIT调试*** ***********
启用实时(JIT)调试,这个
应用程序或计算机(机器)的.config文件.config)必须在system.windows.forms部分设置
jitDebugging值。
应用程序也必须使用debugging
启用。
例如:
< configuration>
< system。 windows.forms jitDebugging =" true" />
< / configuration>
启用JIT调试后,任何未处理的异常
将被发送到JIT调试器在电脑上注册了
而不是由这个对话框处理。
那么,怎么办?
修复错误。
看起来很简单。
你试图使用的索引不是'' t有有效数据。您可以在代码中检查null以阻止它。
或者使用try / ctach块
你好我遇到同样的问题我有不知道如何修复它请任何帮助都会很棒。我现在迷路了感谢您的帮助
System.IndexOutOfRangeException :位置0没有行。
这不应该是大脑弯曲。您的对象不包含您认为它的数据。
检查以确保它不为空,并且集合中的项目数量足以匹配您要使用的索引。
Hi
when I run my application for some users it gives me the following message
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IndexOutOfRangeException: There is no row at position 0.
at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)
at System.Data.DataRowCollection.get_Item(Int32 index)
at InvitationAndEducation.frm_main_screen.Form1_Load( Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(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.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
InvitationAndEducation
Assembly Version: 1.0.2778.29967
Win32 Version: 1.0.2778.29967
CodeBase: file:///E:/IPO%20Setup/InvitationAndEducation.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.832 (QFE.050727-8300)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.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.
So, what to do?
Fix the error.
It looks pretty simple.
You''re attempting to use an index that doesn''t have valid data at it. You can probably do a check for null in your code to stop that.
Or use try/ctach blocks
Hello I am having the same problem and I have no idea how to fix it please any help would be great.I am at a lost right now Thanks for any help
System.IndexOutOfRangeException: There is no row at position 0.This should not be a brain bender here. Your object does not contain the data you thought it does.
Check to make sure it''s not null and that count of items in the collection is enough to match the index you want to use.
这篇关于即时(JIT)调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!