locked
SemanticZoom throws unhandled Win32 exception when beein collapsed RRS feed

  • Question

  • Hey,

    Yesterday I noticed this bug in one of my apps, which is already in the Store (8.1). (I have a workaround, but I think this is a bug I should report.)

    When the app is snapped (320 px) the VisualStateManager sets the "Visibility" property of a SemanticZoom control to "Collapsed", which results in a crash on my Surface RT as well as the Simulator. The bug cannot be reproduced by debugging on "Local Machine".

    I was able to easily reproduce this bug in this sample project: https://dl.dropboxusercontent.com/u/7813771/MSDN/SemanticZoomBug.zip

    Please have a look. It was working in 8.0, so I think this is a bug in 8.1.

    best regards,

    michael


    Life is unsure - always eat the dessert first!

    Monday, October 21, 2013 7:48 AM

Answers

  • Tested this repro on 3 machines and can confirm it happens on all of them. Tested on a Lenovo Carbon X1, Samsung Slate 7 and Surface RT, all running the 8.1 RTM.  Might be worth noticing that those are all touch devices.

    I have been able to workaround this issue by using the UI-Thread dispatcher to run the VisualState transition. Could look like this:

    var dispatcher = Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;
                    await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => VisualStateManager.GoToState(this, "MinimalLayout", true));
     
    For more information please see my blogpost on this topic.

    Monday, October 21, 2013 9:11 PM

All replies

  • I am launching the above application on my local machine and am not getting an Exception.  Is your machine running 8.1 RTM, or a preview version?  Have you updated Visual Studio 2013 to RTM, or are you still running the preview version?

    I am running RTM for 8.1 and RTM for Visual Studio 2013.  If you are running the same can you reply back with the steps I need to repro the issue?


    Bret Bentzinger (MSFT) @awehellyeah

    Monday, October 21, 2013 8:37 PM
    Moderator
  • Tested this repro on 3 machines and can confirm it happens on all of them. Tested on a Lenovo Carbon X1, Samsung Slate 7 and Surface RT, all running the 8.1 RTM.  Might be worth noticing that those are all touch devices.

    I have been able to workaround this issue by using the UI-Thread dispatcher to run the VisualState transition. Could look like this:

    var dispatcher = Windows.UI.Core.CoreWindow.GetForCurrentThread().Dispatcher;
                    await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => VisualStateManager.GoToState(this, "MinimalLayout", true));
     
    For more information please see my blogpost on this topic.

    Monday, October 21, 2013 9:11 PM
  • This would make sense as I was not on a touch device. Thanks for the info!

    Bret Bentzinger (MSFT) @awehellyeah

    Monday, October 21, 2013 9:15 PM
    Moderator
  • I can confirm Toms workaround and my update is already on the way - thanks!

    Discovered the bug on my Surface RT (8.1 RTM) with the released version of my app.

    It is not reproducible on my local machine (8.1 RTM, no touch), but in the simulator.

    ...using VS2013 RTM.


    Life is unsure - always eat the dessert first!


    Monday, October 21, 2013 9:19 PM
  • I have the same problem with one of my new Windows 8.1 Universal apps. It seems this hasn't been fixed in Windows 8.1 Update 1. Crashing on a touch device but not on a non-touch device.

     Workaround confirmed, thank you!

    Friday, May 9, 2014 6:59 PM