Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging program that is using the clipboard can cause VS to freeze #1

Open
einaregilsson opened this issue Oct 28, 2015 · 0 comments

Comments

@einaregilsson
Copy link
Collaborator

from Markus Schaber (disqus)

Yesterday, I had problems while debugging, visual studio froze because the process being debugged was the clipboard owner (the bug I had to chase was about a paste operation).

It turned out that two extensions (AnkhSVN and ClipBoardDiff) did access the clipboard which did not respond because the owner was halted by the debugger on the exception I wanted to chase.

The AnkhSVN developer already committed a workaround which avoids accessing the clipboard in this specific case. (https://ctf.open.collab.net/sf... - which seemlingly also contains other fixes).

The "interesting" Part of the stack trace is:

System.Windows.Forms.dll!System.Windows.Forms.Clipboard.GetDataObject(int retryTimes, int retryDelay) + 0x1d bytes
System.Windows.Forms.dll!System.Windows.Forms.Clipboard.GetDataObject() + 0x4f bytes
System.Windows.Forms.dll!System.Windows.Forms.Clipboard.ContainsText(System.Windows.Forms.TextDataFormat format) + 0x33 bytes
System.Windows.Forms.dll!System.Windows.Forms.Clipboard.ContainsText() + 0x31 bytes
ClipboardDiff.dll!EinarEgilsson.ClipboardDiff.ClipboardDiffPackage.ClipboardAndSelectionBothHaveText() + 0xb bytes
ClipboardDiff.dll!EinarEgilsson.ClipboardDiff.ClipboardDiffPackage.InitializeMenuCommands.AnonymousMethod__2(object cmd, System.EventArgs e) + 0x2b bytes
Microsoft.VisualStudio.Shell.10.0.dll!Microsoft.VisualStudio.Shell.OleMenuCommand.OleStatus.get() + 0x2c bytes
Microsoft.VisualStudio.Shell.10.0.dll!Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(ref System.Guid guidGroup, uint nCmdId, Microsoft.VisualStudio.OLE.Interop.OLECMD[] oleCmd, System.IntPtr oleText) + 0xf0 bytes
Microsoft.VisualStudio.Shell.10.0.dll!Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(ref System.Guid guidGroup, uint nCmdId, Microsoft.VisualStudio.OLE.Interop.OLECMD[] oleCmd, System.IntPtr oleText) + 0x3f bytes

The steps to repeat:

  • Debug a program which is the clipboard owner (e. g. "copy" some text from a text box)
  • Halt the program in the debugger
  • Press the right mouse button in VS to get the context menu.

Do you think you also could provide a bugfix?

Or do you think that the root cause needs to be fixed in VS itself?

Thanks for your efforts!

AnkhSVN now contains a real fix for the problem:
https://ctf.open.collab.net/in...
This fix might also be applicable to ClipBoardDiff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants