Hi,
I'm developing an app that uses a RichTextBox, and populates it with
colour formatted text at Form Load. However, I randomly receive this
error, which I believe is related to this data population:
Unhandled Exception: System.NullRefe renceException: Object reference
not set to an instance of an object.
at System.Windows. Forms.RichTextB ox.EditStreamPr oc(IntPtr dwCookie,
IntPtr buf, Int32 cb, Int32& transferred)
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.TextBoxBa se.WndProc(Mess age& m)
at System.Windows. Forms.RichTextB ox.WndProc(Mess age& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Peek Message(MSG& msg,
IntPtr hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
Does anyone have any insight into this? I've googled to no avail so
far.
TIA
I'm developing an app that uses a RichTextBox, and populates it with
colour formatted text at Form Load. However, I randomly receive this
error, which I believe is related to this data population:
Unhandled Exception: System.NullRefe renceException: Object reference
not set to an instance of an object.
at System.Windows. Forms.RichTextB ox.EditStreamPr oc(IntPtr dwCookie,
IntPtr buf, Int32 cb, Int32& transferred)
at System.Windows. Forms.UnsafeNat iveMethods.Call WindowProc(IntP tr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows. Forms.NativeWin dow.DefWndProc( Message& m)
at System.Windows. Forms.Control.D efWndProc(Messa ge& m)
at System.Windows. Forms.Control.W ndProc(Message& m)
at System.Windows. Forms.TextBoxBa se.WndProc(Mess age& m)
at System.Windows. Forms.RichTextB ox.WndProc(Mess age& m)
at System.Windows. Forms.ControlNa tiveWindow.OnMe ssage(Message& m)
at System.Windows. Forms.ControlNa tiveWindow.WndP roc(Message& m)
at System.Windows. Forms.NativeWin dow.DebuggableC allback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows. Forms.UnsafeNat iveMethods.Peek Message(MSG& msg,
IntPtr hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
Does anyone have any insight into this? I've googled to no avail so
far.
TIA