title: What is a win32 exception and what causes it?
body: <p>I have been having numerous problems concerning "unhandled win32 exceptions". They seem to crop up a lot of the time when I use data bindings, although not always. I have not found a solution to them yet, I have instead managed to find a way around the data bindings in the cases encountered so far, like in the question I have already posted on the matter, which is available here:</p>
  
  <p><a href="https://stackoverflow.com/questions/37258027/bind-to-uielement-in-code-behind-crashing">Bind to UIElement in code-behind crashing</a></p>
  
  <p>However, I cannot use some other technique with my current issue, which is why I would like to be able to clear this up:</p>
  
  <p>The exception appears as soon as the property that is bound to is changed, firing the <code>OnPropertyChanged</code> event, which is set up as follows:</p>
  
  <pre><code>private ObservableCollection&lt;Element&gt; elements;
  public ObservableCollection&lt;Element&gt; Elements
  {
      get { return elements; }
      set
      {
          elements = value;
          OnPropertyChanged("Elements");
      }
  }
  
  public event PropertyChangedEventHandler propertyChanged;
  public void OnPropertyChanged(string propertyName)
  {
      propertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  }
  </code></pre>
  
  <p>The markdown is as follows:</p>
  
  <pre><code>&lt;ListView x:Name="taskList" Grid.Row="1" Grid.Column="1" Margin="10,10,20,20" Background="White" ItemsSource="{Binding Elements, UpdateSourceTrigger=PropertyChanged}"&gt;
  </code></pre>
  
  <p>In case you were wondering, this behaviour does not seem to be exclusive to <code>ListViews</code> with <code>IEnumerables</code>, as it appeared when binding to the <code>UIElement</code> in the previous question as well.</p>
  
  <p>The exception presents this text in a warning window, followed by this menu:</p>
  
  <blockquote>
    <p>Warning</p>
    
    <p>A debugger is attached to [Project Name.exe] but not configured to debug this unhandled exception. To debug this exception, detach the current debugger.</p>
  </blockquote>
  
  <p><a href="http://i.stack.imgur.com/IpQZ2.png" rel="nofollow">Win32 exception choose debugger</a>
  (The name is edited out for legal reasons)</p>
  
  <p>If I choose to attach a instance of VS, it instantly stops debugging after realizing that another instance of VS is already attached. If I pick "No", the application stops execution. The error code in brackets in different upon every execution.</p>
  
  <p>This error is driving me up the wall, so any pointers to what might be causing this are appreciated, since my project is suffering tremendously from it and progress stangates every time I run into it.</p>
  
  <p>If you need any more code or information, just write a comment and I'll supply it.</p>
  
  <p>Thank you very much for taking the time to look into this issue!</p>
  
  <p>EDIT: I have further observed the issue and have found that using <code>x:Bind</code> does not help either, the exception is still thrown.</p>