title: MediaElement.SetSource crashes application
body: <p>I'm working on a sound recorder app for Windows 8, and have noticed that when I pass a IRandomAccessStream to MediaElement.SetSource, the application crashes, and no exception is thrown that is visible to Visual Studio. How should I debug this issue? What could be causing it?</p>
  
  <p>Here is the code that is causing the crash:</p>
  
  <pre><code>void mediaFiles_SelectionChanged(object sender, SelectionChangedEventArgs e)
  {
      if (e.AddedItems.Count == 1)
      {
          string fname = e.AddedItems[0] as string;
          Stream fstream = GlobalVariables.encryptedFS.OpenFile(fname);
          MediaElement elem = new MediaElement();
          mainGrid.Children.Add(elem);
          elem.AutoPlay = true;
          elem.SetSource(new WinRTStream(fstream, true), "audio/x-ms-wma");
      }
  }
  </code></pre>