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 6366867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:28:37+00:00 2026-05-25T00:28:37+00:00

The problem that I’m having is when running my android app, if I run

  • 0

The problem that I’m having is when running my android app, if I run into a force close error or pause the application with a breakpoint in debug mode and then press ‘stop’, the app doesn’t quit, instead the first activity on my activity stack is opened but it is in a very buggy state. The activity is a library of books and when it is opened after the force close or by stopping, all of the users books are gone, the labels on the options menu are gone (although the icons are still there) and almost any action results in a force close.

So basically I’m wondering why stopping the application in debug mode, or running into a force close doesn’t shut down the whole application and instead opens the first activity in a very buggy state.

I can’t give specific code because the force close only happened once and I didn’t get the stack trace. I realize this is a very generic question and I understand if it’s too little information to go off of I just wanted to see if anyone else had run into something similar.

Edit: It seems as though force close just closes the current activity and tries to open the previous activity on the stack. However somehow my application context is getting destroyed so when the previous activity opens and looks for information in the application context, such as books in the user’s library, there is nothing there.

  • 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-25T00:28:38+00:00Added an answer on May 25, 2026 at 12:28 am

    When you run into a force-close, your app’s process is killed. If your activity stack had an activity behind the one that crashed, it is restarted in a new process. When the process dies, so does the application context. The new process creates a new application context, which is why you’re not seeing your data in there.

    See http://groups.google.com/group/android-developers/browse_thread/thread/b274cfa64b17f535?pli=1 for a discussion on this.

    One way to address your specific problem is to add a flag in your Application object, that you explicitly set to true after your shared data is loaded. You can then check for this flag in your Activity’s onCreate() to confirm that the data is available. If the flag is false, you can call finish()

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

Sidebar

Related Questions

here's a problem that i've run into lately: I have a listview with a
The problem that I'm running into is that after I make an AutoIndex index
One problem that I have frequently run into lately is the problem of my
The problem that I am having has to do with the need to keep
I am having the problem that I cannot select a specific XML node which
I am having a problem that is strange to me but hopefully is not
The problem that i'm having is how can i synchronise my datasets in my
The problem that i am having is I am using a touch listener for
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from

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.