Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AccessViolation occurs in RichTextBox.ScrollToCaret
- public void AppendLog(string message)
- {
- try
- {
- if (this.InvokeRequired)
- {
- this.Invoke(new Action<string>(this.AppendLog), message);
- }
- else
- {
- lock (_logSyncRoot)
- {
- if (rtbLog.TextLength > 100000)
- rtbLog.ResetText();
- rtbLog.AppendText(message);
- rtbLog.ScrollToCaret();
- }
- }
- }
- catch (Exception ex)
- {
- Logger.LogException(ex);
- }
- }
- at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
- at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
- at System.Windows.Forms.Control.DefWndProc(Message& m)
- at System.Windows.Forms.Control.WndProc(Message& m)
- at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
- at System.Windows.Forms.RichTextBox.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
- at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Object& editOle)
- at System.Windows.Forms.TextBoxBase.ScrollToCaret()
- at MyApp.UI.OfflineAnalyzer.AppendLog(String message) in D:MyAppCodeChartingOfflineAnalyzer.cs:line 339
Add Comment
Please, Sign In to add comment