0

Tried : Treeview control while moving from one node to another facing access violation issue, behavior is inconsistent some time it happen, some time it wont. 2 out of 10 times we are seeing the exception.

Environment: Windows 10 64 bit, VS2017 4.6.1 framework.

Stack Trace: Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

stack trace:

   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.TreeView.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.TreeView.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)
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
  • Please [edit] your question to include your code – canton7 Feb 03 '20 at 14:55
  • 1
    Does this answer your question? [Attempted to read or write protected memory. This is often an indication that other memory is corrupt](https://stackoverflow.com/questions/4074585/attempted-to-read-or-write-protected-memory-this-is-often-an-indication-that-ot) – Nekeniehl Feb 03 '20 at 15:00

0 Answers0