locked
Crash when animating Hub.Orientation?

    Question

  • I'm trying to animate Hub.Orientation and getting an unhandled exception / catastrophic failure when moving to the "Vertical" state. The full code is below. Did I make a typo or could this be a bug? It works fine if I set the Orientation in code-behind. Thanks!

    <Page
        x:Class="App4.MainPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    
    	<StackPanel>
    		
    		<VisualStateManager.VisualStateGroups>
    			<VisualStateGroup x:Name="OrientationStates">
    				<VisualState x:Name="Horizontal" />
    				<VisualState x:Name="Vertical">
    					<Storyboard>
    						<ObjectAnimationUsingKeyFrames Storyboard.TargetName="hub" Storyboard.TargetProperty="Orientation">
    							<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Vertical" />
    						</ObjectAnimationUsingKeyFrames>
    					</Storyboard>
    				</VisualState>
    			</VisualStateGroup>
    		</VisualStateManager.VisualStateGroups>
    		
    		<Button Content="Vertical"   Click="OnVerticalClick" />
    		<Button Content="Horizontal" Click="OnHorizontalClick" />
    
    		<Hub x:Name="hub" />
    
    	</StackPanel>
    </Page>

    using Windows.UI.Xaml;
    using Windows.UI.Xaml.Controls;
    
    namespace App4
    {
        public sealed partial class MainPage : Page
        {
            public MainPage()
            {
                this.InitializeComponent();
            }
    
    	void OnVerticalClick  (object sender, RoutedEventArgs e) { VisualStateManager.GoToState(this, "Vertical",   false); }
    	void OnHorizontalClick(object sender, RoutedEventArgs e) { VisualStateManager.GoToState(this, "Horizontal", false); }
        }
    }
    

    Sunday, April 20, 2014 3:59 PM

Answers

  • James,

    Thank you very much for testing my code.

    I am running VS Express 2013 for Windows Version 12.0.30324.00 with Update 2 RC installed. The error is "Catastrophic Failure, -2147418113".

    ActivityLog.xml doesn't have anything I find useful. There are several warnings, but I can't really tell if they are related, e.g:

    <type>Warning</type>
        <source>VisualStudio</source>
        <description>Unexpected system error mode before loading package [VsPixPackage]</description>

    This isn't a showstopper issue since it works from code. So, unless you have some more debugging thoughts, I may just wait until the final version of Update 2 is released and then reinstall VS.

    Thanks again,

    Mark

    Monday, April 21, 2014 12:58 PM
  • Hi Mark,

    Sorry, I both tried Ultimate 2013 update 2 RC and Express 2013 update 2 RC, I still could not repro the crash.

    I will temporally close this question, and let's see if the issue on your PC will be fixed when final version of update2 is released.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, April 23, 2014 3:14 AM
    Moderator

All replies

  • Hi MarkT,

    Is there some error information when crashes? /Log might be a good helper for you.

    However, I test your sample code in my Visual Studio, I did not see any crash, probably it should be your environment issue. I cannot see any typo mistake in your code, and I don't think this could be a bug.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, April 21, 2014 7:25 AM
    Moderator
  • James,

    Thank you very much for testing my code.

    I am running VS Express 2013 for Windows Version 12.0.30324.00 with Update 2 RC installed. The error is "Catastrophic Failure, -2147418113".

    ActivityLog.xml doesn't have anything I find useful. There are several warnings, but I can't really tell if they are related, e.g:

    <type>Warning</type>
        <source>VisualStudio</source>
        <description>Unexpected system error mode before loading package [VsPixPackage]</description>

    This isn't a showstopper issue since it works from code. So, unless you have some more debugging thoughts, I may just wait until the final version of Update 2 is released and then reinstall VS.

    Thanks again,

    Mark

    Monday, April 21, 2014 12:58 PM
  • Hi Mark,

    Sorry, I both tried Ultimate 2013 update 2 RC and Express 2013 update 2 RC, I still could not repro the crash.

    I will temporally close this question, and let's see if the issue on your PC will be fixed when final version of update2 is released.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Wednesday, April 23, 2014 3:14 AM
    Moderator
  • Interesting. Thanks for trying both those configurations. I think you are likely correct that something went wrong on my machine during install/setup. I'll definitely try a clean install when Update 2 goes RTW (if not before)!
    Wednesday, April 23, 2014 3:37 AM