title: AccessViolation (0xc0000005) before video starts playing
body: <p>My Windows Form Application is closing unexpectedly and the debug console says AccessViolation 0xc0000005 before starting to play the video.</p>
  
  <p>I'm starting the video with the following code:</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      axWindowsMediaPlayer1.URL = @"C:\Program Files\MyApp\Video.mp4";
      axWindowsMediaPlayer1.Ctlcontrols.play();
  }
  </code></pre>
  
  <p>If video ends close it and exit from form:</p>
  
  <pre><code>private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
  {
      if(e.newState == 8)
      {
          axWindowsMediaPlayer1.close();
          this.Close();
      }
  }
  </code></pre>
  
  <p>Player's designer code</p>
  
  <pre><code>this.axWindowsMediaPlayer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
  this.axWindowsMediaPlayer1.Enabled = true;
  this.axWindowsMediaPlayer1.Location = new System.Drawing.Point(0, 0);
  this.axWindowsMediaPlayer1.Name = "axWindowsMediaPlayer1";
  this.axWindowsMediaPlayer1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
  this.axWindowsMediaPlayer1.Size = new System.Drawing.Size(1906, 1066);
  this.axWindowsMediaPlayer1.TabIndex = 2;
  this.axWindowsMediaPlayer1.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(this.axWindowsMediaPlayer1_PlayStateChange);
  </code></pre>
  
  <p>Debug Output:</p>
  
  <blockquote>
    <p>The program '[(PID)] game.vshost.exe' has exited with code -1073741819 (0xc0000005) 'Access violation'.</p>
  </blockquote>
  
  <p>I have tried to use try-catch but the error isn't being catched. But the problem isn't try-catch.
  Application is running with administrator rights.</p>
  
  <p>Application's event from Windows Event Viewer:  </p>
  
  <p>D3D9.DLL</p>
  
  <blockquote>
    <p>Faulting application name: game.exe, version: 1.0.0.0, time stamp: 0x58a1bd65<br>
    Faulting module name: D3D9.DLL, version: 10.0.14393.447, time stamp: 0x5819bcea<br>
    Exception code: 0xc0000005<br>
    Fault offset: 0x0000000000010207<br>
    Faulting process id: 0x189c<br>
    Faulting application start time: 0x01d2860e39d0d6e7<br>
    Faulting application path: C:\Users\Lenovo\Desktop\game.exe<br>
    Faulting module path: C:\WINDOWS\SYSTEM32\D3D9.DLL<br>
    Report Id: 21a37f31-b9d0-4137-ad79-35d608e10916<br>
    Faulting package full name: <br>
    Faulting package-relative application ID: <br></p>
  </blockquote>
  
  <p><br>
  NET Runtime</p>
  
  <blockquote>
    <p>Application: game.exe<br>
    Framework Version: v4.0.30319<br>
    Description: The process was terminated due to an unhandled exception.<br>
    Exception Info: expection code c0000005, expection address 00007FFFD7490207 <br></p>
  </blockquote>
  
  <p>My PC is Windows 10 Single Language 1607 (14393.693)</p>
  
  <p><strong>TINY NOTE:</strong> This error throwns all of my Projects after created or edited 1 month ago.</p>
  
  <p><strong><em>UPDATE:</em></strong> The same errors are thrown on the Windows Server 2012, Windows 8.1 and Windows 7 Virtual Machines and my PC</p>