Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6339279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:37:13+00:00 2026-05-24T19:37:13+00:00

I have a WP7 app that sometimes has to make a long (5-25 sec)

  • 0

I have a WP7 app that sometimes has to make a long (5-25 sec) processing.

With Mango, when the app is set to Dormant state while it was processing (ex: the user presses the Windows button or locks the screen), when the user comes back, the app crashes.

I tried on the emulator and on my device, same behavior.

If I reproduce it in debug mode on Visual Studio, it doesn’t crash so it’s hard to find what is really happening.

To reproduce it, start a new Windows Phone project, add a button on MainPage.xaml & add an event handler on the click event that executes an infinite loop:

while (true)
{
    System.Threading.Thread.Sleep(100);
}

My question is: What is really happening? Why does it crash? Isn’t fast app switching supposed to just pause the app process and resume it?

EDIT:
Another thing I noticed is that when running the heavy process, the deactivated & activated events do not seem to be raised when I get out/in the app.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T19:37:13+00:00Added an answer on May 24, 2026 at 7:37 pm

    Found the answer on the official Windows Phone forum (link). Here it is:

    Why it crashes:

    From the time the app is deactivated, it has exactly ten seconds to
    finish up what it is doing. If the code takes more than ten seconds,
    the OS will terminate the app.

    Why the deactivated & activated events are not raised when I get out/in the app:

    If the process is blocking the UI thread this also blocks the message
    dispatch loop so I suspect that this is the reason why your app never
    gets a chance to detect and handle the events.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WP7 app that has a search page. I would prefer to
I have a Pivot Control in my WP7 app that by nature responds to
So I have a detail page on my WP7 app that shows a listbox
I have a map with a MapItemsControl in my WP7 app that contains pushpins
I have a WP7 game that has symptoms similar to the following post: WP7
For my WP7 app, I have a setting that I use to specify whether
I have WP7 app that uses the MVVM pattern. When the user goes from
I have a page in my WP7 app that I build dynamically. I create
basically I have a pivot control in my WP7 app that contains 3 views.
I have wp7 app that should consume Google Latitude API. It requires my app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.