Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

RC0 preloader XAML crashes browser RSS

3 replies

Last post Oct 14, 2008 11:22 AM by metal

(0)
  • metal

    metal

    Contributor

    4753 Points

    794 Posts

    RC0 preloader XAML crashes browser

    Sep 29, 2008 02:21 PM | LINK

     Installed RC0 loaded working 2-Beta-2 game, made minor code corrections to main project and testing in IE7 or FF3 crashes the browser.

    Removed the splashscreensource and onSourceDownloadProgressChanged tags and the game works fine (C#).

    the XAML loads fine in VS2008 and Expresion Blend 2 and replacing the xaml with something simple  i.e.

    <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="700" Height="400">
        <TextBlock x:Name="LetterContainer1" Text="1" />
        <TextBlock x:Name="LetterContainer2" />
        <TextBlock x:Name="LetterContainer3" />
        <TextBlock x:Name="LetterContainer4" />
    </Canvas>

    also  works fine

    Expression blend 2 sp1 preview crashes at the create/open project stage so I am unable to test my hand written XAML that worked fine in 2-beta2

     can anyone see anything wrong with the following ?

    <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="700" Height="400">
    
        <Canvas.Resources>
    <Style x:Key="LTop" TargetType="Canvas">
    
            <Setter Property="Canvas.Top" Value="180" />
    </Style>
    <Style x:Key="BOut" TargetType="Border">
    <Setter Property="CornerRadius" Value="8" />
    <Setter Property="Width" Value="50" />
    <Setter Property="Height" Value="50" />
    <Setter Property="BorderBrush" Value="Black" />
    <Setter Property="BorderThickness" Value="2" />
    </Style>
    <Style x:Key="BIn" TargetType="Border">
    <Setter Property="CornerRadius" Value="6" />
    <Setter Property="Width" Value="38" />
    <Setter Property="Height" Value="38" />
    <Setter Property="BorderBrush" Value="#aaaaaa" />
    <Setter Property="BorderThickness" Value="2" />
    <Setter Property="Background" Value="Black" />
    </Style>
    <Style x:Key="TBlock" TargetType="TextBlock">
    <Setter Property="Width" Value="38" />
    <Setter Property="Height" Value="38" />
    <Setter Property="FontSize" Value="28" />
    <Setter Property="FontWeight" Value="Bold" />
    <Setter Property="TextAlignment" Value="Center" />
    <Setter Property="Margin" Value="-2,-6,0,0" />
    <Setter Property="Foreground" Value="White" />
    </Style>
    </Canvas.Resources>
    <Canvas.Background>
    <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
    <LinearGradientBrush.GradientStops>
    <GradientStop x:Name="GsS1" Color="#50a0ff" Offset="0"/>
    <GradientStop x:Name="GsS4" Color="#90c0ff" Offset="1"/>
    </LinearGradientBrush.GradientStops>
    </LinearGradientBrush>
    </Canvas.Background>
    <Canvas Canvas.Left="244" Style="{StaticResource LTop}">
     <Border Style="{StaticResource BOut}">
     <Border.Background>
     <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.25,1">
     <LinearGradientBrush.GradientStops>
     <GradientStop Color="#ffff90" Offset="0"/>
     <GradientStop Color="#ff9090" Offset="0.25"/>
     <GradientStop Color="#9090ff" Offset="0.5"/>
     <GradientStop Color="#90ffff" Offset="1"/>
     </LinearGradientBrush.GradientStops>
     </LinearGradientBrush>
     </Border.Background>
     <Border Style="{StaticResource BIn}">
     <TextBlock x:Name="LetterContainer1" Text="-" Style="{StaticResource TBlock}" >
     </TextBlock>
     </Border>
     </Border>
    </Canvas>
    <Canvas Canvas.Left="296" Style="{StaticResource LTop}">
     <Border Style="{StaticResource BOut}">
     <Border.Background>
     <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.25,1">
     <LinearGradientBrush.GradientStops>
     <GradientStop Color="#ffff90" Offset="0"/>
     <GradientStop Color="#ff9090" Offset="0.25"/>
     <GradientStop Color="#9090ff" Offset="0.5"/>
     <GradientStop Color="#90ffff" Offset="1"/>
     </LinearGradientBrush.GradientStops>
     </LinearGradientBrush>
     </Border.Background>
     <Border Style="{StaticResource BIn}">
     <TextBlock x:Name="LetterContainer2" Text="-" Style="{StaticResource TBlock}" >
     </TextBlock>
     </Border>
     </Border>
    </Canvas>
    <Canvas Canvas.Left="348" Style="{StaticResource LTop}">
     <Border Style="{StaticResource BOut}">
     <Border.Background>
     <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.25,1">
     <LinearGradientBrush.GradientStops>
     <GradientStop Color="#ffff90" Offset="0"/>
     <GradientStop Color="#ff9090" Offset="0.25"/>
     <GradientStop Color="#9090ff" Offset="0.5"/>
     <GradientStop Color="#90ffff" Offset="1"/>
     </LinearGradientBrush.GradientStops>
     </LinearGradientBrush>
     </Border.Background>
     <Border Style="{StaticResource BIn}">
     <TextBlock x:Name="LetterContainer3" Text="-" Style="{StaticResource TBlock}" >
     </TextBlock>
     </Border>
     </Border>
    </Canvas>
    <Canvas Canvas.Left="400" Style="{StaticResource LTop}">
     <Border Style="{StaticResource BOut}">
     <Border.Background>
     <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.25,1">
     <LinearGradientBrush.GradientStops>
     <GradientStop Color="#ffff90" Offset="0"/>
     <GradientStop Color="#ff9090" Offset="0.25"/>
     <GradientStop Color="#9090ff" Offset="0.5"/>
     <GradientStop Color="#90ffff" Offset="1"/>
     </LinearGradientBrush.GradientStops>
     </LinearGradientBrush>
     </Border.Background>
     <Border Style="{StaticResource BIn}">
     <TextBlock x:Name="LetterContainer4" Text="%" Style="{StaticResource TBlock}" >
     </TextBlock>
     </Border>
     </Border>
    </Canvas>
    <Canvas.Triggers>
     <EventTrigger RoutedEvent="Canvas.Loaded" >
     <BeginStoryboard>
     <Storyboard >
     <ColorAnimation Storyboard.TargetProperty="(Color)" Storyboard.TargetName="GsS1" To="#ffff00" Duration="0:0:10" AutoReverse="False" />
     <ColorAnimation Storyboard.TargetProperty="(Color)" Storyboard.TargetName="GsS4" To="#ff0000" Duration="0:0:4" AutoReverse="False" />
     </Storyboard>
     </BeginStoryboard>
     </EventTrigger>
    </Canvas.Triggers>
    </Canvas>
    
      

    RC0 xaml

  • metal

    metal

    Contributor

    4753 Points

    794 Posts

    Re: RC0 preloader XAML crashes browser

    Sep 29, 2008 03:40 PM | LINK

     Even this will crash the browser

     Unhandled exception at 0x00000000 in iexplore.exe: 0xC0000005: Access violation.

    <Canvas xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Width="700" Height="400">
    <Canvas.Resources>
    <Style x:Key="LTop" TargetType="Canvas">
    <Setter Property="Canvas.Top" Value="180" />
    </Style>
    </Canvas.Resources>
    </Canvas>
      Removing all resourced styles and references to them and the XAML works.

    crash RC0 xaml Unhandled exception

  • metal

    metal

    Contributor

    4753 Points

    794 Posts

    Re: RC0 preloader XAML crashes browser

    Oct 01, 2008 02:24 PM | LINK

     reported as bug

    http://silverlight.net/forums/t/31728.aspx

    looks like it fixed on internal builds

    bug fixe internal build

  • metal

    metal

    Contributor

    4753 Points

    794 Posts

    Re: RC0 preloader XAML crashes browser

    Oct 14, 2008 11:22 AM | LINK

     bug still exists with RTW :(