locked
Why is my app sometimes reinitialized?

    Question

  • We're in beta test of our app and find it sometimes is reinitialized, like it just starts. This issue mostly occurs when users switch from our app to other apps or destkop, or start screen. We guess our app may crash before it's reinitialized, is there any other reasons for this?
    Sunday, February 03, 2013 4:02 AM

Answers

  • So, are you saving the documents, changes and the state of your app before your app goes into the suspend state and restoring it when resumed?  

    If not, the symptoms you are describing are to be expected.

    See Application Lifecycle (Windows Store apps)

    • Proposed as answer by jrboddie Tuesday, February 05, 2013 2:11 PM
    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 2:24 AM
    Tuesday, February 05, 2013 4:09 AM

All replies

  • Hi,

    If the App crash, when the user activates an app after it crashes, its activation event handler receives an ApplicationExecutionState value of NotRunning.

    We should make sure, if we get the state when reinitialized.
    And maybe this blog can help you to analyze crash reason. You can debug the dump file. Follow the steps in this blog.
    http://blogs.msdn.com/b/windowsstore/archive/2012/06/27/improving-apps-with-quality-reports.aspx

    Best regards,
    Jesse


    Jesse Jiang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 04, 2013 10:07 AM
  • Thank you Jesse. I've read the reference blog you recommended. But it seems that the quality report page is only available after my app is accepted by Windows store.
    Monday, February 04, 2013 3:03 PM
  • When your app is put in the background (suspended), the system may terminate it to free resources for other tasks.  Then when you go back to you app, it will reinitialize it from the start.

    Forgive me if I have misunderstood your question or your scenario.

    Monday, February 04, 2013 3:45 PM
  • Thanks jrboddie, I don't think it's the way Windows RT manipulates the apps. For example, the user open several documents in my app, and then do some other tasks, finally she returns my app and find no documents is open and all her modifications are lost.
    Tuesday, February 05, 2013 12:52 AM
  • So, are you saving the documents, changes and the state of your app before your app goes into the suspend state and restoring it when resumed?  

    If not, the symptoms you are describing are to be expected.

    See Application Lifecycle (Windows Store apps)

    • Proposed as answer by jrboddie Tuesday, February 05, 2013 2:11 PM
    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 2:24 AM
    Tuesday, February 05, 2013 4:09 AM
  • Thanks again jrboddie. You've pointed out an issue (lifecycle of a Windows store app) that I've neglected so far.
    Tuesday, February 05, 2013 12:25 PM