title: StackOverflow error when calling DataContext.SubmitChanges()
body: <p>In a hybrid asp.net web application, framework 4.5.1, using LINQ to SQL (not Entity Framework) I'm getting the exception </p>
  
  <blockquote>
    <p>"An unhandled exception of type 'System.StackOverflowException' occurred in System.Data.Linq.dll" </p>
  </blockquote>
  
  <p>on any call to <code>DataContext.SubmitChanges()</code>.</p>
  
  <p>Every call to SubmitChanges() causes the error, it does not matter what specific entity is being altered.  The error is thrown immediately (unlike most StackOverflow exceptions, which normally take a few seconds to occur while the errant code overflows the stack).  </p>
  
  <p>The asp.net web application is running on my local host in IIS express using Visual Studio 2013.  The database is SQL Server 2005.</p>
  
  <p>My question is, how does one debug a StackOverflow exception in this environment?  Right now the above error message is all I get.</p>
  
  <blockquote>
    <ol>
    <li>The Event Viewer notes that the browser crashed (it happens in both IE 11 and Chrome) but nothing about the LINQ to SQL exception.</li>
    <li>The SQL Server process monitor does not register any database call.</li>
    <li>I have a log hooked up to my DataContext but it records nothing.</li>
    </ol>
  </blockquote>
  
  <p>It appears the stack overflow is happening inside <code>System.Data.dll</code> before any database call occurs and before anything can be logged. </p>
  
  <p>This suddenly started happening several hours ago, after a windows update ran and the machine rebooted.  That might be a coincidence.</p>
  
  <p>Something else extremely odd: we have four developers in our shop, all using Visual Studio 2013.  Two of us suddenly began having this problem, and two of us never had it.  We're all running identical code and hitting the same database.  The two of us having the problem rebooted, and the problem disappeared on one machine, but is still occurring on my machine.</p>
  
  <p>In addition to rebooting, I've deleted the project from machine and pulled it down from source control so that it is identical to what my 3 co-workers have, deleted all temporary internet files on my machine, and deleted all of my AppData\Local\temp files for my login.</p>
  
  <p>Is there any way to debug this issue?</p>
  
  <p>Clip of call stack when exception occurs (the calls to VisitExpression and etc repeat many dozens of times until it ends).</p>
  
  <p><a href="https://i.stack.imgur.com/7K6ez.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7K6ez.png" alt="enter image description here"></a></p>