Visual Studio 2012 object state corrupted while dubugger is attached - by Jared Grabill

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 776259 Comments
Status Resolved Workarounds
Type Bug Repros 1
Opened 1/10/2013 8:36:13 AM
Access Restriction Public


In a .Net 4.0 project, incorrect behavior is produced with debugger attached. Only observed on VisualStudio 2012 (2010 works as expected.)

In a class containing a DataTable, and several integer member variables with property accessors, one of the integer properties changes when DataTable.NewRow() is called. After the call, one of the integer properties has a new value (which happens to be a value set on a separate instance of this class.) A breakpoint of the property setter is not hit, nor is the base property ever set directly anywhere in code. Same behavior is exhibited when implemented as an auto-property as well. 

This behavior is ONLY shown when the VisualStudio 2012 debugger is attached. The integer property remains correct and unchanged until DataTable.NewRow() is called while debugger is attached, and remains incorrect after the debugger is again detached.

The behavior seems *impossible* and baffled a few developers for the greater part of a day. It is almost as if the class instance is mixed up with another. We attempted to verify that this is not the case by assigning a private readonly Guid in the class constructor to differentiate each instance, but the Guid remained unchanged correctly. To make matters worse, only one developer has been able to recreate this issue on their machine, all with exactly the same source.

The Class is IDisposable, Disposing the DataTable in the class destructor. It is part of the model/view-model used by a new child window instance in our app.
Sign in to post a comment.
Posted by Microsoft on 1/17/2013 at 2:42 AM
Hi Jared, we'll close this feedback because it is out of date. Please recreate a new feedback if you have not resolved your issue. Thanks.
Posted by Microsoft on 1/16/2013 at 12:26 AM
Hi Jared, we want to remind you we need a demo project. Please reply to us in time. Thanks.
Posted by Microsoft on 1/10/2013 at 5:58 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. In order to efficiently investigate and reproduce this issue, we are requesting a demo project. Please submit this information to us within 4 business days. We look forward to hearing from you with this information.
Posted by Microsoft on 1/10/2013 at 8:51 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(