Versuch, geschützten Speicher zu lesen oder zu schreiben

Habe ich begonnen zu sehen, eine AccessViolationException geworfen in meiner Anwendung mehrere verschiedene spots. Es nie eingefallen auf meinem Entwicklungs-pc, unsere test-server. Es auch nur naheliegend, sich am 1 unserer 2 Produktions-Server. Da es nur geschah auf einer unserer Produktions-Server, schaute ich mir das installiert .net framework-Versionen auf den Servern.

Ich fand, dass (aus irgendeinem seltsamen Grund), die Produktions-server ist, der Probleme hatte, 2.0 sp2, 3.0 sp2 und 3.5 sp1, während der andere Produktions-server und dem test server 2.0 sp1.

Meiner app nur Ziele das 2.0-framework, entschieden deinstallieren Sie alle framework-Versionen aus dem Produktions-server und installieren Sie nur das 2.0 sp1. So weit ich habe nicht in der Lage, das problem zu reproduzieren. Sehr interessant.

Entwicklungs-pc: kompaktes 2.0 sp2 compact 3.5, 2.0 sp2, 3.0 sp2, 3.5 sp1
Test-server: 2.0 sp1
Produktion server1: 2.0 sp1
Produktion server2: 2.0 sp2, 3.0 sp2, 3.5 sp1

Nun, warum kann ich nicht reproduzieren Sie das problem auf meinem Entwicklungs-pc hat 2.0 sp2 drauf, habe ich nicht herausfinden können. Ich hörte Gerüchte, dass diese Zugriffsverletzung kann passieren, auf eine software, die remoting verwendet, welche mir tut, aber die Zugriffsverletzung nie happends, wenn remoting ist tatsächlich anspringt. Ich bin ok mit nur 2.0 sp1 für jetzt, aber ich bin wirklich daran interessiert zu wissen, ob jemand dieses Problem gehabt hat, und wenn Sie fand einen workaround für neuere Versionen der frameowork.

Hier ein paar Ausnahmen und Ihre stack-traces:

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at ICSharpCode.TextEditor.TextArea.HandleKeyPress(Char ch)
   at ICSharpCode.TextEditor.TextArea.SimulateKeyPress(Char ch)
   at ICSharpCode.TextEditor.TextArea.OnKeyPress(KeyPressEventArgs e)
   at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
   at System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
   at System.Windows.Forms.Control.WmKeyChar(Message& m)
   at System.Windows.Forms.Control.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)

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

InformationsquelleAutor der Frage Jeremy | 2009-02-27

Schreibe einen Kommentar