3
我試圖將在Visual Studio中創建的winforms應用程序移植到Mac上進行monodevelop。解決編譯錯誤後,當我運行該程序,該應用程序輸出這些異常:移植一個winform應用程序以在mac上開發
System.NullReferenceException: Object reference not set to an instance of an object
at System.Windows.Forms.TextBoxBase.set_Lines (System.String[] value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.Windows.Forms.TextBoxBase:set_Lines (string[])
at WindowsFormsApplication1.Main_Form.amp_portante_ValueChanged (System.Object Sender) [0x00025] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:381
at KnobControl.KnobControl.OnValueChanged (System.Object sender) [0x00000] in <filename unknown>:0
at KnobControl.KnobControl.set_Value (Int32 value) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) KnobControl.KnobControl:set_Value (int)
at WindowsFormsApplication1.Main_Form.textb2_TextChanged (System.Object sender, System.EventArgs e) [0x00085] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:1023
at System.Windows.Forms.Control.OnTextChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.TextBoxBase.OnTextChanged (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.TextBoxBase.set_Text (System.String value) [0x00000] in <filename unknown>:0
at System.Windows.Forms.TextBox.set_Text (System.String value) [0x00000] in <filename unknown>:0
at WindowsFormsApplication1.Main_Form.SimpleFM_Conf() [0x00058] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:45
at WindowsFormsApplication1.Main_Form.Main_Form_Load (System.Object sender, System.EventArgs e) [0x00012] in /Users/giuseppe/Desktop/CRUZER/Csound Converter/WindowsFormsApplication1/Main_Form.cs:359
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000] in <filename unknown>:0
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000] in <filename unknown>:0
應用程序完全在Visual Studio中,我不知道我應該做的。
嘗試設置裏面'Main_Form.textb2_TextChanged'或'Main_Form.amp_portante_ValueChanged'斷點,看看你能找出什麼從那裏的空。它幾乎看起來像你的KnobControl是空的,但我不習慣monodevelop堆棧痕跡,所以我可能很錯誤:) – 2013-02-16 16:55:56
我放置了斷點和應用程序停止,但我不知道如何看到什麼是null ...我在調試時沒有經驗 – Giu 2013-02-16 17:11:51
嗯,在Visual Studio中,鼠標懸停在變量上會顯示值,不確定MonoDevelop。 – 2013-02-16 17:15:00