locked
Windows 8 App is crashing in Portrait View RRS feed

  • Question

  • Hi,

    I'm developing an application for windows 8, i came across a strange issue. My app is getting terminated or crash, if i try to navigate from one page to another in portrait mode. Can some one help me to resolve this issue?

    Thanks,

    Friday, October 25, 2013 10:00 AM

Answers

  • Hi, Purushotham

    Just as Dave says, there may be a VisualState reference to elements that are not existing anymore.

    You can look at the bottom for VisualStateManager and check if you try to change something that does not exists anymore.

    This error often occurs when you remove back button and/or page title without removing depending animations in VisualStateManager.

    Otherwise go to DEBUG->Exceptions... and select Thrown for Common Language Runtime Exceptions.

    Try to reproduce this error with this enabled and you may get some more information why or how your crashes.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; 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.


    • Edited by Anne Jing Monday, October 28, 2013 9:24 AM edit
    • Marked as answer by Purushotham B Monday, October 28, 2013 12:30 PM
    Monday, October 28, 2013 9:23 AM

All replies

  • can you debug it? then probally get a good error. think there is a VisualState reference to elements that are not existing anymore. You can use the simulator to test

    Microsoft Certified Solutions Developer - Windows Store Apps Using C#

    Friday, October 25, 2013 10:48 AM
  • Hi Dave, 

    Thanks for the quick reply, I will explain the issues in steps

    If I launch my application in Full Screen landscape view, its working fine.

    If I try to launch the app in Portrait view, my home page is launching fine, if i try to navigate to next pages (Any of the pages) app navigates to next page and it will stay for few seconds like( 2 or 3 secs) and then immediately crashing, without any error, exception. And my debugging mode in Visual Studio is also exiting. Unable to catch the issue, so i tried event logger to check the issue. I got the below details.

    Faulting application name:SampleW8.exe, version: 1.0.0.0, time stamp: 0x526a55a0
    Faulting module name: Windows.UI.Xaml.dll, version: 6.2.9200.16674, time stamp: 0x51f055f4
    Exception code: 0xc000027b
    Fault offset: 0x0000000000982017
    Faulting process id: 0x1bc8
    Faulting application start time: 0x01ced1753052ae26
    Faulting application path: D:\Samples\SampleW8\bin\x64\Debug\AppX\SampleW8.exe
    Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
    Report Id: e9f5a274-3d69-11e3-be81-8851fb727328
    Faulting package full name: 4f1c52de-41bd-4075-94dd-59c5639a9277_1.0.0.0_x64__z61fwjqn3hjay
    Faulting package-relative application ID: App

    Note: If i launch my app in Landscape page and navigate to any page and tilt to portrait view it is working fine. What I''m trying to say is the while navigating to one page to another in portrait view is causing the crash.

    Please help me in resolving the issue.

    Thanks....

    Friday, October 25, 2013 11:43 AM
  • Hi, Purushotham

    Just as Dave says, there may be a VisualState reference to elements that are not existing anymore.

    You can look at the bottom for VisualStateManager and check if you try to change something that does not exists anymore.

    This error often occurs when you remove back button and/or page title without removing depending animations in VisualStateManager.

    Otherwise go to DEBUG->Exceptions... and select Thrown for Common Language Runtime Exceptions.

    Try to reproduce this error with this enabled and you may get some more information why or how your crashes.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; 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.


    • Edited by Anne Jing Monday, October 28, 2013 9:24 AM edit
    • Marked as answer by Purushotham B Monday, October 28, 2013 12:30 PM
    Monday, October 28, 2013 9:23 AM
  • Hi Dave and Anne,

    Thanks for the reply and i found my issue, it is due to some changes in visual state.

    Here i tried to change the ItemsPanel of a grid view in Visual State Manager, where i got the crash.

    I commented them and tried to debug, and it is working fine.

    Thanks for the solution. 

    And I wanted to know how can we change the ItemsPanel of a grid view in Visual State.

    Here is the buggy code...,

    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="NewsGridView" Storyboard.TargetProperty="ItemsPanel">
          <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PotraitPanelTemplate}"/>
    </ObjectAnimationUsingKeyFrames>


    How can i achieve this without crashing the app.?

    Monday, October 28, 2013 12:36 PM