"Attempted to read or write protected memory" while scrolling

I'm getting this error often while scrolling in a .CS file with Resharper 4.5.1289.0 (CSharp):

   "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
   
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   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.NativeWindow.WndProc(Message& m)
   at JetBrains.Platform.CommonServices.TextControlServices.Impl.VSScrollBarWindow.WndProc(Message& m) in c:\Agent\work\e1023618541fdc56\Platform\src\CommonServices\src\TextControlServices\Impl\VSScrollBarWindow.cs:line 181
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This sounds similar to this discussion from last year:

http://www.jetbrains.net/devnet/message/5213461#5213461

And it also sounds like RSRP-81443.  Is it possible that this is a regression?

Thanks,

-Mike

3 comments

Hello,

This sounds similar to this discussion from last year:
http://www.jetbrains.net/devnet/message/5213461#5213461


That issue is probably related to a particular bug in the CSS language service
implementation in Visual Studio. It would crash when queried for coordinates
below the last line in the file instead of reporting the failure gracefully.
We got more careful about the coordinates we ask for, and the problem went
away.

I'm getting this error often while scrolling in a .CS file with
Resharper 4.5.1289.0 (CSharp):

"Attempted to read or write protected memory. This is often an
indication that other memory is corrupt."

at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
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.NativeWindow.WndProc(Message& m)
at
JetBrains.Platform.CommonServices.TextControlServices.Impl.VSScrollBar
Window.WndProc(Message& m) in
c:\Agent\work\e1023618541fdc56\Platform\src\CommonServices\src\TextCon
trolServices\Impl\VSScrollBarWindow.cs:line 181
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

And it also sounds like RSRP-81443.  Is it possible that this is a
regression?


I have no info on what this could be about. I'm also not aware of any fixes
in this field. So, probably, this is not a regression, but rather a specific
environment configuration in which the issue manifests itself. I can see
no hints on what we could do to fix it. Possibly a mixed-mode call stack
could help (native + managed debugging catching this exception as it's thrown).
You could also try the community preview builds for R# v5, they go a bit
differently about handling the scrollbars and could work better in your case.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

I see that someone is having a similar problem with TypeMock & Resharper working together:

   https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=505699&wa=wsignin1.0

I had a similar problem where an exception was thrown from within TypeMock when scrolling, which they seem to have fixed with their latest release.  I wonder if it's related that Resharper is also throwing an exception while scrolling.

-Mike

0

My subsequent debugging info shows that the rest of these crashes are occurring in Typemock code.  I suspect that somehow it was interfering with Resharper.

No crashes in the few hours since I uninstalled Typemock.

-Mike

0

Please sign in to leave a comment.