0

I'm getting a really weird exception when trying to navigate to a page in a Windows Phone 8.1 application (universal)

A first chance exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in MyApplcation.exe
WinRT information: Cannot create instance of type '%0' [Line: 25 Position: 44]

It also says:

The text associated with this error code could not be found.

I have some code in my MainPage.xaml.cs that navigates to a page called details:

 private void Button_Click(object sender, RoutedEventArgs e)
        {
            Frame.Navigate(typeof(Details));
        }

Details has very little code:

<Page
    x:Class="MyApplcation.Views.Details"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:MyApplcationViews"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:mmppf="using:Microsoft.PlayerFramework"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <Page.Resources>

    </Page.Resources>
    <Grid>
        <Rectangle Fill="#FF152853" HorizontalAlignment="Left" Height="260" VerticalAlignment="Top" Width="491" Name="videoBack"/>

        <Image x:Name="preview_image" HorizontalAlignment="Left" Height="260" Margin="0,10,0,0" VerticalAlignment="Top" Width="56" Stretch="UniformToFill"/>
        <Border x:Name="layoverBorder" CornerRadius="50" BorderBrush="Transparent" BorderThickness="2" Margin="196,63,196,689" Background="#FFFEFEFE" Opacity="1"  >
            <Image x:Name="layoverImage" HorizontalAlignment="Left" Height="51.671" Margin="20,14.674,0,0" VerticalAlignment="Top" Width="56.372" Source="ms-appx:///Assets/triangle-64 (2).png" Stretch="None" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
                <Image.RenderTransform>
                    <CompositeTransform Rotation="90.899"/>
                </Image.RenderTransform>
            </Image>
        </Border>
        <mmppf:MediaPlayer x:Name="player" Source="{Binding Video}" Margin="0,0,0,587"/>
    </Grid>
</Page>

When I remove the <mmppf:MediaPlayer... line the page navigation works correctly.

I have no clue where to start since the exception thrown is so vague.

jharr100
  • 1,449
  • 24
  • 51
  • Take a look at the output window.. – bit Jun 02 '14 at 04:29
  • I think Uri in Video Parameter is not in correct Uri format. Check the format of Uri – Muhammad Saifullah Jun 02 '14 at 06:35
  • @bit I copied the exception from the output window -it gives no details. – jharr100 Jun 02 '14 at 15:11
  • @MuhammadSaifullah even if I take the source part out of the xaml and have just: `` it still throws an exception. – jharr100 Jun 02 '14 at 15:11
  • did you include the last build of mmppf ([player framework](https://playerframework.codeplex.com/releases/view/121773) ) And the [playready client sdk](http://visualstudiogallery.msdn.microsoft.com/477225f7-cb03-4fe6-8c5b-bfc76db7c09f) + [smooth streaming client sdk](http://visualstudiogallery.msdn.microsoft.com/b837ddf3-6884-436e-aeb7-35c6151a8933) ? Also take a look at the sample if it works for you – BironDavid Jun 03 '14 at 10:07
  • @BironDavid I got the new version and I didn't get the play ready client sdk. I downloaded the sample but the play ready dlls were showing as missing so I just removed any reference to them to try to get the application to deploy on my phone. Eventually it started working without the play ready stuff. However there were some dlls like the Adaptive Streaming Plugin (only saw x86 and ARM versions) that I could not find so I couldn't add them to my project. Is the play ready client necessary? – jharr100 Jun 03 '14 at 14:52

0 Answers0