Debugging DateTimePicker event hangs VS - by The real Slartibartfast

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 1290685 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 4/30/2015 2:22:33 AM
Access Restriction Public

Description

Hi, 

If I set a breakpoint in the ValueChanged event of a DateTimePicker (C# or VB.net) I get the error "vshost-clr2.exe is not responding".  I can set break into other event handlers such as click without any issues.   This is from a Windows Forms application and can be reproduced using C# or VB.net 

Using VS2013 update 5 CTP with .net 4.5 project(s). 

I've also tried this on another PC running Windows 8.1 and the base release of VS2013, results are even more catastrophic - hard reset of laptop is the only way to recover. 

More info can be found here: 

https://social.msdn.microsoft.com/Forums/vstudio/en-US/695dffa3-60d9-42f0-b3b8-f767211e8f07/debugging-datetimepicker-event-crashes-vs?forum=csharpgeneral
Sign in to post a comment.
Posted by Microsoft on 6/25/2015 at 10:59 AM
Hello,

We are following up with the windows team if this can be fixed in user32.dll.

Thanks, and keep the feedback coming,
Windows Forms Team
Posted by The real Slartibartfast on 6/22/2015 at 8:56 AM
This definitely happened under Windows 7.
Posted by Microsoft on 6/18/2015 at 1:11 PM
This issue appears to be limited to Windows 8.x machines. We are not able to reproduce it on Windows 7. It is also possible that this problem does not occur on Windows 10, though I have not personally verified that is the case. If using a different Windows version is a possibility, then doing so may allow you to work around this issue.

Sincerely,

Geoff Darst
Windows Forms Team
Posted by Microsoft on 6/16/2015 at 4:39 PM
Hi,

Thank you for your report. This is a very interesting bug. The DateTimePicker control installs a mouse hook as part of its functionality, but when the debugger has the WinForms application stopped on a breakpoint, it allows the possibility of a deadlock if VS happens to get a mouse message. For now, the deadlock is unfortunately a consequence of the DateTimePicker's design. The mouse hook is installed when the drop down is clicked to display the calendar. This means that breakpoints should not be sent in any event handlers which would be called while the calendar is active. We are currently investigating whether it is possible to address this issue and we will update this thread with further information if we are able to make a fix available.

Sincerely,

Geoff Darst
Windows Forms Team
Posted by Microsoft on 4/30/2015 at 3:04 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If you require immediate assistance with this issue, please contact product support at http://support.microsoft.com/ph/1117.