我已经编写并测试了一个WinForms应用程序,并且在我的机器上一切都正常工作(我知道这是陈词滥调)。当我创建了一个安装项目和安装了一个同事的机器上,他收到以下消息:异常处理帮助
************** Exception Text **************
System.IndexOutOfRangeException: There is no row at position 0.
at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex)
at System.Data.RBTree`1.get_Item(Int32 index)
at System.Data.DataRowCollection.get_Item(Int32 index)
at MyApp.MainForm.MainForm_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(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(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)
我承认我是一个新手,当涉及到处理这样的一个例外。这段文字对我来说并没有什么意义,我不确定调试这种方法的最佳方式,因为我无法在我的机器上发生错误。
任何人都可以告诉问题是什么,或者建议我调试这个最好的方法吗?任何帮助是极大的赞赏!
你可以发布'MyApp.MainForm.MainForm_Load'的代码吗? – 2009-12-01 21:51:10