Null reference exception in Microsoft.SilverlightMediaFramework.Player.InStreamDataCollection.MediaElement_MediaOpened

Mar 30, 2010 at 10:05 AM


I'm using the SMF for a project where I playback Mp3-files in the player.

I set the Source property from codebehind on the CoreSmoothStreamingMediaElement and it starts to stream perfectly but it also fires an NullReferenceException somewhere in the framework:

  <Message>Object reference not set to an instance of an object.</Message>
    <Frame>Microsoft.SilverlightMediaFramework.Player.InStreamDataCollection.MediaElement_MediaOpened(Object sender, RoutedEventArgs e)</Frame>
    <Frame>System.Windows.RoutedEventHandler.Invoke(Object sender, RoutedEventArgs e)</Frame>
    <Frame>Microsoft.SilverlightMediaFramework.Player.CoreSmoothStreamingMediaElement.CoreSmoothStreamingMediaElement_MediaOpened(Object sender, RoutedEventArgs e)</Frame>
    <Frame>System.Windows.RoutedEventHandler.Invoke(Object sender, RoutedEventArgs e)</Frame>
    <Frame>Microsoft.Web.Media.SmoothStreaming.SmoothStreamingMediaElement.a(Object A_0, RoutedEventArgs A_1)</Frame>
    <Frame>System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)</Frame>
    <Frame>MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)</Frame>


Anybody knows why this is being thrown?

I should also tell you that when I have opened my Silverlight app in debug mode in VS2008 and played a mp3-file and I got the above exception, if I close IE8 it doesn't stop the debugger and playback of the media file continues until i manually stops the debugger. I've never seen that behaviour before...

Hope someone can help. I tried to build a new version from the source code but these new libraries didn't work.

Apr 6, 2010 at 9:00 AM

Can anyone please help me with this problem? I can't find a solution myself.