Skip to content

Instantly share code, notes, and snippets.

@MrHotkeys
Created December 25, 2012 03:36
Show Gist options
  • Save MrHotkeys/4371537 to your computer and use it in GitHub Desktop.
Save MrHotkeys/4371537 to your computer and use it in GitHub Desktop.
RichTextBox.ScrollToCaret induced AccessViolation text
System.AccessViolationException was unhandled
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=System.Windows.Forms
StackTrace:
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, EDITSTREAM lParam)
at System.Windows.Forms.RichTextBox.StreamIn(Stream data, Int32 flags)
at System.Windows.Forms.RichTextBox.StreamIn(String str, Int32 flags)
at System.Windows.Forms.RichTextBox.set_SelectedText(String value)
at System.Windows.Forms.TextBoxBase.AppendText(String text)
at DeveloperConsole.InputOutputForm.AppendOutput(String text) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\InputOutputForm.cs:line 174
at DeveloperConsole.FormConsole.Output(String s) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\FormConsole.cs:line 60
at DeveloperConsole.DevConsole.WriteLine(String s) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\DevConsole.cs:line 398
at ScrapRevolution.ScrapConsole.WriteLine(String s) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\ScrapCore\ScrapConsole.cs:line 77
at ScrapRevolution.PackageLoading.PackageCzar.RequestLibraryDump(String[] args) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\ScrapCore\PackageLoading\PackageLoader.cs:line 78
at DeveloperConsole.Instructions.Command.HandleInvoke(IDevConsole console, String[] args) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\Instructions\Command.cs:line 42
at DeveloperConsole.Instructions.ConsoleInstruction.Invoke(IDevConsole console, String[] args) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\Instructions\ConsoleInstruction.cs:line 92
at DeveloperConsole.DevConsole.InvokeInstruction(String fullName, String[] args) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\DevConsole.cs:line 733
at DeveloperConsole.DevConsole.ProcessInput(String input) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\DevConsole.cs:line 445
at DeveloperConsole.FormConsole.<.ctor>b__0(String i) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\FormConsole.cs:line 28
at DeveloperConsole.InputOutputForm.SubmitInput(Object sender, KeyEventArgs e) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\DeveloperConsole\InputOutputForm.cs:line 87
at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e)
at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.TextBoxBase.WndProc(Message& m)
at System.Windows.Forms.TextBox.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.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Microsoft.Xna.Framework.Game.Run()
at ScrapRevolution.Program.Main(String[] args) in C:\Users\Mr.Hotkeys\Dropbox\Programming\Projects\ScrapRevolution\ScrapRevolution\Program.cs:line 15
InnerException:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment